Skip to content

Conversation

@wiredfool
Copy link
Member

This includes the commits from #224, and an extra ducktyping check to call the right method on image objects.

jiffyclub and others added 3 commits May 21, 2013 18:35
Image.fromarray attempts to call a method called `tobytes()` on the passed in object, but NumPy arrays don't have a `tobytes()` method, they have a `tostring()` method. (See http://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.tostring.html).

I think this was changed accidentally in a Python 3 compatibility update in which this call was confused with the `tobytes` and `frombytes` methods of Image objects.
@ghost ghost assigned aclark4life May 22, 2013
@jiffyclub
Copy link
Contributor

👍

aclark4life added a commit that referenced this pull request May 23, 2013
Fix Image.fromarray with NumPy arrays: Supersedes PR #224
@aclark4life aclark4life merged commit a9fd1f4 into python-pillow:master May 23, 2013
@wiredfool wiredfool deleted the pr224 branch November 26, 2013 23:10
radarhere pushed a commit to radarhere/Pillow that referenced this pull request Sep 24, 2023
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.

3 participants