[Image-SIG] Re: ANN: pytiff 0.1.3

Oliver M. Haynold oliver60201 at hotmail.com
Mon Aug 30 18:45:46 CEST 2004


On Mon, 30 Aug 2004 10:42:52 -0400, Bob Klimek wrote:

> Nice and simple! But there's no mention of what the pixel depth is. Can 
> it read 16-bit grayscale and 48-bit RGB TIFF images?

Each image has the bits_per_sample and samples_per_pixel attributes, which
can assume any positive integer value. Then there's the
photometric_interpretation attribute which is a string and currently can
be grey (includes b/w), RGB, and RGBA; other values are permissible, but
pytiff doesn't know their meaning. Thus pytiff should handle not only
16-bit greyscale and 48-bit RGB, but even oddities like three-bit
greyscale (with the pixels not being byte-aligned). For things like
cropping and rotating it's sufficient to know how many bits one pixel has
and where the data of that pixel is located so that pytiff can handle
these things pretty generally. The unit tests right now only check 1-bit
b/w, 8-bit greyscale, and 24-bit RGB, though.

Presently, the main limitations are that pytiff doesn't handle
subdirectories (ignored), separated planes (raises an error), image
depth greater than 1 (the z-dimension for pixels registered by SGI--does
this really need to be supported?), and assumes all data to be unsigned
integers (bad if they're really floats, complex numbers, etc.). These
issues will be fixed in a subsequent release.

Yours,

      Oliver

-- 
For an email address I check more regularly, see 
<URL:http://pubweb.northwestern.edu/~omh221/>.



More information about the Image-SIG mailing list