[Image-SIG] 2-band image

David Smith areopagus125 at yahoo.com
Thu Jan 27 23:29:01 CET 2005


I wrote a C++ program that internally produces what
amounts to a 2-band image.  (The bands are the
horizontal and vertical components of a displacement
field over the plane.)  I added code using libtiff to
write out a Tiff file that has two 1-byte samples per
pixel.  PIL won't accept this file, raising an
exception:

File "C:\Python23\lib\site-packages\PIL\Image.py",
line 1571, in open
raise IOError("cannot identify image file")

I know the file is basically all right, if unusual. 
Microsoft's Windows Picture and Fax Viewer displays
the first band, as does Microsoft Photo Editor.  Gimp
displays it at the expected size, although it appears
to be showing alternating band samples interleaved
across the image.

I had thought maybe I could read the image into PIL
and call seek() to select the band.  But, I guess the
only multiband images in PIL are the predefined RGB,
RGBA, CMYK, and YCbCr.  Is that right, or is there a
more general multiband implementation underlying these
that I could utilize?

How do you suggest I store multiband images,
considering that I may need to store 16 bits per
sample in the future?

adTHANKSvance,
David Smith




		
__________________________________ 
Do you Yahoo!? 
All your favorites on one personal page – Try My Yahoo!
http://my.yahoo.com 


More information about the Image-SIG mailing list