Loading Big-Endian Floating Point TIFF Files

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Loading Big-Endian Floating Point TIFF Files

Aaron VanDevender-2
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.


Image-SIG maillist  -  [hidden email]