Home > PNG Tools Overview

PNG Tools Overview

An overview of differents PNG optimization tools, including pure compressors. They are tested with differents PNG files with special charactestics that require a good optimization routine to determine the best output settings. List of tools tested:


AdvanceCOMP

See Website - Version tested: 1.15 - Type: Compressor

This project is no longer updated since 2002. AdvPNG is a pure compressor that uses LZMA (7-zip), and it operates some optimizations on the PNG characteristics (it removes unnecessary chunks, compacts iDAT, and tries 8 bits/pixels test when image contains 16 colors or less).

advpng 1.15 (Option used :-z -4)
File Tested Result Input Size Output Size
16-colors-best-encoded-as-8bits.png Good 7223 6006
255-bad-trns-values.png Bad 2547 2052
256-entries-to-17.png Bad 1243 1023
alpha-channel-filtered-grayscale.png Good 11349 11271
alpha-channel-filtered-rgba.png Good 11259 11886
bad-transparacy-truecolor-alpha.png Bad 85864 78376
compact-idat-chunk.png Good 17193 10056
data-png-header.png Good 5129 306
dirty-data-rbg.png Bad 90027 86036
filtering-each-line.png Bad 181408 181408
grayscale-alpha-filter.png Bad 21692 Not Supported
grayscale-alpha-to-grayscale-trns.png Bad 7032 Not Supported
grayscale-alpha-to-paletted.png Bad 18708 Not Supported
low-compression-huffman-only-is-better.png Bad 173207 171473
order-entries-in-palette.png Bad 24834 18403
paletted-as-grayscale.png Bad 17304 Not Supported
paletted-to-truecolor.png Bad 1362 1365
truecolor-alpha-as-filtered-paletted.png Bad 72038 67144
truecolor-alpha-filter.png Bad 46912 43414
truecolor-alpha-to-grayscale-alpha.png Bad 97074 89625
truecolor-alpha-to-paletted-trns.png Bad 32473 25658
truecolor-alpha-to-truecolor-trns.png Bad 16653 15515
truecolor-to-paletted-67-colors.png Bad 1920 1063
Total: 24 Files 5/24 944821 894224

AdvPNG saved 50597 Bytes (5,36 %). To use to its advantage, you should run AdvDef (not AdvPNG) after another PNG optimizer utility, capable of performing tests on ColorType, filters, etc. Used alone, it is less efficient because it allows only a few images reductions, and it does not support GrayScale formats.


CryoPNG

See Website - Version tested: 0.6.4 - Type: RGB+Alpha optimizer

This project is credited OptiPNG, but it is actually a modification of OptiPNG, called CryoPNG. This utility can be used on TrueColor + Alpha PNG, and lets you change the RGB space of a PNG file in order to optimize the filtering. It can convert black pixels using existing filters.

cryopng 0.6.4 (Option used :-o7)
File Tested Result Input Size Output Size
16-colors-best-encoded-as-8bits.png Bad 7223 Not Supported
255-bad-trns-values.png Bad 2547 Not Supported
256-entries-to-17.png Bad 1243 Not Supported
alpha-channel-filtered-grayscale.png Bad 11349 9563
alpha-channel-filtered-rgba.png Correct 11259 9420
bad-transparacy-truecolor-alpha.png Correct 85864 995
compact-idat-chunk.png Good 17193 10563
data-png-header.png Bad 5129 Not Supported
dirty-data-rbg.png Good 90027 44923
filtering-each-line.png Bad 181408 Not Supported
grayscale-alpha-filter.png Bad 21692 Not Supported
grayscale-alpha-to-grayscale-trns.png Bad 7032 Not Supported
grayscale-alpha-to-paletted.png Bad 18708 Not Supported
low-compression-huffman-only-is-better.png Bad 173207 Not Supported
order-entries-in-palette.png Bad 24834 Not Supported
paletted-as-grayscale.png Bad 17304 Not Supported
paletted-to-truecolor.png Bad 1362 Not Supported
truecolor-alpha-as-filtered-paletted.png Bad 72038 28869
truecolor-alpha-filter.png Bad 46912 39791
truecolor-alpha-to-grayscale-alpha.png Bad 97074 54359
truecolor-alpha-to-paletted-trns.png Bad 32473 27655
truecolor-alpha-to-truecolor-trns.png Bad 16653 10203
truecolor-to-paletted-67-colors.png Bad 1920 Not Supported
Total: 24 Files 3/24 944821 700120

CryoPNG saved 244701 Bytes (25,90 %). Although it can not process all files, CryoPNG can significantly reduce the weight, because it destroys (or changes) RGB values ​​that will not be returned in a Web browser. You can use it only on TrueColor + Alpha PNG, and can be supplemented by a compressor.


