PNG-32 files are often associated to the super heavy division of image files, they tend to quickly become bulky since each pixel is associated to 4 components red, green, blue and alpha. The trick known as "dirty alpha cleaning" wipes off the RGB components of fully transparent pixels, basic "cleaners" replaces them by black more advanced "cleaners" use the color of nearby pixels to take advantage of PNG filtering.
PNG filtering is also an important point, for a long time the only heuristic used to choose the filter applied to each scanline of the image came from the PNG specifications (part 12.8 Filter selection) and is known as "smallest sum of absolute values", however PNGOUT used its own heuristic. In 2011 Björn Höhrmann took a different approach when he wrote pngwolf, he used a genetic algorithm, unfortunatelly this solution is a bit too slow to be used in production nevertheless his paper also described different heuristics that are now used by other PNG encoders.
The last important aspect is the quality of the Deflate engine used to perform the data compression, Zlib (and libpng) is well-known and often used, however Kflate (from Ken Silverman used in PNGOUT and KZIP), Zopfli (a Google project) and the deflate encoder from 7-Zip usually produce smaller compressed streams but at the expense of additional processing time.
File | Unoptimized | PNGcrush | PNGOUT | BlackOUT | ZopfliPNG | ImageOptim | ScriptPNG | cryogen2 |
---|---|---|---|---|---|---|---|---|
sample_00.png | 734 | 558 | 746 | 750 | 540 | 558 | 549 | 540 |
sample_01.png | 2783 | 2682 | 2791 | 2600 | 2537 | 2578 | 2501 | 2507 |
sample_02.png | 2805 | 2720 | 2803 | 2594 | 2635 | 2652 | 2558 | 2544 |
sample_03.png | 3998 | 3777 | 3991 | 3663 | 3688 | 3718 | 3621 | 3618 |
sample_04.png | 4345 | 3492 | 4327 | 3261 | 3295 | 3395 | 3187 | 3133 |
sample_05.png | 5150 | 4543 | 5135 | 4304 | 4230 | 4259 | 4198 | 4224 |
sample_06.png | 5163 | 4528 | 5147 | 4270 | 4206 | 4226 | 4148 | 4201 |
sample_07.png | 5425 | 5347 | 5433 | 5433 | 5177 | 5214 | 5210 | 5177 |
sample_08.png | 5570 | 5055 | 5576 | 4962 | 4949 | 4969 | 4854 | 4814 |
sample_09.png | 5621 | 5279 | 5605 | 5038 | 4975 | 5009 | 4912 | 4924 |
sample_10.png | 5827 | 5546 | 5829 | 5420 | 5389 | 5421 | 5306 | 5261 |
sample_11.png | 6538 | 5424 | 6530 | 5299 | 5429 | 5296 | 5314 | 5248 |
sample_12.png | 6556 | 5913 | 6594 | 5811 | 5805 | 5828 | 5716 | 5680 |
sample_13.png | 7032 | 5513 | 7028 | 5347 | 5200 | 5217 | 5101 | 4941 |
sample_14.png | 7258 | 7213 | 7251 | 7024 | 6948 | 6985 | 6997 | 6917 |
sample_15.png | 7376 | 5954 | 7370 | 6643 | 6041 | 5865 | 5819 | 5771 |
sample_16.png | 7594 | 6528 | 7592 | 6323 | 6447 | 6469 | 6282 | 6259 |
sample_17.png | 7778 | 6906 | 7750 | 6634 | 6395 | 6461 | 6219 | 6234 |
sample_18.png | 8828 | 8810 | 8779 | 8762 | 8070 | 8118 | 7987 | 8069 |
sample_19.png | 8982 | 7951 | 9008 | 8453 | 7690 | 7731 | 7653 | 7627 |
sample_20.png | 9871 | 9145 | 9873 | 8750 | 8685 | 8732 | 8521 | 8622 |
sample_21.png | 10566 | 6038 | 10567 | 6865 | 5717 | 5749 | 5682 | 5673 |
sample_22.png | 10882 | 10184 | 10841 | 9608 | 9847 | 9864 | 9680 | 9477 |
sample_23.png | 10995 | 10218 | 10922 | 9800 | 9471 | 9497 | 9411 | 9367 |
sample_24.png | 11354 | 10505 | 11321 | 9834 | 10136 | 10183 | 9773 | 9744 |
sample_25.png | 11891 | 7359 | 11872 | 7028 | 6830 | 7061 | 6676 | 6620 |
sample_26.png | 12269 | 10062 | 12213 | 9456 | 9512 | 9595 | 9368 | 9309 |
sample_27.png | 12756 | 11007 | 12758 | 10685 | 10897 | 10951 | 10512 | 10538 |
sample_28.png | 12824 | 11638 | 12808 | 11357 | 11031 | 11090 | 11346 | 10855 |
sample_29.png | 12942 | 8999 | 12931 | 9011 | 8447 | 8613 | 8222 | 8346 |
sample_30.png | 14782 | 14486 | 14699 | 13842 | 13819 | 13901 | 13628 | 13548 |
sample_31.png | 14930 | 13998 | 14929 | 13709 | 13909 | 13880 | 13732 | 13772 |
sample_32.png | 15168 | 13449 | 15129 | 12943 | 12860 | 12881 | 12565 | 12710 |
sample_33.png | 15420 | 13087 | 15412 | 12901 | 13376 | 12904 | 12895 | 12849 |
sample_34.png | 15778 | 14636 | 15765 | 13833 | 14080 | 14111 | 13647 | 13681 |
sample_35.png | 15799 | 14629 | 15775 | 13824 | 13913 | 13957 | 13560 | 13571 | sample_36.png | 16283 | 15584 | 16253 | 14986 | 14561 | 15013 | 14550 | 14512 |
sample_37.png | 16318 | 15880 | 16259 | 14746 | 14837 | 14844 | 14769 | 14633 |
sample_38.png | 16805 | 16038 | 16799 | 15325 | 14760 | 15128 | 14764 | 14745 |
sample_39.png | 16940 | 13931 | 16934 | 13733 | 14020 | 13736 | 13672 | 13673 |
sample_40.png | 17274 | 15448 | 17241 | 14626 | 15043 | 14942 | 14403 | 14497 |
sample_41.png | 17548 | 16177 | 17510 | 15512 | 15593 | 15638 | 15366 | 15335 |
sample_42.png | 17605 | 14756 | 17629 | 14092 | 14287 | 14411 | 13843 | 13813 |
sample_43.png | 17718 | 14259 | 17675 | 13367 | 13713 | 13797 | 13334 | 13259 |
sample_44.png | 17777 | 16852 | 17750 | 16231 | 16357 | 16383 | 16146 | 16216 |
sample_45.png | 18289 | 18262 | 18222 | 17268 | 17226 | 17251 | 17251 | 17220 |
sample_46.png | 18536 | 14995 | 18511 | 14741 | 14882 | 14803 | 14555 | 14471 |
sample_47.png | 18584 | 16423 | 18554 | 15758 | 16078 | 15961 | 15613 | 15520 |
sample_48.png | 20086 | 17793 | 20170 | 17147 | 17390 | 17313 | 16940 | 17029 |
sample_49.png | 20129 | 19793 | 20110 | 18922 | 19001 | 19070 | 18846 | 18745 |
sample_50.png | 20302 | 19086 | 20302 | 18453 | 18028 | 18506 | 17543 | 17959 |
sample_51.png | 20395 | 19268 | 20380 | 18198 | 18246 | 18316 | 17988 | 17866 |
sample_52.png | 21026 | 20458 | 21081 | 19547 | 19338 | 19421 | 19171 | 19023 |
sample_53.png | 21557 | 20422 | 21490 | 19599 | 19715 | 19742 | 19346 | 19693 |
sample_54.png | 23855 | 22972 | 23837 | 22059 | 21999 | 22079 | 21908 | 21785 |
sample_55.png | 24789 | 23591 | 24779 | 22739 | 22962 | 23016 | 22386 | 22436 |
sample_56.png | 24897 | 14151 | 24751 | 14114 | 12779 | 12784 | 12382 | 11860 |
sample_57.png | 25390 | 22519 | 25385 | 22220 | 22541 | 22193 | 22162 | 22151 |
sample_58.png | 26475 | 23326 | 26458 | 22381 | 22651 | 22665 | 22367 | 22445 |
sample_59.png | 26733 | 25264 | 26678 | 23938 | 23852 | 23944 | 23711 | 23573 |
sample_60.png | 29500 | 29467 | 29487 | 27444 | 27277 | 27409 | 27369 | 27265 |
sample_61.png | 30994 | 30386 | 30910 | 29024 | 28360 | 28754 | 28178 | 28132 |
sample_62.png | 31938 | 31314 | 31921 | 30703 | 30532 | 30617 | 30578 | 30495 |
sample_63.png | 34633 | 31425 | 34593 | 30505 | 30185 | 30240 | 30151 | 30093 |
sample_64.png | 35044 | 28015 | 34998 | 26777 | 26798 | 26929 | 26261 | 26044 |
sample_65.png | 37644 | 36994 | 37595 | 34936 | 35089 | 35217 | 34656 | 34650 |
sample_66.png | 39790 | 29938 | 39738 | 27733 | 27057 | 26718 | 26046 | 25234 |
sample_67.png | 42907 | 41214 | 42889 | 40414 | 40613 | 40651 | 40172 | 40108 |
sample_68.png | 46395 | 32913 | 46384 | 32205 | 33425 | 32198 | 31902 | 31862 |
sample_69.png | 50055 | 44455 | 50009 | 43006 | 44219 | 43993 | 42723 | 43552 |
sample_70.png | 50059 | 46482 | 50044 | 43776 | 43686 | 43013 | 42644 | 42657 |
sample_71.png | 52806 | 26815 | 52772 | 29451 | 25680 | 25692 | 25629 | 25228 |
Total | 1290666 | 1129845 | 1289198 | 1091713 | 1084956 | 1085325 | 1066675 | 1064150 |
Percent | 100.00 | 87.54 | 99.88 | 84.59 | 84.06 | 84.09 | 82.65 | 82.45 |
Time (seconds) | tbd | tbd | tbd | tbd | tbd | tbd | tbd | tbd |
Some may argue that these samples could be turned into PNG-8 files to save even more bytes without too much apparent loss. And that’s exactly what has been done using pnquant…
File | PNG-32 | pngquant | +PNGcrush | +PNGOUT | +ZopfliPNG | +ImageOptim | +ScriptPNG | +cryogen2 |
---|---|---|---|---|---|---|---|---|
sample_00.png | 734 | 768 | x | x | x | x | x | x |
sample_01.png | 2783 | 2120 | x | x | x | x | x | x |
sample_02.png | 2805 | 2024 | x | x | x | x | x | x |
sample_03.png | 3998 | 2378 | x | x | x | x | x | x |
sample_04.png | 4345 | 2493 | x | x | x | x | x | x |
sample_05.png | 5150 | 3279 | x | x | x | x | x | x |
sample_06.png | 5163 | 3263 | x | x | x | x | x | x |
sample_07.png | 5425 | 3465 | x | x | x | x | x | x |
sample_08.png | 5570 | 2622 | x | x | x | x | x | x |
sample_09.png | 5621 | 3310 | x | x | x | x | x | x |
sample_10.png | 5827 | 2593 | x | x | x | x | x | x |
sample_11.png | 6538 | 2832 | x | x | x | x | x | x |
sample_12.png | 6556 | 3038 | x | x | x | x | x | x |
sample_13.png | 7032 | 2470 | x | x | x | x | x | x |
sample_14.png | 7258 | 4767 | x | x | x | x | x | x |
sample_15.png | 7376 | 2857 | x | x | x | x | x | x |
sample_16.png | 7594 | 3255 | x | x | x | x | x | x |
sample_17.png | 7778 | 4032 | x | x | x | x | x | x |
sample_18.png | 8828 | 6151 | x | x | x | x | x | x |
sample_19.png | 8982 | 4663 | x | x | x | x | x | x |
sample_20.png | 9871 | 3823 | x | x | x | x | x | x |
sample_21.png | 10566 | 4361 | x | x | x | x | x | x |
sample_22.png | 10882 | 4691 | x | x | x | x | x | x |
sample_23.png | 10995 | 6460 | x | x | x | x | x | x |
sample_24.png | 11354 | 5591 | x | x | x | x | x | x |
sample_25.png | 11891 | 4040 | x | x | x | x | x | x |
sample_26.png | 12269 | 5137 | x | x | x | x | x | x |
sample_27.png | 12756 | 6760 | x | x | x | x | x | x |
sample_28.png | 12824 | 5559 | x | x | x | x | x | x |
sample_29.png | 12942 | 5742 | x | x | x | x | x | x |
sample_30.png | 14782 | 5824 | x | x | x | x | x | x |
sample_31.png | 14930 | 5838 | x | x | x | x | x | x |
sample_32.png | 15168 | 5683 | x | x | x | x | x | x |
sample_33.png | 15420 | 5166 | x | x | x | x | x | x |
sample_34.png | 15778 | 5565 | x | x | x | x | x | x |
sample_35.png | 15799 | 6996 | x | x | x | x | x | x | sample_36.png | 16283 | 6354 | x | x | x | x | x | x |
sample_37.png | 16318 | 6496 | x | x | x | x | x | x |
sample_38.png | 16805 | 6266 | x | x | x | x | x | x |
sample_39.png | 16940 | 5278 | x | x | x | x | x | x |
sample_40.png | 17274 | 5159 | x | x | x | x | x | x |
sample_41.png | 17548 | 5660 | x | x | x | x | x | x |
sample_42.png | 17605 | 5430 | x | x | x | x | x | x |
sample_43.png | 17718 | 6282 | x | x | x | x | x | x |
sample_44.png | 17777 | 6708 | x | x | x | x | x | x |
sample_45.png | 18289 | 7275 | x | x | x | x | x | x |
sample_46.png | 18536 | 6522 | x | x | x | x | x | x |
sample_47.png | 18584 | 5935 | x | x | x | x | x | x |
sample_48.png | 20086 | 7697 | x | x | x | x | x | x |
sample_49.png | 20129 | 6262 | x | x | x | x | x | x |
sample_50.png | 20302 | 7696 | x | x | x | x | x | x |
sample_51.png | 20395 | 6436 | x | x | x | x | x | x |
sample_52.png | 21026 | 10115 | x | x | x | x | x | x |
sample_53.png | 21557 | 5880 | x | x | x | x | x | x |
sample_54.png | 23855 | 9502 | x | x | x | x | x | x |
sample_55.png | 24789 | 7358 | x | x | x | x | x | x |
sample_56.png | 24897 | 8911 | x | x | x | x | x | x |
sample_57.png | 25390 | 7553 | x | x | x | x | x | x |
sample_58.png | 26475 | 7176 | x | x | x | x | x | x |
sample_59.png | 26733 | 9213 | x | x | x | x | x | x |
sample_60.png | 29500 | 9275 | x | x | x | x | x | x |
sample_61.png | 30994 | 9812 | x | x | x | x | x | x |
sample_62.png | 31938 | 8500 | x | x | x | x | x | x |
sample_63.png | 34633 | 9993 | x | x | x | x | x | x |
sample_64.png | 35044 | 10382 | x | x | x | x | x | x |
sample_65.png | 37644 | 8769 | x | x | x | x | x | x |
sample_66.png | 39790 | 10189 | x | x | x | x | x | x |
sample_67.png | 42907 | 13032 | x | x | x | x | x | x |
sample_68.png | 46395 | 10056 | x | x | x | x | x | x |
sample_69.png | 50055 | 16276 | x | x | x | x | x | x |
sample_70.png | 50059 | 15644 | x | x | x | x | x | x |
sample_71.png | 52806 | 11368 | x | x | x | x | x | x |
Total | 1290666 | 450076 | 449884 | 430216 | 433884 | x | x | x |
Percent | 100.00 | 34.87 | 34.85 | 33.33 | 33.61 | x | x | x |
Time (seconds) | tbd | tbd | tbd | tbd | tbd | tbd | tbd | tbd |