| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
Thread2012.07.11 21:35 "Re: Doubts about Strip and Tile Oriented read/write TIFF files", by Bob FriesenhahnOn Wed, 11 Jul 2012, Jorge Martin wrote: > Hello, > I have an important doubt about how tile/strip oriented TIFF images > have to be read/written. As I know, not all > the tiles/strips are full of data because the rowPerStrip/TileSize is not > multiple of the size of the image. I understand > that the strip/tile that are not full of data, will be filled with 0s by > libtiff when the Tile/Strip are read. And this > Strip/Tile should be filled with 0s before call to libtiff > (TIFFWriteEncodedStrip/TIFFWriteEncodedTile). Are these > assumptions correct? I think so. Tiles are always full rectangles even if they refer to unused area. > I have implemented the code pasted below to read tile-oriented > image, but I do not know how to manage the Tiles > that are not full of data (border tile), because I need to return a buffer > (m_TiffValuesVec->at(dirIdx).tiffBuffer) with > only data. You will need to copy from the tile into your own representation if you don't want to preserve the unused tile portion. Feel free to refer to GraphicsMagick's TIFF code for an example (seached for "TiledMethod"): http://graphicsmagick.hg.sourceforge.net/hgweb/graphicsmagick/graphicsmagick/file/cd958baa618c/coders/tiff.c Bob -- Bob Friesenhahn bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ |
|||||||