OptiPNG

See Website - Version tested: 0.6.5 - Type: Optimizer

This project is based on PNGCrush. According to the author, it's running faster because all trials are performed in memory. It also includes parts of PNGRewrite code for some images reductions. OptiPNG is used by a lot of optimizers, including onlines services as SmushIt.

optipng 0.6.5 (Option used :-o7)
File Tested Result Input Size Output Size
16-colors-best-encoded-as-8bits.png Bad 7223 6700
255-bad-trns-values.png Bad 2547 2051
256-entries-to-17.png Good 1243 303
alpha-channel-filtered-grayscale.png Good 11349 7827
alpha-channel-filtered-rgba.png Good 11259 9463
bad-transparacy-truecolor-alpha.png Bad 85864 68796
compact-idat-chunk.png Good 17193 10563
data-png-header.png Bad 5129 4905
dirty-data-rbg.png Bad 90027 63955
filtering-each-line.png Good 181408 757
grayscale-alpha-filter.png Bad 21692 18885
grayscale-alpha-to-grayscale-trns.png Good 7032 4308
grayscale-alpha-to-paletted.png Good 18708 13832
low-compression-huffman-only-is-better.png Good 173207 100444
order-entries-in-palette.png Bad 24834 19296
paletted-as-grayscale.png Bad 17304 15571
paletted-to-truecolor.png Bad 1362 1058
truecolor-alpha-as-filtered-paletted.png Bad 72038 60638
truecolor-alpha-filter.png Bad 46912 41937
truecolor-alpha-to-grayscale-alpha.png Bad 97074 76654
truecolor-alpha-to-paletted-trns.png Bad 32473 20012
truecolor-alpha-to-truecolor-trns.png Bad 16653 10227
truecolor-to-paletted-67-colors.png Bad 1920 1104
Total: 24 Files 8/24 944821 559486

OptiPNG saved 385335 Bytes (40,78 %). OptiPNG is a moderate optimizer, and run a good compression routine, but it should be more efficient if it runs others optimization tricks. It does not support RGB filtering, or other images reductions which can be very useful and efficient for Web.


PNGCrush

See Website - Version tested: 1.7.15 - Type: Optimizer

Pngcrush is one of the first optimization utilities for PNG, published in 1998. The author also wrote the specifications of PNG. PNGCrush has a lot of options, and most of tools are based on it (OptiPNG, TruePNG, and indirectly all optimizers based on OptiPNG as SmushIt).

pngcrush 1.7.15
File Tested Option Result Input Size Output Size
16-colors-best-encoded-as-8bits.png -bit_depth 8 Good 7223 6630
255-bad-trns-values.png Bug! Bad 2547 2051
256-entries-to-17.png -plte_len 17 Good 1243 303
alpha-channel-filtered-grayscale.png -c 4 -brute Good 11349 7827
alpha-channel-filtered-rgba.png -brute Good 11259 9463
bad-transparacy-truecolor-alpha.png -brute Bad 85864 69307
compact-idat-chunk.png -brute Good 17193 10610
data-png-header.png -rem alla Good 5129 303
dirty-data-rbg.png -brute Bad 90027 62479
filtering-each-line.png -brute Good 181408 757
grayscale-alpha-filter.png -c 4 -brute Bad 21692 18885
grayscale-alpha-to-grayscale-trns.png -c 0 -brute Good 7032 3543
grayscale-alpha-to-paletted.png -reduce -brute Bad 18708 16074
low-compression-huffman-only-is-better.png -huffman Good 173207 100344
order-entries-in-palette.png -brute Bad 24834 19319
paletted-as-grayscale.png -reduce -brute Good 17304 15771
paletted-to-truecolor.png -c 2 -rem PLTE -brute Good 1362 459
truecolor-alpha-as-filtered-paletted.png -reduce -brute Bad 72038 60605
truecolor-alpha-filter.png -brute Bad 46912 41937
truecolor-alpha-to-grayscale-alpha.png -c 4 -brute Bad 97074 49886
truecolor-alpha-to-paletted-trns.png -reduce -brute Bad 32473 27687
truecolor-alpha-to-truecolor-trns.png -c 2 -brute Good 32473 9162
truecolor-to-paletted-67-colors.png -reduce -brute Bad 1920 1187
Total: 24 Files - 12/24 944821 536169

PNGCrush saved 408652 Bytes (43,25 %). To correctly use pngcrush, you must know the PNG specification, and control options of the utility, because without them, it is unlikely to get a properly optimized PNG. Others optimizers have the advantage to do that automatically.


