This post goes over using
OptiPNG and
AdvanceCOMP to make PNGs smaller. This is especially useful for web designers, as well-compressed PNGs can actually be smaller than GIFs.
Attachment:
File comment: MD5:
61c5f941003282181828617c29d41baa
PNG Compression Tools.7z [385.87 KiB]
Downloaded 33 times
Install both programs by running the installer inside the attached file and telling it to install to
C:\Program Files\PNG Compression Tools. You will have to modify the batch files if you install to a different directory.
Both of these programs are command-line utilities, meaning that they take text commands only (no point and click interfaces). However, fear not! You can save yourself the trouble of even opening a command-line window by creating shortcuts in the SendTo menu.
To get to the SendTo folder in Windows XP, do the following:- Open a run window (WinKey + R).
- Type sendto and hit enter.
To get to the SendTo folder in Windows Vista, do the following:- Open a run window (WinKey + R).
- Type (or paste) %appdata%\Microsoft\Windows\SendTo and hit enter.
Once in the SendTo folder, do the following:- Right-click an empty area, an go to New > Shortcut. The New Shortcut Wizard will appear.
- In the box where you would type the location of the item, enter the location of "Re-Compress PNGS.bat" ("C:\Program Files\PNG Compression Tools\Scripts\Re-Compress PNGs.bat" if you have it installed in your Program Files directory).
- Enter a name for the new shortcut, I recommend Re-Compress PNGs.
- Create a new shortcut for "Re-Compress PNGs in Folder.bat", with the location: "C:\Program Files\PNG Compression Tools\Scripts\Re-Compress PNGs in Folder.bat". Name it Re-Compress PNGs in Folder.
To re-compress your PNG file:- Right-click the PNG file, go to Send To > Re-Compress PNGs. A command window will appear and you will see the output of OptiPNG and then AdvanceCOMP as they re-compresse each file. OptiPNG/AdvanceCOMP will not overwrite your PNG file if the output file size would be larger.
Further Information
- It is necessary to use OptiPNG first, because OptiPNG performs a more advanced re-compression of the PNG file. It applies delta filters, removes unnecessary data chunks, and reduces the bit depth if possible (without reducing quality). AdvanceCOMP uses the 7-zip DEFLATE algorithm (which is more effective than the standard one) to make the file smaller.
- OptiPNG can also be used to covert gif, bmp, pnm, and certain tiff images to png.
- OptiPNG on Wikipedia.
- AdvanceCOMP on Wikipedia.
Here is an example of the kind of compression you get using this method. The original file was 765KB.
- Compressed only with OptiPNG, it is 681KB. (10.9% savings)
- Compressed only width AdvanceCOMP, it is 739KB. (3.3% savings)
- Compressed with AdvanceCOMP then OptiPNG, it is 681KB. (10.9% savings)
- Compressed with OptiPNG then AdvanceCOMP, it is 679KB. (11.2% savings)
Bigger savings are had when the bit depth can be reduced (ex: grayscale or images with <= 256 colors).
Last Updated: July 24, 2008