python-imaging/Pillow — pull request #224 by jiffyclub (2013-05-21 21:35:26+00:00)
Title: Fix Image.fromarray with NumPy arrays

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.