[Image-SIG] Problem with converting GeoTIFF to Numpy array (ValueError: unrecognised mode)
H.Zahiri at curtin.edu.au
Sat Jan 31 16:13:39 CET 2009
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:
>>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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Image-SIG