Skip to content

In imsave()'s Pillow-handled case, don't create a temporary figure. #13263

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

Merged

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Jan 22, 2019

Avoids accidentally changing the image shape when dividing and
multiplying by dpi.

Closes #13253.

(Probably the complexity of the solution can later be paid back by having FigureCanvasAgg.print_{jpeg,tiff} just defer to imsave()...)

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

Avoids accidentally changing the image shape when dividing and
multiplying by dpi.
@anntzer anntzer force-pushed the dont-go-through-figure-in-imsave branch from 816839b to cb7f555 Compare January 22, 2019 20:55
@tacaswell tacaswell added this to the v3.1 milestone Jan 27, 2019
@tacaswell tacaswell merged commit 010f2f4 into matplotlib:master Jan 27, 2019
@tacaswell
Copy link
Member

Thanks @anntzer !

@anntzer anntzer deleted the dont-go-through-figure-in-imsave branch January 27, 2019 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

imsave outputs JPEG with wrong dimension
3 participants