Open Markus00000 opened 9 years ago
RFG is using pngquant. It has at least one advantage: by the time, I know the pictures it generates work everywhere.
I'll run some tests on a large sample of pictures to compare both tools.
If you run a test, consider including pngcrush
. I have done a (very small) test and its optimization was identical to optipng
. It might be faster. Both are lossless, at least by default.
Assuming the output files were compatible and the optimization was fast enough, you could keep the six compression options (under the compression tab) using pngquant
or pngnq
and just losslessly optimize all their output files with optipng
or pngcrush
.
In my test, pngquant
and pngnq
produced identical file sizes with default options. Again, one might be faster.
+1 for optipng.
Also https://tinypng.com/ shows the PNGs could be optimized further. They also offer an API for doing this, but it is only free for few pictures.
Actually TinyPNG was the very first solution RFG used to compress icons. But I preferred using a local tool. After all RFG already calls ImageMagick, so it's natural to use PNGQuant (the current tool) or OptiPNG (the probable next one).
The next action here is to run a test on a few hundred packages with:
And compare :
And I also need to understand the losslessness of these tools. For example PNGQuant is "a bit" lossy.
You could also try zopflipng “to perform very good, but slow, deflate or zlib compression.”
Running
optipng -o7
reduced the size of several PNGs by up to 20%. I used OptiPNG version 0.7.5. The icons used the high quality, low compression factor.I am not sure if the optimization causes any problems. So far I have not seen any.
Server load might be an issue, too.