[Image-SIG] Problem with converting GeoTIFF to Numpy array (ValueError: unrecognised mode)
Hani Zahiri
H.Zahiri at curtin.edu.au
Sat Jan 31 16:13:39 CET 2009
Hi
I am trying to read a GeoTIFF and convert it to a Numpy array. Though, I am able to open the image with no problem, however I am keep getting 'ValueError: unrecognised mode' anytime I try to use any methods from PIL's classes. My lines and results are like this:
>>import Numpy
>>from PIL import Image
>>im = Image.open('dem.TIF')
>>print im.format, im.size, im.mode
>> TIFF (6000, 6000) I;16S
>>dem = fromstring(im.tostring(),'int16')
....
....
ValueError: unrecognised mode
The problem must be because of mode of my data (I;16S) and I don't know how to read it.
I really appreciate any help with this.
Many Thanks
Cheers,
Hani
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20090201/f3435d8c/attachment-0001.htm>
More information about the Image-SIG
mailing list