Christopher Barker wrote:
Jim Vickroy wrote:
Ned Batchelder wrote:
Yes, it definitely looks like a bug in fromarray. typestr is 'in my environment, and the check against typestr[1:] seems to
recognize this. The line
typestr = typestr[:2]
should change, perhaps to:
typestr = typest
Jim Vickroy wrote:
Ned Batchelder wrote:
Yes, it definitely looks like a bug in fromarray. typestr is '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://nedbatch
Yes, it definitely looks like a bug in fromarray. typestr is '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 Batchelder
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
Ned Batchelder wrote:
Yes, it definitely looks like a bug in fromarray. typestr is '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
OK, I have
Ned Batchelder wrote:
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.
Thanks for your clear and detailed reply and sorry for the vagueness of
my posting; you did correctly read my mind!
Your code uses 32-bit int
Hello all,
I am having no success getting numpy and PIL to behave as expected when
starting with a numpy array (see the attached script).
Here is the output on my computer:
Python version: 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32
bit (Intel)]
numpy version: 1.2.1
PIL versi