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

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


Hello,

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
whacked.

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().

Regards,
Albert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.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://mail.python.org/pipermail/scipy-dev/attachments/20060122/b8ae57d8/attachment.obj>


More information about the SciPy-Dev mailing list