home *** CD-ROM | disk | FTP | other *** search
/ Internet File Formats / InternetFileFormatsCD.bin / graphics / tiff / unix / archive.z / archive / text0101.txt < prev   
Encoding:
Text File  |  1995-09-20  |  1.6 KB  |  41 lines

  1.     To:  Sam Leffler <sam@flake.asd.sgi.com>
  2.     Subject:  Re: Integrating TIFF extension 
  3.     Cc:  tiff@sgi.sgi.com
  4.     Date: Tue, 24 Jan 1995 17:34:19 PST
  5.     From:  Adam Rybicki <arybicki@netcom.com>
  6.  
  7.     On Tue, 24 Jan 1995, Sam Leffler wrote:
  8.     
  9.     >     2. YCbCr files cannot be read by scanlines, but reading by strips works
  10.     >        as expected.  However, in libtiff there is no way to specify which
  11.     >        particular sample to load if PlanarConfiguration is 2.  Or is there?
  12.     >        Tile-based YCbCr files should work, but I have no files in that format.
  13.     > 
  14.     > If PlanarConfig is 2 (separate planes) then individual samples
  15.     > are in different strips/tiles; to get a particular sample you
  16.     > read the appropriate strip/tile.
  17.     >     
  18.     >     Sam
  19.     
  20.     Sure, this sounds obvious.  However, when I want to load a tile, I 
  21.     specify which tile _and_which_sample_ of that tile to load via 
  22.     TIFFReadTile().  TIFFReadStrip(), however, does not accept the sample 
  23.     number as one of its parameters.
  24.     
  25.     So, how do I indicate to libtiff which strip sample to load?  Or does it 
  26.     simply concatenate the samples?
  27.     
  28. TIFFReadTile just calls TIFFComputeTile to figure which tile to read
  29. based on the x,y,z and sample.  There is no similar routine for strips;
  30. you are obligated to do the calculation yourself (perhaps I should add
  31. such a routine).  For PlanarConfig == 2 this calculation is:
  32.  
  33.     sample*StripsPerImage + row/RowsPerStrip
  34.  
  35. where RowsPerStrip is the tag value and StripsPerImage is calculated
  36. in the obvious way.  You can see this calculation in the TIFFSeek
  37. routine at the top of tif_read.c.
  38.  
  39.     Sam
  40.  
  41.