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,
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.