-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Expose compression and filter PNG options through savefig #5397
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
Would be very useful indeed to trade off file size and image quality before the export. |
I think file size optimization should remain the realm of tools such as pngcrush and optipng. |
Definitely see your point, @anntzer - do one thing and do it well - but MPL is such a feature-rich tool that it would be a pity to miss this. Otherwise, let's get rid of the JPG options and the animation support. People can stitch their animations together by hand, too. Actually, who needs JPG anyway? Users could convert it from PNG... |
Good luck stitching animations by hand. To get any reasonable performance you need to pipe the raw buffers to the encoder... which can be done, but is far from trivial. Similarly (though less so) for jpeg. Still, I didn't say I would veto a PR implementing this... |
Please keep the comments here civil and avoid sarcasm. This is reasonable feature to want, but given that it can be handled via external tools is not the highest priority (as you can infer that this is ~2 years old). @eggsperde I would be happy to review a PR adding this feature. |
No offense/sarcasm taken! It seems that PNG only has one compression variable ("speed/compression ratio"). The resulting image is always lossless. For more compression we'd have to look to external programs. I honestly thought there would be more to it. I am currently in the final stretch of writing a thesis, but would like to give this a shot once I have a real life again. |
@eggsperde Best of luck finishing the thesis! |
any progress towards this feature request? |
As a follow-on to #5389.
JPG saving already has some JPG-specific options. We just need to follow that pattern again for PNG.
The text was updated successfully, but these errors were encountered: