|Ned Batchelder : Blog | Code | Text | Site|
» Home : Blog : August 2009
A simple step I often forget when building image assets for web pages is to optimize the graphics files. There are a whole host of utilities that reduce the size of images. I tried a few and the best for PNG seems to be PNGout.exe, from Ken Silverman's retro-ugly utility page.
PNGout fiddles with a bunch of degrees of freedom in the PNG spec to find the smallest sequence of bytes that express the same pixel values. This morning it reduced one of my images to 61% of its size. Nice.
If you want to understand what's going on, OptiPNG has a page explaining the details of what parameters exist in PNG that can be twiddled to acheive better compression.
If you are willing to consider art-level changes to get the absolute smallest sizes, Sergey Chikuyonok's Clever PNG Optimization Techniques gets into the nitty-gritty of how to re-think your image to take advantage of PNG's characteristics. He also has a companion piece on Clever JPEG Optimization Techniques which gets even trickier.