-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
Lossless Optimization of PNG files #74845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
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 (bpo-2141). Is there anything to be discussed? Thanks. |
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. |
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 :-) |
Sorry for the late reply. I had to deal with stuff. serhiy.storchaka:
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.
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:
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). |
It seems PR author removed his repository and the PR can't be merge via conflict. In master branch: 02:18 $ ll **/.png In lossless_png branch: $ ll **/*.png
-rw-r--r-- 1 inada-n staff 2791 7 1 02:28 faq/python-video-icon.png
-rwxr-xr-x 1 inada-n staff 19351 7 1 02:28 howto/logging_flow.png*
-rw-r--r-- 1 inada-n staff 11158 7 1 02:28 library/depgraph-output.png
-rw-r--r-- 1 inada-n staff 10590 7 1 02:28 library/hashlib-blake2-tree.png
-rw-r--r-- 1 inada-n staff 6168 7 1 02:28 library/pathlib-inheritance.png
-rw-r--r-- 1 inada-n staff 33565 7 1 02:28 library/tulip_coro.png
-rw-r--r-- 1 inada-n staff 29964 7 1 02:28 library/turtle-star.png
-rw-r--r-- 1 inada-n staff 37942 7 1 02:28 using/win_installer.png |
03:19 $ find . -name '*.png' | xargs optipng -o7 While this output is bigger than PR-2141, I think it's good enough. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: