[Image-SIG] how can I open 32 float tiff with PIL?

Edward Cannon cannon.el at gmail.com
Wed Apr 6 21:47:48 CEST 2011


Also look at the compression type that seems to usually be more of a hangup than the bit depth. 



On Apr 6, 2011, at 9:30 AM, Dale Cieslak <dale at blackbagtech.com> wrote:

> I had something similar.  It all depends on whether the particular type of TIFF is supported by the TiffImagePlugin.py module.  If you have a type of TIFF that doesn't match one of the types it supports, you're out of luck.  You can try to convert the TIFF to a different format or try to patch the TiffImagePlugin.py module, which isn't trivial since you mentioned being new to Python.  
> 
> Best of luck,
> Dale
> 
> On Apr 4, 2011, at 7:57 PM, Ding Wei wrote:
> 
>> Hi there guys,
>> 
>> I'm new to the Python and PIL. I want to open a 32 float tiff file with pil. But I always get a error like this:
>> 
>> raise IOError("cannot identify image file")
>> IOError: cannot identify image file
>> 
>> I tried two different method to do the open:
>> 
>> 1.
>> import Image
>> im = Image.open(’test.tif‘)
>> 
>> 2.
>> import Image
>> fp = open(’test.tif‘, ’rb’)  
>> im = Image.open(fp)
>> 
>> 8 bit RGB file works just fine, but neither 16bit or 32 bit can be opened. 
>> 
>> Did I do something wrong?
>> 
>> Thank you for your help!
>> _______________________________________________
>> Image-SIG maillist  -  Image-SIG at python.org
>> http://mail.python.org/mailman/listinfo/image-sig
> 
> _______________________________________________
> Image-SIG maillist  -  Image-SIG at python.org
> http://mail.python.org/mailman/listinfo/image-sig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20110406/2d628a1a/attachment.html>


More information about the Image-SIG mailing list