A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: File size png vs jpg

  1. #1
    Join Date
    Jul 2008

    File size png vs jpg


    I have a png with transparency in flash, with heavy jpg compression on it. Just wondering if my final swf size could be made smaller by importing a jpg of the same image, and masking it out with a vector - or is this what flash is doing anyway and it won't change performance at all?


  2. #2
    If you want to reduce KBs - definitely you should use jpgs. The jpg images can be optimised for web in PhotoShop pretty good,and the png cant. The png alfa channel uses more memory than black background for example.

    Scotty does know how to Fla-make cool ads.

    http://flamake.net - this Ads will Fla-make you crazy. Find your cheap flash banners and see the best commercials around the world.

  3. #3
    Join Date
    May 2012
    Flash will automatically use JPEG compression on a PNG file you imported when it detects that it's suitable. Go to the properties of the image in the library and you'll see. Flash stores the alpha mask separately in a compressed form. On a 1000x1000 picture that I have (waist-up shot of a woman), the alpha mask takes up 12K, while the JPEG portion takes up 101K. The original PNG file was 843K. If you can trace out the alpha mask using curves, it's possible that you can beat the compression algorithm. It's probably not worth the effort. To reduce file size, I would focus on the JPEG compression level. Often you can get away with a lower number, like 40 or 50, especially if deblocking is turned on.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center