[Image-SIG] Loading Big-Endian Floating Point TIFF Files

Aaron VanDevender aaron at halcyonmolecular.com
Thu Dec 1 22:50:54 CET 2011

Hello Python Image folks,

I'm using PIL 1.1.7.

I would like to load a TIFF file that stores its pixels in 32-bit
big-endian floating point format. When I use Image.open it reads the file
and mode is given as "F;32BF", however if I use the convert or getdata
methods I get:

/usr/lib/python2.7/dist-packages/PIL/ImageFile.pyc in load_prepare(self)
    229         if not self.im or\
    230            self.im.mode != self.mode or self.im.size != self.size:
--> 231             self.im = Image.core.new(self.mode, self.size)
    232         # create palette (optional)

    233         if self.mode == "P":

ValueError: unrecognized mode

What would be the easiest way to add support for this format, or convert it
to a simple "F" mode? Thank you.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/image-sig/attachments/20111201/b32a4665/attachment.html>

More information about the Image-SIG mailing list