3 ms·
Are the reported Zopfli numbers for PNGs achieved by recompressing the original, or by recompressing the output of PNGout? The wikipedia page for PNGout says >
by eridius 11y ago
Are the reported Zopfli numbers for PNGs achieved by recompressing the original, or by recompressing the output of PNGout? The wikipedia page for PNGout says
> PNGOUT also performs automatic bit depth, color, and palette reduction where appropriate.
Assuming the Zopfli numbers were created by recompressing the original, I wonder if there's any further savings to be had by recompressing the output of PNGout?
Alternatively, PNGcrush can also do the same sort of lossless bit depth and palette reduction, so I'd be curious about the combination of PNGcrush + Zopfli as well.
- danielvf 11y agoThat doesn't matter - both systems decompress the losses PNGs before recompressing them.
- HeyImAlex 11y agoIt does kind of matter, because compression isn't the only form of optimization that can be done. Consider a 32 bit png that is actually bilevel with no transparency. If zopfli just recompresses, PNGOut will still make smaller output because it does bit depth reductions.
- danielvf 11y agoThe zopfliPNG program does do bit depth reduction if that's possible. It even tests to see if a given small image that would be possible to bit depth reduce would actually be smaller by it keeping 32 bit, since the added pallet overhead may cost more than the gain of a smaller pixel storage cost.
- monochromatic 11y agoZopfli is a general purpose compressor. It's not unpacking the png data before compressing it.
- danielvf 11y agoIt does decompress the source PNG and build a new file from the pixels. You can see the source here. https://github.com/google/zopfli/blob/master/src/zopflipng/zopflipng_lib.cc https://github.com/google/zopfli/blob/master/src/zopflipng/z...
- eridius 11y agoThat's why I explicitly mentioned the bit depth, color, and palette reduction. That's stuff that's not related to the specific DEFLATE-compatible encoder used.
- danielvf 11y agoZopfliPNG is not just changing the encoding algorithm - it's using the full suite of ping compression tricks and it is indeed starting from the decompressed pixels. Check the source or try using both programs in a row and compare the size to ZopfliPNG alone. (Why the down vote?)