PNG or JPG for Flash

Out of context: Reply #9

  • Started
  • Last post
  • 20 Responses
  • PIXELRANGER0

    What I do is I import everything as a PNG. No compression obviously. Then I set the Compression of the FLA to some lump Percentage that effects every Bitmap in the movie.

    Then if there are pieces of lets say the interface that I want crisp, uncompressed or compressed at a higher or lower rate I change the compression on those images on an image by image basis. Just double click the PNG in the library and change the preference on an individual basis.

    So lets say i compress everything in my movie at 80% in the Publish Settings. I might have pieces of my interface that are compressed at 90% or even Lossless Gif/PNG compression if they are small assets that I want kept crystal clear. Or if I use things that are in the background and can be compressed more then I will set them to a higher compression as well so that you get a mix of PNGs compressed to the movie setting..and then individual PNGs that are compressed or not compressed depending on what you want them to look like.

    By doing this it is really no different than saving out a JPG at 80% from photoshop. Only difference is I can do it on the fly inside of flash rather than going back, opening up Photoshop and saving out the image again at a higher or lower setting. For one image its not a big deal. But to do that to tons of images over the lifetime of your project its a pain in the ass. Thats why I've never understood why people say that by importing JPGs you get lower flash files. Its all the same to me but its a matter not having to waste time by going back and forth between the two apps. I just think that sometimes people leave the settings in the Library at NO compression. By default if the PNG has more than 256 colors it will set the compression to JPG compression when you export the movie. if its under 256 colors it will not compress your PNG.

    The problem people have is they go crazy importing these PNGs with tons of alpha which will ALWAYS increase file size. But.. A PNG with no alpha compressed at 80% and a JPG compressed at 80% and imported into Flash will very little compression differences although I've found the PNG to be lower. Yes sometimes there are color changes but it always depends on what you are importing.

    Another benefit of doing this technique comes when using image sequences. Lets say I have a flash movie that has a big image sequence and I dont want to have to re-export JPGs from After Effects every time I want to play with the compression. Import everything as PNGs and then tweak your global export pref to something like 40%. Its just like importing in a sequence of JPGs at 40%. Then you can go thru the rest of your imported images that might make up the interface or other assets and tweak them individually to 80% or something. In this way when I want to change the compression I just change the setting in Flash, Export and I'm done without having to open up AE again.

View thread