Take the 2-minute tour ×

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
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.

share|improve this question
Even if the question is asked in a constructive manner (except for the "best" in the title maybe), it unfortunately has generated an open-ended list of answers, which is why I'm closing it now. –  slhck Mar 2 '13 at 22:41
For future reference, what would an acceptable form of this question be? For the record, I've found the answers exceptionally useful and constructive and therefore a good fit for this site. I would respectfully say that closing this one, in this particular case, is the wrong judgement. Natural up/down votes work fine here. If another tool comes along, you've denied us the opportunity to learn of it here. Open ended is of benefit here. –  Charles Roper Mar 3 '13 at 10:31
Since 2009, a few things have changed. Stack Exchange has made it clear that open-ended questions aren't welcome anymore (e.g., "What's the best software for XZY?"), as the format just isn't made for this, and it isn't supposed to be a polling contest, but a Q&A site for actual problems with a closed set of answers. Now, your question isn't bad per se, but we definitely don't want to get a list of all PNG optimization programs out there, which by definition is not constructive. Wikipedia has you covered there. –  slhck Mar 3 '13 at 10:37
I understand that this question has been around for a long time and you found the answers useful—also, you've been a member of this community longer than me—but you have to understand that the policies just have changed drastically. As I said, your question isn't bad, you've even asked for an explanation of how the filters work, but it didn't seem to encourage the right kind of answers. –  slhck Mar 3 '13 at 10:41
add comment

closed as not constructive by slhck Mar 2 '13 at 22:40


10 Answers

up vote 15 down vote accepted

PngOptimizer 165KB in about 2 seconds.

Image quality is untouched.

share|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
It doesn't really say much about what it really does. Is it definitely lossless? What's the "useless information" that it removes from the files? –  Sam May 31 '13 at 10:13
add comment

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

share|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
add comment

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.

share|improve this answer
add comment

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)
share|improve this answer
add comment

Contrary to most other compressors mentioned here, TinyPNG shrinks PNG files by using lossy compression. Therefore it may achieve much better file size reduction ratios.

share|improve this answer
add comment

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).

share|improve this answer
add comment

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

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

share|improve this answer
add comment

In my tests the best online tool is http://compresspng.com

share|improve this answer
If you have any affiliation with this site please declare it. Also link only answers aren't good answers. Please explain why you think this is the solution. –  ChrisF Mar 2 '13 at 23:43
add comment
