Recompress PNGs
Created by: rbrito
Hi there.
While I was testing my page with http://developers.google.com/speed/pagespeed/insights/ the tool told me:
Optimize images Properly formatting and compressing images can save many bytes of data. Optimize the following images to reduce their size by 1.1KiB (44% reduction).
Losslessly compressing http://cdn.mathjax.org/mathjax/2.3-latest/images/CloseX-31.png could save 1.1KiB (44% reduction).
It seems that this problem is reocurring, given issue #734 (closed), for instance. The savings of about 44% sound great, but I guess that Google is being conservative here:
$ optipng -o7 CloseX-31.png
(...)
Selecting parameters:
zc = 9 zm = 8 zs = 1 f = 0 IDAT size = 1194
Output IDAT size = 1194 bytes (1328 bytes decrease)
Output file size = 1449 bytes (1196 bytes = 45.22% decrease)
$ advpng -z3 CloseX-31.png
1449 1312 90% CloseX-31.png
1449 1312 90%
$ advpng -z4 -i 10 CloseX-31.png
1312 1269 96% CloseX-31.png
1312 1269 96%
In other words, I obtained a file with total size 1268, which, compared to the original, represents about 48%, considerably more than what Google suggests.
Anyway, even if we don't go after every last saved bit, it would be nice to have a smaller image. If patches are needed, desired, please let me know.
Thanks,
Rogério.