ImageMagick: Lossless max compression for PNG?

后端 未结 5 1453
孤城傲影
孤城傲影 2020-12-23 14:03

I\'d like to achieve a maximum amount of compression when saving to a lossless PNG using ImageMagick. I\'m doing batch conversion of many PSDs.

I tried a few things,

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-23 14:41

    The deflate compression algorithm uses a 65K history window. PNG compression tends to be rather slow because the process has to compare byte sequences in the compression stream with the those in the window.

    You can control the speed of the compression by limiting the search of window. You might only search half the buffer for matches to speed up the process (as the risk of lower compression).

    In JPEG, the tradeoff is between quality and size. In PNG compression, the tradeoff is between speed and size.

    In any event, the PNG compression process is always lossless.

提交回复
热议问题