Mac Gems: OptiPNG makes PNG files smaller without losing image quality
By Josh Centers, Macworld
At a glance
Editor’s note: The following review is part of Macworld’s GemFest 2013. Every day (except Sunday) from mid-July until late September, the Macworld staff will use the Mac Gems blog to briefly cover a standout free or low-cost program. Learn more about GemFest in this Macworld podcast. You can view a list of this year’s apps, updated daily, on our handy GemFest page, and you can visit the Mac Gems homepage for past Mac Gems reviews.
Over at TidBITS, we use the PNG (portable network graphics) image format exclusively for our images. Sometimes, an image can be 1MB or larger, but since discovering OptiPNG 0.7.4, I’ve been able to substantially reduce those file sizes without any noticeable degradation of image quality.
While OptiPNG is a free, open-source utility, there’s a big catch: it’s a command-line utility, and you’ll have to compile it yourself.
Here’s how to get OptiPNG up and running.
Download the compressed source code.
Open the file, optipng-0.7.4.tar.gz in the Finder. It will create a folder called optipng-0.7.4.
Open the Terminal, found under Applications -> Utilities.
In the Terminal, type cd then drag the optipng-0.7.4 folder into the Terminal, and press Return on the keyboard. This puts you inside that directory.
Type ./configure and press Return.
Type sudo make install and press Return.
That wasn’t so bad, was it? Now to actually use OptiPNG, move to the directory where the images are, by using the cd command above, then type optipng and the name of the image you want to optimize. To make things easier, you can type just the first few letters of the command or image name and then press the Tab key to autocomplete. You can optimize every image in a directory by typing a single asterisk instead of an image name.
But there are easier ways to use OptiPNG. Because it’s a command-line app, you can use it in an AppleScript, Automator workflow, or set it up as a Folder Action, so images you drop into a certain folder will be automatically optimized.
In my experience, OptiPNG will reduce the image’s file size by 30 to 50 percent, which can be significant for larger images. For images shared over the Internet, which is most of them these days, running OptiPNG first is an easy way to speed up load times. While OptiPNG isn’t the easiest tool to use, it’s free, flexible, and indispensable for anyone who works with online images.