PNGOptimizer

See Website - Version tested: 2.0 - Type: Optimizer

PngOptimizer is a very simple tool to use: there is no option for images reductions, it does it itself automatically (clean RGB space, palette optimizer, bitdepth reduction, etc.), and also does an average compression. Another good point, it's generally fast.

pngoptimizer 2.0
File Tested Result Input Size Output Size
16-colors-best-encoded-as-8bits.png Bad 7223 6697
255-bad-trns-values.png Good 2547 1825
256-entries-to-17.png Good 1243 307
alpha-channel-filtered-grayscale.png Bad 11349 10712
alpha-channel-filtered-rgba.png Bad 11259 10973
bad-transparacy-truecolor-alpha.png Correct 85864 761
compact-idat-chunk.png Good 17193 10564
data-png-header.png Good 5129 307
dirty-data-rbg.png Correct 90027 46768
filtering-each-line.png Good 181408 790
grayscale-alpha-filter.png Bad 21692 18925
grayscale-alpha-to-grayscale-trns.png Good 7032 4354
grayscale-alpha-to-paletted.png Bad 18708 18708
low-compression-huffman-only-is-better.png Correct 173207 102327
order-entries-in-palette.png Good 24834 15978
paletted-as-grayscale.png Bad 17304 15835
paletted-to-truecolor.png Bad 1362 1059
truecolor-alpha-as-filtered-paletted.png Bad 72038 28952
truecolor-alpha-filter.png Correct 46912 39374
truecolor-alpha-to-grayscale-alpha.png Bad 97074 54451
truecolor-alpha-to-paletted-trns.png Bad 32473 27657
truecolor-alpha-to-truecolor-trns.png Good 16653 9168
truecolor-to-paletted-67-colors.png Bad 1920 1100
Total: 24 Files 10/24 944821 427592

PNGOptimizer saved 517229 Bytes (54,74 %). It reduces all PNG Test Corpus files by more than 50%. This tool includes most of the critical images reductions, but there is still more improvement to do to get even better results. It can be completed by a good compressor.


PNGOUT

See Website - Version tested: 07/02/2011 - Type: Compressor/ Manual Optimizer

PNGOUT is undoubtedly the best PNG compressor, based on a modified algorithm of Deflate, called KFlate. It can also achieve images reductions, mainly manually. That's mean you've to know about PNG specifications to use it efficiently.

pngout 07/02/2011
File Tested Option Result Input Size Output Size
16-colors-best-encoded-as-8bits.png /c3 /f0 /d8 /n2 Good 7223 5900
255-bad-trns-values.png /c3 /f0 /n2 Good 2547 1766
256-entries-to-17.png /c3 /f0 /n1 Good 1243 305
alpha-channel-filtered-grayscale.png /c4 /f5 /n2 Good 11349 6974
alpha-channel-filtered-rgba.png /c6 /f5 /n5 Good 11259 8841
bad-transparacy-truecolor-alpha.png /c6 /f5 /n8 Bad 85864 66320
compact-idat-chunk.png /c6 /f0 /n1 Good 17193 9957
data-png-header.png /c3 /f0 /n1 Good 5129 305
dirty-data-rbg.png /c6 /f5 /n8 Bad 90027 62479
filtering-each-line.png /c2 /f5 /n1 Good 181408 751
grayscale-alpha-filter.png /c4 /f5 /n1 Bad 21692 17874
grayscale-alpha-to-grayscale-trns.png /c0 /f4 /n1 Good 7032 3389
grayscale-alpha-to-paletted.png /c3 /f0 /n5 Good 18708 13161
low-compression-huffman-only-is-better.png /s3 /c2 /f5 /n5 Good 173207 100168
order-entries-in-palette.png /c3 /f1 /n3 Bad 24834 20604
paletted-as-grayscale.png /c0 /f5 /d8 /n2 Bad 17304 15439
paletted-to-truecolor.png /c2 /f5 /n2 Good 1362 445
truecolor-alpha-as-filtered-paletted.png /c6 /f5 /n8 Bad 72038 57849
truecolor-alpha-filter.png /c6 /f5 /n3 Bad 46912 39812
truecolor-alpha-to-grayscale-alpha.png /c6 /f5 /n2 Bad 97074 72681
truecolor-alpha-to-paletted-trns.png /c3 /f0 /n4 Good 32473 19171
truecolor-alpha-to-truecolor-trns.png /c2 /f5 /n2 Good 16653 8745
truecolor-to-paletted-67-colors.png /c3 /f0 /n1 Good 1920 1039
Total: 24 Files - 16/24 944821 533990

PNGOUT saved 410831 Bytes (43,48 %). The best usage of PNGOUT is to run it after a good PNG optimizer, as TruePNG. You can use it as a pure compressor, because PNGOUT does not operate some images reductions for Web, as the cleaning of RGB space.


PNGRewrite

See Website - Version tested: 1.4.0 - Type: Paletted/GrayScale Optimizer

PNGRewrite is command-line utility that reduces the unnecessarily large palettes that some programs write into PNG files. It also optimizes transparency data, and reduces the bits-per-pixel if possible. It only runs on Paletted or GrayScale images.

pngrewrite 1.4.0
File Tested Result Input Size Output Size
16-colors-best-encoded-as-8bits.png Bad 7223 6683
255-bad-trns-values.png Good 2547 1829
256-entries-to-17.png Good 1243 307
alpha-channel-filtered-grayscale.png Bad 11349 Not Supported
alpha-channel-filtered-rgba.png Bad 11259 Not Supported
bad-transparacy-truecolor-alpha.png Bad 85864 Not Supported
compact-idat-chunk.png Bad 17193 Not Supported
data-png-header.png Good 5129 389
dirty-data-rbg.png Bad 90027 Not Supported
filtering-each-line.png Bad 181408 Not Supported
grayscale-alpha-filter.png Bad 21692 Not Supported
grayscale-alpha-to-grayscale-trns.png Good 7032 3548
grayscale-alpha-to-paletted.png Bad 18708 13783
low-compression-huffman-only-is-better.png Bad 173207 Not Supported
order-entries-in-palette.png Bad 24834 19319
paletted-as-grayscale.png Good 17304 15835
paletted-to-truecolor.png Bad 1362 1365
truecolor-alpha-as-filtered-paletted.png Bad 72038 Not Supported
truecolor-alpha-filter.png Bad 46912 Not Supported
truecolor-alpha-to-grayscale-alpha.png Bad 97074 Not Supported
truecolor-alpha-to-paletted-trns.png Good 32473 20049
truecolor-alpha-to-truecolor-trns.png Bad 16653 Not Supported
truecolor-to-paletted-67-colors.png Good 1920 1100
Total: 24 Files 6/24 944821 908983

PNGRewrite saved 35838 Bytes (3,79 %), without any comparison to others utility: it only works on Paletted images. Most of PNGRewrite tricks are included into others tools, as OptiPNG, which is using its code. This tool is today partially obsolete.


PNGWolf

See Website - Version tested: March 2011 - Type: Optimizer

pngwolf is a great PNG optimizer, which have the ability to test differents filtering methods. According to its author, it uses a genetic algorithm for finding the best scanline filter for each scanline in the image. It's very efficient on RGB (24-bit) or RGB+Alpha (32-bit).

pngwolf March 2011 (Option used :--7zip-mpass=15 --zlib-level=9)
File Tested Result Input Size Output Size
16-colors-best-encoded-as-8bits.png Bad 7223 6263
255-bad-trns-values.png Bad 2547 1993
256-entries-to-17.png Good 1243 1024
alpha-channel-filtered-grayscale.png Bad 11349 8828
alpha-channel-filtered-rgba.png Good 11259 8848
bad-transparacy-truecolor-alpha.png Bad 85864 984
compact-idat-chunk.png Good 17193 10030
data-png-header.png Bad 5129 4909
dirty-data-rbg.png Correct 90027 45632
filtering-each-line.png Good 181408 757
grayscale-alpha-filter.png Bad 21692 18004
grayscale-alpha-to-grayscale-trns.png Good 7032 4102
grayscale-alpha-to-paletted.png Bad 18708 14965
low-compression-huffman-only-is-better.png Correct 173207 106835
order-entries-in-palette.png Bad 24834 18251
paletted-as-grayscale.png Bad 17304 15480
paletted-to-truecolor.png Bad 1362 1058
truecolor-alpha-as-filtered-paletted.png Bad 72038 26266
truecolor-alpha-filter.png Correct 46912 37339
truecolor-alpha-to-grayscale-alpha.png Bad 97074 51910
truecolor-alpha-to-paletted-trns.png Bad 32473 25640
truecolor-alpha-to-truecolor-trns.png Good 16653 9683
truecolor-to-paletted-67-colors.png Bad 1920 1118
Total: 24 Files 7,5/24 944821 559486

PNGWolf saved 524907 Bytes (55,56 %). It is an excellent tool which can be useful for all filtered images (including Filtered Paletted images). It does not support yet any image reduction (except RGB Filtering with None Filter). Combined with PNGOUT and -ks -f6 option, you can get good results.


