PNGCrusher

Automatic PNG optimization

2009.02.23
PNGCrusher screenshot
It's that easy!

What is PNGCrusher?

I deal with a lot of PNGs, especially when doing web work. To save viewers some bandwidth, I like to make sure that my PNGs are as well-compressed as possible. There's a great CLI tool to do that, called pngcrush OptiPNG.

To automate processing of PNG files with OptiPNG, I slapped the following code together, threw it through Platypus, and out came PNGCrusher.

Product Rating Downloads  
PNGCrusher add a comment

PNGCrusher has a bad rating at VersionTracker because some people are clueless and don't realize that some PNGs are already as compressed as they can get. Please help PNGCrusher by giving it a sane rating!

The code

#! /bin/sh

# PNGCrusher 1.2 (2005-06-10)

THISAPP="$1"/Contents/Resources

until [ -z "$2" ]; do
	"$THISAPP"/optipng "$2"
	shift
done

Clearly, this barely qualifies as an application, seeing as my grandma could have written it. Nevertheless, it's useful!

If you'd like to build it for yourself, do not copy and paste from above! Download the source below.

PNGCrusher includes OptiPNG, as compiled from the source available on the website. I compiled it with Xcode 2.1 on OS X 10.4.1, so I don't know if it will work on OS X 10.2 or earlier.

In case you were wondering, I never released version 1.0. That one couldn't even handle multiple drag-and-drop items, so it wasn't very useful.

Usage notes

PNGCrusher replaces your original files, but only if the compression has been improved. All of the caveats of OptiPNG also apply to PNGCrusher.

Around town

Usage notes

Just drag-and-drop PNG files onto PNGCrusher. OptiPNG will overwrite each file only if it was able to improve the compression rate.

If you drag a lot of files onto PNGCrusher, it may take a while to finish. Don't move, delete, or rename the files in the meantime.

PNGCrusher is distributed under the GNU General Public License.

Download

Amazon Honor System Click Here to Pay Learn More PNGCrusher icon

Current version (1.2):

Change log

Show entire history

Acknowledgements