PNG Optimization Tools Overview

this is an overview of PNG optimization tools. you will find here some tests and descriptions about them and how they optimize PNG files. also, you may be interested by the PNG Test Corpus (more oriented end-users)

up-to-date, Web tools

you can find a lot of tools on Web to optimize PNG. most of them are actually using well-known tool without any improvements (wrappers or front-end). here's a fast overview of tools:

advdef

advancemame.it by Andrea Mazzoleni (2002) — Tested: 2.00

advdef -z -2 image.png

advdef is a free, open source and lossless deflate stream recompressor by Andrea Mazzoleni, from AdvanceCOMP project. this tool could be considered as a compressor: it does not do trials or change file specifications but the bitdepth — that is always rewritten to 8 bits / pixels.

AdvDef

  • advdef is able to use several deflate compression algorithms, according to the level you choose: no compression, zlib, libdeflate, the deflate from 7-zip or Zopfli.
  • default option uses libdeflate, which is a heavily optimized implementation of deflate. it should compresses faster and better than the standard zlib. results are usually close to the deflate from 7-zip and is most of the time much faster.

Efficient Compression Tool

Efficient Compression Tool by Felix Hanau (2015) — Tested: 0.7 (fff194d)

ect -s file.png

ECT is a free, open source and visually lossless JPG and PNG optimizer by Felix Hanau. it uses OptiPNG for the fast mode and ZopfliPNG for stronger compression. it uses an optimized version of the libraries used by those tools, that make ECT much faster. it includes nice improvements for dirty transparency, and let the user to combine trials with order of entries in palette.

Efficient Compression Tool

  • ECT speed can be improved with multithreading, which is block based and disabled by default. if enabled, it should be able to compress faster, with a bit worse compression however
  • it uses a modified version of OptiPNG: it includes the dirty transparency, the optimized zlib from clouflare, that make it faster and could offer better compression
  • it uses a modified zopfli that let the tool to compress much faster and better than the original zopfli. also, it includes more advanced reductions than ZopfliPNG (better dirty transparency, etc.)

Median Cut PNG Posterizer

Median Cut PNG Posterizer by Kornel Lesiński (2011) — Tested: 2.1 (2015)

posterize -b -q 90 image.png lossy-filter.png

Median Cut PNG Posterizer is a free, open source and lossy PNG compressor. It has two distincts mode: the lossy blurizer, that change data to make it more compressible with the average filter, or the posterizer way, that reduces the number of colors without conversion to palette mode. in both cases, the operation is lossy but should reduce filesize significantly.

Median Cut PNG Posterizer

OptiPNG

OptiPNG by Cosmin Truta (2001) — Tested: 0.7.6

optipng -o3 image.png 

OptiPNG is a free, open source and visually lossless PNG optimizer by Cosmin Truta. it is mainly based on PNGCrush, but it performs trials in memory and does all internals reductions automatically. that should be not necessary to perform too much trials with OptiPNG; it should be better to use a better compression algorithm in complement, such as libdeflate.

OptiPNG

pingo

pingo by Cédric Louvrier (myself) (2016) — Tested: 0.85

pingo myfolder

pingo is an experimental, free, closed source and visually lossless or lossy JPG and PNG optimizer. it processes files or folders recursively with a file based multi-processing system. it is an experimental fork of ECT with various changes, essentially based on file specifications

pingo

  • pingo does reductions over iterations by transforming data to make it more compressible and doing less iterations to be faster. unlike other tools, you can not tweak or bruteforce the encoder with settings or trials: pingo should try to determine by itself what is the near-optimal solution by doing minimal but effective internal trials
  • auto-mode: if you do not provide any option, pingo will try to reduce filesize automatically beyond the scope of lossless compression. it will adapt many things by itself like the lossy quality (number of colors, lossy filter settings ect.), the evaluation of conversion from PNG to JPG if applicable and better, and lossless stuff like compression settings
  • pingo can do lossy, mainly by using the conversion to paletted mode or the lossy filtering for PNG, or by selecting the mozjpeg quality for JPG. While the profiles have quality controls, you should be able to force conversion with the right option. if you do not set a value, pingo could try to determine the lossy level

pngcrush

pngcrush by Glenn Randers-Pehrson (1999) — Tested: 1.8.7

pngcrush -blacken -reduce image.png 

pngcrush is a free, open source and visually lossless PNG optimizer by Glenn Randers-Pehrson who also wrote parts of PNG specifications. it is probably one of the first public PNG optimizer, and most of tools are inspired from it. to be used well, you actually have to know how PNG works, because the tool do not provide profiles, but lot of options.

pngcrush

PngOptimizer

PngOptimizer by Hadrien Nilsson (2003) — Tested: 2.5.1

pngoptimizercl -file :"image.png"

PngOptimizer is a free, open source and visually lossless PNG optimizer by Hadrien Nilsson. it exists as command line or with a very simple GUI that allow drag-and-drop of files or folders, and does all of major reductions — colortype trials, basic dirty transparency support. PngOptimizer also support APNG optimization, and can convert some formats (GIF, TGA, etc.) to PNG.

PngOptimizer CL

  • PngOptimizer speed is significantly increased since version 2.5 while preserving the same compression ratio. it processes files or folders (eventually recursively) with a file based multi-processing system

PNGOUT

PNGOUT by Ken Silverman (2002) — Tested: 02/13/2015

pngout image.png

PNGOUT is a free, closed source and lossless PNG optimizer by Ken Silverman. used with right options, it compresses usually better than other tool that uses zlib, thanks to its compression algorithm ks-flate. PNGOUT is slow but offers better compression with an advanced block splitter. this tool is also great for trials, and can beat zopfli on some samples. however, it does not perform image reductions automatically; for Web usage, it should be more efficient to use an optimizer first.

