
- 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 | ||
| Data provided by VersionTracker | |||
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
- PNGCrusher is listed on MacUpdate and VersionTracker.
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
Current version (1.2):
- Download PNGCrusher.dmg (162 KB)
- Download PNGCrusher.sh (997 B, script only)
Change log
- Version 1.2 (2005-06-10)
- Now uses OptiPNG to achieve better compression rates than pngcrush
- Version 1.1.2 (2005-05-23)
- Smarter temp file creation
- Built with Platypus 3.1
- Version 1.1.1 (2005-04-20)
- Very minor tweaks
Acknowledgements
- Thanks to Kenichi Yoshida for the great icon!