Re: [Image-SIG] going between numpy array and PIL.Image not behaving as expected -- how to report a bug ?

2008-11-21 Thread Jim Vickroy
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

Re: [Image-SIG] going between numpy array and PIL.Image not behaving as expected

2008-11-21 Thread 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

Re: [Image-SIG] going between numpy array and PIL.Image not behaving as expected

2008-11-21 Thread Ned Batchelder
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

Re: [Image-SIG] going between numpy array and PIL.Image not behaving as expected -- how to report a bug ?

2008-11-21 Thread Christopher Barker
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.