Clear affordances for # of bytes saved (as well as being pretty bar graphs)

JPEG Compression — punypng doesn’t leave JPEGs out in the cold. JPEGs are analyzed to see if a compressed PNG format is better (ex: JPEGs with heavy solid areas benefit from this). But if not, don’t despair, punypng is backed with jpeg-tran and jpegoptim for further JPEG optimzation.

“Fire-and-forget” batch processing: You can upload up to 50 files in a single session. Optimized versions are clearly labeled, and if no further optimization can be made to the uploaded file, you get the original back untouched. After you upload a batch, you can go ahead and upload another batch without having to reload the page.

the problem is that once you compress the images you cant see a preview in the browser which means you have to download, view to make sure if they are ok and then replace your original files.. kind of makes life hard.

I tried smush.it a few months back but I prefer this kind of service to be offline, so I’m not at the whims of my network connection. I’ve been using PNGMonster for the past couple of months, and it’s pretty awesome. It doesn’t support JPEGs, and I wish it had a more detailed information about how it compressed the files (it only gives the total) but these are really minor issues.

I have been using a Windows shell script to optimize my PNGs to the maximum for years. It utilises ImageMagick and OptiPNG to produce best results, though I must admit this sometimes means losing some rich colours. For those interested, here’s the shell script: http://pastie.org/585805 Save it as .cmd, set up correct paths and drag & drop a .png file over. I get files roughly 30-50% smaller in size usually, but let me point out again this involves losing some colours (unnoticeable on most files).

@iliad and @kyriakos
I agree with doing this offline. http://tinycdn.com/Utilities/TinyOptimizer here is a good tool to do minification and png crushing. It creates a backup of any files it effects and you can drag an entire folder onto the app and it will handle a nested directory structure. For the png handling it uses png crush (brute) for js and css it uses yui compressor. It is a clickonce app and uses a server for the file manipulation via webservices (why? so it doesnt have to load a lot of dependent files on the server)

Ill check out punypng, seems pretty cool and I am usually looking to get every byte out of the band.

@mastersuwjiang: totally agree with pngnq.. .it rocks. I’ve been looking into quantization, and it’s probably the next thing that punypng is going to consume to get some more puny love.

@kyriakos: I hear you re: the lack of previews. They’re on their way… many others have asked for them ;)

@ck2 and @StanAngeloff: ImageOptim which I do benchmark here (http://www.gracepointafterfive.com/punypng-benchmarks) does the shotgun approach and uses Optipng, Pngcrush, Pngout, and AdvComp. I think punypng fares well against them, especially on transparent images through the dirty transparency support. I’d be interested to hear what kind of results you get using punypng vs the others.

@chuboy: Using the Pastie script above (ImageMagick + OptiPNG), I can get the butterfly image down to 58,364 bytes. On more complex images (suitable for JPEG compression), punypng drops about 7-10% in size where the I+O approach produces around 40-50% decrease. Of course punypng does lossless compression where my approach also lowers the depth of the image.
BTW on a side note, the butterfly images on the website are broken, missing the /punypng/ directory in path.

@StanAngeloff: thanks for the catch, I fixed the URL for the butterfly images.

For the butterfly image, I’d be interested to see how the ImageMagick+OptiPNG combo works on the original image, rather than the post-optimized one … I’d be surprised if OptiPNG can reduce it more. I think much of the savings you were able to get were due to the ImageMagick bit depth reduction rather than the -o7 option, which raises a good point that @masterwujiang suggested regarding quantization. At Ask.com, our sprites have to be lossless since every pixel counts, but I’m definitely thinking about doing some better quantization techniques now!

@chuboy: Yes, the optimisations as pointed above are mainly a result of the depth reduction — OptiPNG alone is not much to go on. In most cases reducing the depth doesn’t hurt since it’s barely noticeable. I was just playing with this photo http://bit.ly/Dm7BR and using quantization is really paying off. It might be possible to auto-choose the best depth level for individual photos by building colour distribution histograms, though that sounds a bit far fetched for my liking.

What I want is an application that I can run on my servers (windows for development and linux for production) that I can run to resize all of my images, and then for the production servers have cronjobs that take the resized images (PNG, GIF, JPG) and compress them, replacing the original file. Is that so difficult to ask?

Heck, right now I am using PHP’s GD functions to handle the resizing. So just having something that can be run any any server as a cron job for compression would be ideal. With many of these compression scripts they seem to do only png or only jpg, etc… not ideal.

Erm.. what’s the use of an online image crusher? Advertisement for the company offering it. Who’s going to get all their images crushed for every website by hand, then hand over a manual to their clients where it says they should go crush their images at the online service before uploading them into the CMS?

Here’s some usefulness of an online image crusher:
1. Most people are in need of a one-stop shop to compress all your images: GIF, PNG, and JPEGs. Currently, there’s no single offline tool that does all three formats which compression comparable to the popular libraries (PNGSquash comes close). I was a big fan of Smush.it until they removed the upload feature in favor of YSlow integration which is why punypng fills in that niche nicely.

2. If you want to get decent file support at the command line, you will need ImageMagick which is a nightmare to install plus you’ll need serious scripting abilities (kinda disqualifies most people I know).

3. Punypng’s API is in the works, and once that’s in place, you should be able to get image compression in any of your CMSes, like WordPress. Joost de Valk from Yoast emailed me this morning to start that discussion.

4. As with any online service, you get quick incremental improvements without having re-install anything on your desktop. I don’t know of any tool out there that supports Dirty Transparency, for example.

In general, you don’t crush *every* image on your site, nor is it worth the time and energy. But if you have sprites and heavy UI elements, it matters, and a free tool like punypng addresses that need perfectly. I was able to cut our UI assets on Ask.com by half using punypng, cutting our initial load times in half. As a top 10 internet destination, that translates into real cost-savings.

Dictionary.com got similar results using punypng. Wikipedia will get punyified assets in a month or so thanks to GreenReaper’s effort. Evite is on it’s way as well.

@dolphin713: Yes, punypng support animated GIFs, but it’s using gifsicle as well. I guess the only benefit is that you don’t have to run it on the command line and can do batch operations a lot easier, especially when your animated .gif is mixed in with other files and you just want to process everything at once before you release to production.

Punypng will have Animated PNG (APNG) support in the near future as well.

pngoutwin which is a GUI over pngout with several brute force options gets way more compression than punypng in almost all of the images*. Yes, it takes a lot of time (specially on my settings that runs 192 iterations per file), but it’s something you do *once* and then serve the files million times :)

*as you see, the only big exception is the butterfly image, which for some reason doesn’t get good compression on any of the standard tools [my best guess is that your tool is applying mixed filters whereas other tools apply the same filter over the whole file]

We use cookies and other similar technologies (Cookies) to enhance your experience and to provide you with relevant content and ads. By using our website, you are agreeing to the use of Cookies. You can change your settings at any time. Cookie Policy.