Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Factor common parts of saving to different formats using pillow.#21376
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
We don't need to drop the alpha channel for jpeg anymore as imsavehandles that.In imsave, also clarify that `sm` is not going to be used in thealready-usable-rgba case.Also, spliting out pil_kwargs under "other parameters" seems overkillfor an effectively internal method (`savefig` is the user-facing API).
mpl.image.imsave( | ||
filename_or_obj, self.buffer_rgba(), format=fmt, origin="upper", | ||
dpi=self.figure.dpi, metadata=metadata, pil_kwargs=pil_kwargs) | ||
@_check_savefig_extra_args | ||
@_api.delete_parameter("3.5", "args") |
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.
I can't follow ifsince
is supposed to be the last version that has the parameter or first version without it
https://matplotlib.org/stable/_modules/matplotlib/_api/deprecation.html#delete_parameter
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.
No,since
is the version where the deprecation was introduced (as for_api.deprecated
);args
is getting deprecated in 3.5.
Factor common parts of saving to different formats using pillow.
Uh oh!
There was an error while loading.Please reload this page.
We don't need to drop the alpha channel for jpeg anymore as imsave
handles that.
In imsave, also clarify that
sm
is not going to be used in thealready-usable-rgba case.
Also, spliting out pil_kwargs under "other parameters" seems overkill
for an effectively internal method (
savefig
is the user-facing API).Followup to#21274.
PR Summary
PR Checklist
pytest
passes).flake8
on changed files to check).flake8-docstrings
and runflake8 --docstring-convention=all
).doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).