[issue27461] Optimize PNGs
New submission from Ville Skyttä: Running PNGs through zopflipng makes them smaller, with no drawbacks. This patch was done with zopflipng version 1.0.1 with the -m option, and decreases the in-tree total size size of all *.png by almost 100KiB. $ find -name "*.png" | xargs du -bc | tail -n 1 # before 291101 total $ find -name "*.png" | xargs du -bc | tail -n 1 # after 194639 total ---------- assignee: docs@python components: Documentation files: pngs.patch keywords: patch messages: 269929 nosy: docs@python, scop priority: normal severity: normal status: open title: Optimize PNGs type: enhancement Added file: http://bugs.python.org/file43653/pngs.patch _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27461> _______________________________________
STINNER Victor added the comment: Hi, The idea is interesting, but IMO it would be more efficient to contribute to Sphinx, so all documentations will benefit of smallest pictures. There is a similar tool for JPEG. Victor ---------- nosy: +haypo _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27461> _______________________________________
Ville Skyttä added the comment: Sure, I plan to suggest this to sphinx as well. One corresponding tool for JPEGs is jpegoptim and its --strip-all option, but there is only ./Mac/BuildScript/resources/background.jpg in the cpython source tree (which despite of the .jpg extension appears to be a PNG file so I don't want to touch that stuff), plus ./Lib/test/imghdrdata/python.jpg which isn't worth a patch alone :) ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27461> _______________________________________
STINNER Victor added the comment:
there is only ./Mac/BuildScript/resources/background.jpg in the cpython source tree (which despite of the .jpg extension appears to be a PNG file so I don't want to touch that stuff)
Oh funny, you're right: it's a PNG file :-) ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27461> _______________________________________
Ville Skyttä added the comment: Updated patch against tip. Before: 289426 total After: 194638 total ---------- Added file: http://bugs.python.org/file43896/pngs.patch _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27461> _______________________________________
Changes by Ville Skyttä <ville.skytta@iki.fi>: Removed file: http://bugs.python.org/file43653/pngs.patch _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue27461> _______________________________________
Change by Carol Willing <willingc@gmail.com>: ---------- stage: -> patch review _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue27461> _______________________________________
participants (3)
-
Carol Willing -
STINNER Victor -
Ville Skyttä