PNG Optimization

I am creating a large number of PNG files for an Android application and need to make the images as small as possible without losing quality.

Missouri

After quite a bit of experimentation, I settled on these steps.

  1. Create the original images in Illustrator
    • Use a limited number of colors
    • Avoid transparency
    • Avoid gradients
    • Create the images in the desired dimensions, 320×480 in my case (to avoid scaling artifacts when exporting)
  2. Export to 320×480 PNG files
  3. Use Gimp to convert to Indexed colors (Image -> Mode -> Indexed)
    • Generate optimized palette
    • Maximum number of colors = 48 (this works well for my particular images — it does NOT work well if you have gradients)
    • No color dithering
  4. Use PNGCrusher to reduce file size even more

PNGCrusher only helps a tiny bit since I already optimized in Gimp, but it can produce pretty dramatic results for non-optimized PNG files.


sebsauvage Says:

For color reduction, I prefer pngnq, which does a much better job than Gimp.
http://pngnq.sourceforge.net/

I use optipng instead of PNGCrusher, but they have roughly the same results.

kgutteridge Says:

I have never found anything that beats pngoutwin, it is well worth it especially if you deal with other mobile manufacturers handsets.

David Says:

I use OptiPNG, followed by a pass from DeflOpt, which can generally reduce the size of even the most highly optimized Deflate operation. (It also cleans up some ZIP/JAR files that otherwise show errors when optimizing with AdvanceCOMP.)

Leave a Reply