Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
story645 merged 1 commit intomatplotlib:masterfromanntzer:aggfmts
Oct 20, 2021

Conversation

anntzer
Copy link
Contributor

@anntzeranntzer commentedOct 18, 2021
edited
Loading

We don't need to drop the alpha channel for jpeg anymore as imsave
handles that.

In imsave, also clarify thatsm is not going to be used in the
already-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

  • Has pytest style unit tests (andpytest passes).
  • IsFlake 8 compliant (runflake8 on changed files to check).
  • New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).
  • Conforms to Matplotlib style conventions (installflake8-docstrings and runflake8 --docstring-convention=all).
  • New features have an entry indoc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented indoc/api/next_api_changes/ (follow instructions in README.rst there).

@anntzeranntzer added this to thev3.6.0 milestoneOct 18, 2021
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")
Copy link
Member

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

Copy link
ContributorAuthor

@anntzeranntzerOct 20, 2021
edited
Loading

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.

@story645story645 merged commit9fb5370 intomatplotlib:masterOct 20, 2021
@anntzeranntzer deleted the aggfmts branchOctober 20, 2021 06:36
tacaswell pushed a commit that referenced this pull requestOct 20, 2021
Factor common parts of saving to different formats using pillow.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@QuLogicQuLogicQuLogic approved these changes

@story645story645story645 approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.6.0
Development

Successfully merging this pull request may close these issues.

3 participants
@anntzer@QuLogic@story645

[8]ページ先頭

©2009-2025 Movatter.jp