punypng Benchmarks
I recently ran some benchmarks, comparing punypng to a lot of the popular tools out there. I selected tools I felt were decently strong and versatile in handling images:
- punypng: the new kid of the block.
- smush.it: Uses pngcrush as the main PNG optimizer. Currently, available in Yahoo’s YSlow Firefox plug-in. I believe it uses the -brute option for pngcrush.
- OptiPNG: A slighlty better algorithm, compared to pngcrush. In case you’re wondering, Google’s PageSpeed plugin also uses OptiPNG for it’s compression library.
- ImageOptim: The heavyweight contender. Available for OS X, ImageOptim uses every major library out there: advdef, pngcrush, optipng, pngcrush, jpegoptim, jpegtran, and optionally pngout. I ran this the benchmarks with pngout enabled.
Now, it’s tricky business to try to compare compressors side-by-side against a single image. So instead, I selected some typical images that I found on the web, like sprites from some popular websites (Facebook, Yahoo’s icon set, and of course Ask.com, hehe). Images vary from 24-bit transparent PNGs to 8-bit indexed GIFs. Amount of transparency among the PNGs also varies.
I also included a blocky-styled JPEG to see how the different tools handled it. I know some might cry foul because I included a JPEG with solid colors (since you could have just saved it as an indexed GIF or PNG). However, I’ve seen hundreds of JPEGs that people have been uploading to punypng and it just shows that it’s often hard to know which format was certainly be the best one.
OptiPNG and ImageOptim also cannot process JPEGs and GIFs respectively. Before benchmarking, I converted them to the more digestable PNG format using ImageMagick to ensure no metadata was added
In total, the test images in total weighed in at 276KB.
Here are the results:

punypng was able to achieve 41% savings, almost double the competition The most surprising result was how much punypng trounced ImageOptim, especially on the NASCAR image. I was actually thinking that ImageOptim would beat punypng on some of the tests, since it uses everything under the sky. In terms of processing time, punypng was a wee faster than smush.it, about the same as OptiPNG, and light-years ahead of ImageOptim, which took eons to compress as it’s CPU-intensive.
One caveat I want to make is that this benchmark is not meant to say punypng is going to beat out the competition every time. However, on average, it does an excellent job, especially on images with 24-bit transparency. Libraries like pngout (which is part of ImageOptim’s toolbox) does a good job as a standalone library, but it’s very slow. I’ve often found that pngout only saves a few bytes here or there, and isn’t worth the wait.
I think one thing that favors punypng (as well as smush.it) is that it handles every kind of image you would use on web page: PNGs, GIFs, JPEGs, and Animated GIFs. I was kinda bummed with the other tools because they primarily processed only PNGs and had weak support for other formats. Personally, I just want a tool I can use to compress all my images using the latest compression technologies and techniques, and for me, that’s why I recommend punypng to all.
Related Posts
- punypng: making the web more puny, one png at a time
- punypng now supports Dirty Transparency
- New Features in PunyPNG
Categorized as Our Projects
16 Comments
Trackbacks & Pingbacks
-
Ajaxian » punypng: crushing your images even more
[...] Side-by-side comparison [...]
-
punypng — award tour
[...] punypng Benchmarks. a png/jpg/gif compressor with some pretty good benchmarks [...]
-
punypng: crushing your images even more - Programming Blog
[...] Side-by-side comparison [...]
-
Online image optimization, or taiming robots | Speeding Up Website: all about web performance
[...] gives additional 20% of savings. Authors talked about 25% average additional achievements in their benchmarks post. Seems to be the [...]
Very cool stuff Conrad!
Very impressive!
On my To-Do list is to run my card images on World of Solitaire through punypng.
I’m currently transferring 2220.51 GB of PNG images each month (yes, >2TB) and I haven’t optimized them at all yet.
I should really do this sooner, rather than later :)
You should try PNGSquash instead of ImageOptim. I’m not sure, but I think ImageOptim passes image through each library in separate process and then pick best result. And PNGSquash passes image in chain–OptiPNG first, PNGOUT last–which produces best results.
“I just want a tool I can use to compress all my images using the latest compression technologies and techniques”
Sure, but the name then appears as misleading…
Great tool, by the way,
Louis-Rémi Babé
I had great results with punypng using larger sized images (http://heiwuya.net/heiwuya.png), getting 25% compression, but smaller pngs like http://heiwuya.net/yi1.png were not compressed at all with punypng, but managed 12% compression with smush.it
I can recommend PNGOptimizer. It’s easy to use, fast and its compression ratios are similar to punypng.
Great service! Any plans for allowing the upload of a .ZIP of images? Or, perhaps more importantly, being able to upload more than 150KB of images at one time?
@Mike: Yeah, uploading a ZIP of images is on my to-do list. Regarding the max upload, it’s actually 150KB max limit per file, up to 50 files, so that’s quite a lot actually per upload session.
Need a desktop PunyPNG or ability to upload a zip file full of images.. the one-at-time upload is a case study in terrible usability.
@chrisco: You can upload up to 50 images per time by just shift-selecting multiple files in the file selection dialog. I’m not sure why you think you can only upload one image at time…
Thanks for this post..punypng is great an image compress
Optipng and Advdef are the only two programs you really need to accomplish world class results.
Optipng is unfortunately in default state using -o7 O(n^4) which means it’s very slow.
I’ve managed to make it O(n), i.e. making it finish in linear time, while producing the best possible compression, often better than pngout but at around a tenth of the time.
All I wanted to say is that you don’t need Photoshop for dirty transparency or color-management, the two things which can make Optipng+Advdef produce amazing results at lightning speed.
Thank you Sergey btw for your excellent articles at Smashing Magazine!
The articles have been invaluable during my development! :-)
And lastly, here’s the PNG benchmark image optimized:
http://i.imagehost.org/0142/benchmarks.png