-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Correctly handle high dpi in Pillow animation writer. #15691
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
Correctly handle high dpi in Pillow animation writer. #15691
Conversation
The idea is just to pass self.dpi to savefig() and then use self.frame_size as the frame size rather than looking up renderer internals, but this is made easier by properly moving some attributes and methods (some of `__init__`, `setup`, `frame_size`) from MovieWriter (which should really be called SubprocessMovieWriter, as that's what it does) to AbstractMovieWriter, so that PillowWriter can reuse them without having to carefully prevent any attempt of starting a subprocess.
57f02ad
to
125394d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me.
Not sure about the milestone. |
I'm gonna put it on 3.2 because I think it's low risk and the incorrect behavior was pretty bad. |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulation you did some good work ! Hopefully your backport PR will be tested by the continuous integration and merged soon! If these instruction are inaccurate, feel free to suggest an improvement. |
heh, or maybe not. I don't think this is so important as to need a manual backport, so I'm going to kick to 3.3. |
The idea is just to pass self.dpi to savefig() and then use
self.frame_size as the frame size rather than looking up renderer
internals, but this is made easier by properly moving some attributes
and methods (some of
__init__
,setup
,frame_size
) from MovieWriter(which should really be called SubprocessMovieWriter, as that's what
it does) to AbstractMovieWriter, so that PillowWriter can reuse
them without having to carefully prevent any attempt of starting a
subprocess.
Closes #15678, attn @dopplershift.
I... don't understand the doc build failure, likely something with autosummary and inheritance?
Edit: looks like that's indeed the problem, there's already a missing-references entry for PillowWriter.frame_size so I don't feel too bad adding one for MovieWriter.frame_size (now that it's defined in AbstractMovieWriter.frame_size).
PR Summary
PR Checklist