I've just been trying to compress an image with the PNG image format and have had varying results from different applications. For reference, the image I am trying to compress is a screenshot of this site. Here's a download of the original image.

Here are some results I have so far in order of best to worse (original image is 239KB):

PNGGauntlet (Xtreme! / None filter) ...................... 141KB
FastStone Capture v5.3 (16M / MAX/ No filter) ............ 166KB
Paint.NET 3.36 (Autodetect) .............................. 185KB
PNGGauntlet (Xtreme! / Auto filter) ...................... 208KB
IrfanView (PNGOUT 2 passes w/default) .................... 211KB
XnView (Export / 9 / Sub filter) ......................... 228KB
Photoshop CS1 (Save for Web / PNG24) ..................... 232KB
IrfanView (Standard save / 9) ............................ 240KB
XnView (Standard save / 9) ............................... 240KB
IrfanView (Save for Web / Best) .......................... 242KB

FastStone Capture v5.3 (16M / MAX/ Paeth filter) ......... 248KB
IrfanView (Save for Web / Optimal 256 / Xiaolin / Best) ..  81KB

Some fiddling with PNGGauntlet led to the best result, although it took ages to compress. FastStone is doing something interesting, as is Paint.NET because they get their results in a fraction of the time PNGGauntlet takes to crank its magic. I've separated those last two results for contrast (see how the Paeth filter seems to be causing a problem). Note also the palletized 256-color version from Irfan: this would normally be the option I would use, but I'm testing TrueColor results here.

Has anyone else got any suggestions that can beat the best results here and can anyone explain what the filters do because they seem to seriously affect the outcome depending on the image type.

link|improve this question

feedback

8 Answers

up vote 13 down vote accepted

PngOptimizer 165KB in about 2 seconds.

Image quality is untouched.

link|improve this answer
Sweet! That's a cool little utility. Elegant interface, too. – Charles Roper Jul 20 '09 at 15:38
+1 Very Nice => – Lynda Aug 29 '11 at 2:13
feedback

I've only ever used pngcrush but it works well and has plenty of options.

link|improve this answer
I checked out most everything that has been mentioned here and I settled on pngcrush as well. Telling it to strip all other data sections and running in brute force mode (if you have the time/resources) yielded the best, most reliable results for my image set (mostly line art types - B&W/gray with large sections of either black or white). – Goyuix Nov 9 '09 at 2:35
Because it's run on the command line, it's easy to build it into to your build sequence as well, which is nice. – Rich Bradshaw Nov 9 '09 at 7:28
feedback

Just for a quick benchmark, I downloaded 170 random PNGs from different websites on the internet, totaling about 8MB. Here are the results:

Original: 8,403,619 bytes total
PNGCrush: 7,398,194 bytes total
 Optipng: 7,340,167 bytes total
  PNGOUT: 6,938,205 bytes total

So it seems PNGOUT (or any GUI based on it) is the best choice if size is your primary goal. These are all lossless transformations.

link|improve this answer
feedback

PNGGauntlet is a GUI wrapper for PNGOUT and if you look at that page there is a PNGOUT.DLL plugin for Irfanview if you prefer that as an interface, or you could use PNGOUT on the command line or in scripts if you want to automate your compression as part of the build/deployment process.

link|improve this answer
feedback

can anyone explain what the filters do

They're described in the spec.

They change how rows of image are saved. Instead of saving raw RGB values (or palette indices), image may store differences between neighbouring pixels. This might make data better suited for compression if you have image with gradients.

link|improve this answer
feedback

I like OptiPNG. In addition to the source and command line utility there are optipng plugins for Windows Explorer, Paint.NET, a couple front ends for Mac users, and some other projects (Apache Ant, Eclipse; see Related Projects section on home page).

link|improve this answer
feedback

Shrink-O-Matic for easy file-resizing, conversion and optimization. AIR application.

link|improve this answer
feedback

I get the best results with ScriptPNG. It's a windows batch script that utilizes a wide array of PNG utilities in order to find the best possible compression for any given image. It often squeezes out 10-100 bytes off an already compressed image. The author has other utilities, and many articles on png/jpeg compression, PNG tests and comparisons.

It has various modes:

  • Fastest to Xtreme (speed vs size modes)
  • PNG24 (PNG24+A-specific)
  • PNG8 (PNG8-specific)
  • APNG (Animated PNG)
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.