PNGOUT

  • PNGOUT uses its own heuristic filter called mixed that is not the one described in W3C specification. this let the tool to compress some samples better.
  • -c3 option always rewrites entries in palette using popularity-like sorting, unlike the default option that take into consideration the initial order.

pngquant

pngquant by Kornel Lesiński (2010) — Tested: 2.8.0

pngquant image.png

pngquant is a free, open source and lossy PNG converter. it transforms RGB/A PNG to indexed-color PNG — 256 colors maximum — using a nicely modified median-cut algorithm. the filesize is usually reduce by half or more thanks to the conversion to palette type. it works fine on most of simple images, but due to the color limitation, it requires some quality control.

pngquant

  • be sure to use the latest version maintened by Kornel Lesiński, not the old one. there were huge improvements since version 1.x: quality and compression are much better.

pngwolf

pngwolf by Björn Höhrmann (2010) — Tested: 1.1.1

pngwolf --in=image.png --out=image.png

original pngwolf is a free, open source and lossless PNG filter finder by Björn Höhrmann. this tool uses a genetic algorithm to find better filter combination and selects the one that compresses better. used well, it should be able to find a better filtering solution than most of other PNG optimizers.

pngwolf

  • pngwolf is using the deflate from 7-zip for data, but it exists a variant that use libdeflate or zopfli instead. this pngwolf fork is maintened by Jørgen Ibsen. it could use libdeflate for the estimator that should be faster and more precise than zlib in some cases.

TruePNG

TruePNG by x128 (2010) — Tested: 0.6.2.2

truepng image.png

TruePNG is a free, closed source and visually lossless or lossy PNG optimizer by x128. it does most of image reductions with trials that let the tool to perform better than other optimizers. however, data could be compressed more with other tools like advdef, by using libdeflate or zopfli. the TruePNG tutorial describes how it actually works. it is not only an optimizer and can do lossy with color quantization or lossy filter.

TruePNG

  • TruePNG is one of the first command line tool to use another way for sorting entries in palette. that let the tool to reduce filesize more than other
  • TruePNG picks the best result from some trials it could run. it could make the tool a bit slower with large files when user request -a1 option.

ZopfliPNG

ZopfliPNG by Lode Vandevenne, Jyrki Alakuijala (2013) — Tested: 6818a08

zopflipng --lossy_transparent image.png

ZopfliPNG is a free, open source and visually lossless PNG optimizer by Lode Vandevenne and Jyrki Alakuijala. it uses lodepng library and zopfli compression algorithm. the tool is able to do some important reductions for Web, including dirty transparency. as pure compressor, the tool is usually able to compress a bit more than KS-Flate — PNGOUT.

ZopfliPNG

  • there are lot of fork from zopfli, and some of them provide better speed or results. ECT uses an heavily modified version of ZopfliPNG, and should run far faster than this original version.

other tools

advpng

advancemame.it by Andrea Mazzoleni (2002) — Tested: 2.00

advpng -z -2 image.png

advpng is a free, open source and lossless PNG recompressor by Andrea Mazzoleni, from AdvanceCOMP project. this tool is a more a snapshot compressor than an optimizer for Web: it always rewrites files with none filter, does not support any reductions or some colortype. if you plan to use your files for Web, it should be more efficient to use an optimizer and advdef instead

AdvPNG

  • grayscale is not supported, so every image that are losslessly stored as grayscale could not be compressed by this tool. also, it does not support image reductions or filtering, and is not able to remove unnecessary chunks.

cryopng

cryopng by Frédéric Kayser (2010) — Tested: 0.7.5

cryopng -o3 image.png

cryopng is a free, open source and visually lossless PNG reducer by Frédéric Kayser. it is mainly based on OptiPNG with a transformation at the filter level of RGB values that are not displayed — where alpha is 0. this could improve compression for RGBA files on some cases. some of those transformations are now included in few optimizers, but it is still good for trials

this tool might not be maintained much anymore

CryoPNG

DeflOpt

DeflOpt by Ben Jos Walbeehm (2006) — Tested: 2.07

deflopt image.png

DeflOpt is a free, closed source and lossless deflate optimizer by Ben Jos Walbeehm. it cleans huffman symbols and does other tricks to optimize the deflate structure. however, the tool does not optimize, recompress or do trials on files. still, the process is fast and should save some bytes after zlib, KS-Flate or even zopfli compression algorithms

this tool might not be maintained much anymore

DeflOpt

defluff

defluff by Joachim Henke (2010) — Tested: 0.3.2

defluff < in.png > out.png

defluff is a free, closed source and lossless deflate optimizer by Joachim Henke. this project is very close to DeflOpt: it tries to optimize the deflate stream but with different implementations. therefore, they both can be combined to get a smaller filesize. like Deflopt, defluff does not compress or optimize file, so it should be used at the end of process. this tool might not be maintained much anymore

this tool might not be maintained much anymore

defluff

pngrewrite

pngrewrite by Jason Summers (2000) — Tested: 1.4.0

pngrewrite in.png out.png

pngrewrite is a free, open source and lossless PNG optimizer by Jason Summers. it rewrites the entries in palette by using popularity sorting (also, it removes duplicates or unnecessary entries). it could eventually reduce a PNG paletted to grayscale. pngrewrite does not handle any other PNG colortype if the output can not be paletted/grayscale. finally, note that those reductions are now included on most of other Web tools.

this tool might not be maintained much anymore

defluff