-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
Cleanup to image.py. #9032
Conversation
lib/matplotlib/image.py
Outdated
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 |
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.
where -> whether
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.
fixed
x = np.fromstring(x_str, dtype) | ||
return x | ||
|
||
if pilImage.mode in ('RGBA', 'RGBX'): |
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.
What happened to RGBX?
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.
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.)
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