home *** CD-ROM | disk | FTP | other *** search
- To: Sam Leffler <sam@flake.asd.sgi.com>
- Subject: Re: Integrating TIFF extension
- Cc: tiff@sgi.sgi.com
- Date: Tue, 24 Jan 1995 17:34:19 PST
- From: Adam Rybicki <arybicki@netcom.com>
-
- On Tue, 24 Jan 1995, Sam Leffler wrote:
-
- > 2. YCbCr files cannot be read by scanlines, but reading by strips works
- > as expected. However, in libtiff there is no way to specify which
- > particular sample to load if PlanarConfiguration is 2. Or is there?
- > Tile-based YCbCr files should work, but I have no files in that format.
- >
- > If PlanarConfig is 2 (separate planes) then individual samples
- > are in different strips/tiles; to get a particular sample you
- > read the appropriate strip/tile.
- >
- > Sam
-
- Sure, this sounds obvious. However, when I want to load a tile, I
- specify which tile _and_which_sample_ of that tile to load via
- TIFFReadTile(). TIFFReadStrip(), however, does not accept the sample
- number as one of its parameters.
-
- So, how do I indicate to libtiff which strip sample to load? Or does it
- simply concatenate the samples?
-
- TIFFReadTile just calls TIFFComputeTile to figure which tile to read
- based on the x,y,z and sample. There is no similar routine for strips;
- you are obligated to do the calculation yourself (perhaps I should add
- such a routine). For PlanarConfig == 2 this calculation is:
-
- sample*StripsPerImage + row/RowsPerStrip
-
- where RowsPerStrip is the tag value and StripsPerImage is calculated
- in the obvious way. You can see this calculation in the TIFFSeek
- routine at the top of tif_read.c.
-
- Sam
-
-