I try open a tif image with 16-bit per pixel and multi-band to convert it in a raw file. I’m using PIL with the next commands i = Image.open('image.tif') and after I use rawData = i.tostring(). It doesn’t work with multi-band tif image.
The error is:
File "C:\Python27\lib\site-packages\PIL\Image.py", line 1980, in open
raise IOError("cannot identify image file")
IOError: cannot identify image file
The directory contains the file.
How I must do it ?
GDAL is pretty good at opening multiband rasters, and supports 11 different band types, including int16.