Optimizing PNGs with optipng
OptiPNG is a command-line program that losslessly recompresses PNG images. It does so by trying various zlib parameters (compression, memory, strategy, window size) and PNG filters (none, up, paeth, adaptive, etc.). It also reduces images with 256 or fewer colours to 8-bit paletted mode.
Here is an example of its operation:
me@computer:~$ optipng -zc 9 -zm 5-9 -zs 0 -f 0 "Edit Roles and Capabilities.png" OptiPNG 0.5.5: Advanced PNG optimizer. Copyright (C) 2001-2007 Cosmin Truta. ** Processing: Edit Roles and Capabilities.png 1264x1082 8-bit RGB-alpha non-interlaced The image is losslessly reduced to 8-bit RGB Input IDAT size = 132820 bytes Input file size = 133140 bytes Trying... zc = 9 zm = 9 zs = 0 f = 0 IDAT size = 113817 zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 113445 zc = 9 zm = 7 zs = 0 f = 0 IDAT too big zc = 9 zm = 6 zs = 0 f = 0 IDAT too big zc = 9 zm = 5 zs = 0 f = 0 IDAT too big Selecting parameters: zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 113445 Output IDAT size = 113445 bytes (19375 bytes decrease) Output file size = 113520 bytes (19620 bytes = 14.74% decrease)
Your results may vary. 0% to 20% size reduction is typical.
And one more thing: while pngcrush may have the better name, it is OptiPNG that has the better compression.