Ned Batchelder wrote:
Yes, it definitely looks like a bug in fromarray. typestr is 'i4' in
my environment, and the check against typestr[1:] seems to recognize
this. The line
typestr = typestr[:2]
should change, perhaps to:
typestr = typestr[-2:]
--Ned.
http://nedbatchelder.com
I'm not sure exactly what you are trying to do here, but the issue has
to do with the mapping of numpy array elements into pixels. Your code
uses 32-bit ints, and fromarray defaults to L mode, which is 8-bit
grayscale pixels. fromarray uses the shape of the array to create the
shape of the
Yes, it definitely looks like a bug in fromarray. typestr is 'i4' in
my environment, and the check against typestr[1:] seems to recognize
this. The line
typestr = typestr[:2]
should change, perhaps to:
typestr = typestr[-2:]
--Ned.
http://nedbatchelder.com
Jim Vickroy wrote:
Ned
Jim Vickroy wrote:
Ned Batchelder wrote:
Yes, it definitely looks like a bug in fromarray. typestr is 'i4' in
my environment, and the check against typestr[1:] seems to recognize
this. The line
typestr = typestr[:2]
should change, perhaps to:
typestr = typestr[-2:]
--Ned.