There are many types of different image formats and some of those most commonly found on the Internet are JPEG, GIF, BMP, TIFF and PNG. Each image format has its own purpose such as GIF is used for animated images, JPEG for high quality photos which automatically gets degraded after each save or even a resize, while our favorite PNG is best used on small and transparent pictures. Another huge advantage in PNG files is they’re lossless meaning you can compress PNG’s without losing quality.
You can easily find many tools on the Internet to compress PNG files but most, if not all of them produce different file sizes due to the algorithm unless they are using the same library/technology. Reducing the image file size to the maximum helps to save bandwidth cost, time to download and even achieving a higher Google PageSpeed score because “optimize images” is one of the priorities.
In this article we’ve put 13 free PNG compressor tools (online, command line, desktop) to the test to find the one that produces the smallest file size.Two 8-bit and 24-bit PNG files are compressed using the 13 free image compression tools listed below. The list consists of command line tools, desktop programs and online services. Command line tools are more flexible for automation in batch files but require you to type in the full command including option switches and path. A desktop tool is an easier to use program with a graphical user interface that normally requires a few mouse clicks to work. Finally online services are applications hosted on remote servers where the processing is done on the server and the user doesn’t need to install any third party software.
To view the compression test results and summary, they can be found on page 2.
Command Line Tools
advpng is part of AdvanceCOMP that contains multiple free utilities to recompress PNG, ZIP, MNG and GZ files. advpng hasn’t been updated since 2005 but the compression speed and results will surprise you. Older machines with slower hardware specifications takes slightly longer to process while the newer multi-core CPU takes only a second to produce amazing results.
advpng maximum compression command:
advpng.exe -z4 file.png
OptiPNG is another open source command line PNG compressor that supports Windows and Linux operating system. Both stable and development versions are available to download. Do take note that the maximum command line compression for the stable and development versions are slightly different. The highest level of compression for the OptiPNG stable is -o7 while the development is only -o6. If you try to force -o7 on the development build, you will still get the same file size as -o6.
OptiPNG stable maximum compression command:
optipng.exe -o7 file.png
OptiPNG development maximum compression command:
optipng-hg-latest-win32 -o6 file.png
Pngcrush is also a commandline application that attempts to optimize PNG images by trying out different compression levels and PNG filter methods. If you use the -brute switch, Pngcrush will test the image with 148 methods to find the one that gives the best compression.
Pngcrush maximum compression command:
Pngcrush.exe -brute file.png output.png
PngOptimizer comes with a simple graphical user interface program and all you need to do is drag the images that you want to compress to the program’s window, and also a command line application that runs in command prompt. Other than cleaning up wrong/useless information on PNG to reduce the file size, it can also support animated PNG format (apng) which is still uncommon today. You can either specify the exact file name to optimize or can even use the asterisk character as a wildcard.
PngOptimizerCL maximum compression command:
Unlike most of the command line PNG optimizers, PNGOUT is not open source because the compression algorithm is incorporated into their commercial GUI version called PNGOUTWin that has batch processing and multi-core CPU support. Although it is not open source, you can find pre-compiled binaries for Windows, Linux, BSD and Mac OS X. PNGOUT is one of the easiest to use because by default it uses the highest Xtreme compression algorithm for optimization without specifying an additional command line switch.
PNGOUT maximum compression command:
ScriptPNG is actually a batch file that is capable of running up to 10 PNG compressors to optimize an image file. Selecting the ultra brute option number 9 will use the maximum compression options to produce the smallest file size but taking more time to complete the optimization process. All you need to do is drag and drop your PNG files to the program from Explorer and followed by selecting one of the 9 available options.
TruePNG only supports PNG files unlike some of the PNG compressors above that can attempt to convert other image formats such as JPEG and GIF into PNG if it is able to achieve a smaller file size.
TruePNG maximum compression command:
TruePNG.exe input.png /o max
PNGGauntlet is actually a front-end tool that uses 3 different PNG optimizers (PNGOUT, OptiPNG, and DeflOpt) to further compress PNG files instead of normally using just 1. The usage of 3 compressors does increase the time taken to compress the PNG files but definitely yields a smaller file size. A nice feature found in PNGGauntlet is the ability to automatically queue multiple files for batch processing. The default options from the Tools menu are already best (maximum) settings unless you want to preserve the PNG metadata, use grayscale color type and etc. Microsoft .NET Framework 4 is required to run.