classification
Title: Lossless Optimization of PNG files
Type: resource usage Stage:
Components: Versions: Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: haypo, serhiy.storchaka, tfs
Priority: normal Keywords:

Created on 2017-06-13 23:11 by tfs, last changed 2017-07-14 21:59 by tfs.

Pull Requests
URL Status Linked Edit
PR 2141 open tfs, 2017-06-13 23:11
Messages (4)
msg295969 - (view) Author: Tiago Filipe Silva (tfs) * Date: 2017-06-13 23:11
I took the liberty to apply tools that optimize the binary weight (without loss of quality) of the 14 PNG files present in the Python 3.7 source tree and then applied a pull request (#2141).

Is there anything to be discussed? Thanks.
msg295989 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-06-14 06:55
What tools did you use, optipng, advpng, pngcrush, pngnq, pngquant, or other? How much space is saved?

Note that some tools remove an information about palette that makes files displaying differently on different platforms and output devises.
msg295990 - (view) Author: STINNER Victor (haypo) * (Python committer) Date: 2017-06-14 07:05
I suggest to work on Sphinx to propose to implement this optimization on the HTML rendering, maybe with optional external tools. What do you think?

Another attempt: bpo-27461 :-)
msg298375 - (view) Author: Tiago Filipe Silva (tfs) * Date: 2017-07-14 21:59
Sorry for the late reply. I had to deal with stuff.

serhiy.storchaka:

> What tools did you use, optipng, advpng, pngcrush, pngnq, pngquant, or other? How much space is saved?

I had half a crate of whiskey that day so I'm going to say optipng and pngcrush were used and if my recollection is good the saved space was ≈ 5 to 50 % depending on the file.

> Note that some tools remove an information about palette that makes files displaying differently on different platforms and output devises.

I am aware of that. But if I understood correctly these files are rendered in documentation, and I don't think they're going to do this in a PlayStation 2. There may be complaints with Windows XP users because I remember for sure that optimized PNG files could not render very well back in those days.

haypo:

> I suggest to work on Sphinx to propose to implement this optimization on the HTML rendering, maybe with optional external tools. What do you think?

Like you I'm very fond of a long-term proper solution and that is, by the way, the solution you deserve.

Unfortunately, I do not have the skills for provide that. I can only give the solution you need (which is smaller files).
History
Date User Action Args
2017-07-14 21:59:01tfssetmessages: + msg298375
2017-06-14 07:05:20hayposetnosy: + haypo
messages: + msg295990
2017-06-14 06:55:11serhiy.storchakasetmessages: + msg295989
2017-06-14 05:29:14serhiy.storchakasetnosy: + serhiy.storchaka
2017-06-13 23:11:28tfscreate