Skip to content

Cleanup to image.py. #9032

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
merged 1 commit into from
Aug 23, 2017
Merged

Cleanup to image.py. #9032

merged 1 commit into from
Aug 23, 2017

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Aug 14, 2017

Various cleanups.

PIL.Image.Image.tobytes has existed since Pillow 2.0, which was released
in March 2013, and is also the first version to support Python 3.

One may want to add a check for the Pillow version, although it is
superfluous on Py3.

(While updating the docs on the required version of Pillow, also remove
mencoder from the dependencies doc, as its support is deprecated
anyways.)

PR Summary

PR Checklist

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

@tacaswell tacaswell added this to the 2.1 (next point release) milestone Aug 14, 2017
One of the file extensions supported by the active backend. Most
backends support png, pdf, ps, eps and svg.
origin : [ 'upper' | 'lower' ]
Indicates where the ``(0, 0)`` index of the array is in the upper left
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where -> whether

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

x = np.fromstring(x_str, dtype)
return x

if pilImage.mode in ('RGBA', 'RGBX'):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happened to RGBX?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

accidentally lost it; put it back

PIL.Image.Image.tobytes has existed since Pillow 2.0, which was released
in March 2013, and is also the first version to support Python 3.

One may want to add a check for the Pillow version, although it is
superfluous on Py3.

(While updating the docs on the required version of Pillow, also remove
mencoder from the dependencies doc, as its support is deprecated
anyways.)
@QuLogic QuLogic merged commit cfcae2b into matplotlib:master Aug 23, 2017
@anntzer anntzer deleted the image-cleanup branch August 23, 2017 23:57
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.

4 participants