TruePNG

See Website - Version tested: 0.4.0.3 - Type: Optimizer

If you have to choose one, TruePNG is the must have tool, because it operates the most of images reductions (i've returned a lot of suggestions to its author, based on PNG Test Corpus files). Completed with PNGOUT, it gives excellent results — this combination is used by ScriptPNG.

truepng 0.4.0.3 (Option used :-o4 -a1)
File Tested Result Input Size Output Size
16-colors-best-encoded-as-8bits.png Good 7223 6647
255-bad-trns-values.png Good 2547 1766
256-entries-to-17.png Good 1243 303
alpha-channel-filtered-grayscale.png Good 11349 7512
alpha-channel-filtered-rgba.png Good 11259 9151
bad-transparacy-truecolor-alpha.png Good 85864 568
compact-idat-chunk.png Good 17193 10549
data-png-header.png Good 5129 319
dirty-data-rbg.png Good 90027 45173
filtering-each-line.png Good 181408 754
grayscale-alpha-filter.png Good 21692 17468
grayscale-alpha-to-grayscale-trns.png Good 7032 3537
grayscale-alpha-to-paletted.png Good 18708 13426
low-compression-huffman-only-is-better.png Good 173207 100360
order-entries-in-palette.png Good 24834 15361
paletted-as-grayscale.png Good 17304 14657
paletted-to-truecolor.png Good 1362 459
truecolor-alpha-as-filtered-paletted.png Good 72038 17241
truecolor-alpha-filter.png Good 46912 38996
truecolor-alpha-to-grayscale-alpha.png Good 97074 41296
truecolor-alpha-to-paletted-trns.png Good 32473 19894
truecolor-alpha-to-truecolor-trns.png Good 16653 9150
truecolor-to-paletted-67-colors.png Good 1920 1101
Total: 24 Files 24/24 944821 376628

TruePNG saved 568193 Bytes (60,14 %). It does RGB space cleaning, palette optimization, ColorType best choice, BitDepth reduction, etc. Thanks to that, it also achieves the best compression results. You can use PNGOUT to compress files further, using -ks -f6options.


Others Tools

DeflOpt

See Website - Type: Deflate Structure Optimizer

It removes garbage from PNG files, cleans huffman symbols and does others tricks to optimize the Deflate structure. It can save some extra bytes after any PNG compression process. You should use it after a PNG optimizer, and a PNG compressor.

defluff

See Website - Type: Deflate Structure Optimizer

This tool is very closed to DeflOpt, and does the same things with different strategies. To get bests results, you can use multiple combination of them, using that way:

deflopt -k "myfile.png"
defluff < "myfile.png" > "myfile-o.png"
deflopt -k "myfile-o.png"

PNGZopfli

See Website - Type: Compressor

PNGZopfli is a tool that uses the powerful Zopfli Deflation. It works like Advdef: you have to optimize your PNG before using PNGZopfli because it does not any reductions before compression.

Huffmix

See Website or Mirror- Type: Block code Optimizer for PNGOUT

Huffmix gets the best blocks results from two trials files created by PNGOUT, and creates a new output file with best results. It can let you to optimize trials results of PNGOUT.

PrePNG

See Website - Type: PNG Reset Tool

Prepng rewrite input PNG without compression, but with filtering step (delta, average, and Paeth). Setting no compression to a file can help to improve new trial compression.

pngquant

See Website - Type: Quantizer, converts to Paletted

pngquant — new version — uses modified version of Median Cut quantization algorithm. It converts PNG files to Paletted PNG (256 colors or less). It converts alpha channel to alpha values in palette. New version reloaded by Kornel Lesiński seems to be more efficient thant pngnq.

pngnq s9

See Website - Type: Quantizer, converts to Paletted

pngnq is based on pngquant, but it uses a different quantization algorithm that is more efficient than the old version of pngquant, and gives better quality / size ratio. Only produces PNG-8 (Palette images) with alpha values if necessary.

Color Quantizer

See Website - Type: Quantizer, Optimizer

Color Quantizer is a GUI which contains other programs, like PNGOUT, TruePNG, DeflOpt, jpegtran and Intel library for JPG. It uses a close quantizer than pngquant — new version —, but you can control lot of parameters in quantization.

PNGKT

See Website - Type: RGB Space Cleaner

PNGKT scans RGB values in the RGB space that are not displayed cause to the alpha channel. Corresponding RGB values to 0 with alpha channel are converted to 0,0,0. This can improve compression of PNG Truecolor+alpha files.

2012 - By LOUVRIER Cédric. Contact Me.