[SciPy-dev] should Int8 be UnsignedInt8 in misc/pilutil.py?

Albert Huang ashuang at gmail.com
Sun Jan 22 22:39:14 CST 2006


pilutil.imread currently converts RGB images to arrays of signed integers.
I think it should be unsigned integers instead.  If you do an imshow(imread(
... ) ) on any brightly colored image, then all the RGB values > 127 get

Also, it's probably not very intuitive to say that -1 is brighter than 127.

The attached patch fixes it for me.  I just changed all occurences of 'b' to
'B', but am not too sure what the effect is in toimage().

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-dev/attachments/20060122/b8ae57d8/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pilutil-type-b2B.ptach
Type: application/octet-stream
Size: 1203 bytes
Desc: not available
Url : http://projects.scipy.org/pipermail/scipy-dev/attachments/20060122/b8ae57d8/attachment.obj 

More information about the Scipy-dev mailing list