PNG Optimization
October 11th, 2009
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.

After quite a bit of experimentation, I settled on these steps.
- 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)
- Export to 320×480 PNG files
- 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
- 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.
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.
I have never found anything that beats pngoutwin, it is well worth it especially if you deal with other mobile manufacturers handsets.
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.)