AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
July 2012

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2012.07.11 20:52 "Doubts about Strip and Tile Oriented read/write TIFF files", by Jorge Martin
2012.07.11 21:35 "Re: Doubts about Strip and Tile Oriented read/write TIFF files", by Bob Friesenhahn
2012.07.11 23:47 "Re: Doubts about Strip and Tile Oriented read/write TIFF files", by Olivier Paquet
2012.07.12 09:44 "Re: Doubts about Strip and Tile Oriented read/write TIFF files", by Joris Van Damme
2012.07.12 09:57 "Re: Doubts about Strip and Tile Oriented read/write TIFF files", by Jorge Martin
2012.07.12 10:10 "Re: Doubts about Strip and Tile Oriented read/write TIFF files", by Joris Van Damme
2012.07.12 10:17 "Re: Doubts about Strip and Tile Oriented read/write TIFF files", by Jorge Martin
2012.07.12 11:17 "Re: Doubts about Strip and Tile Oriented read/write TIFF files", by Joris Van Damme
2012.07.12 20:22 "Re: Doubts about Strip and Tile Oriented read/write TIFF files", by <jormarfe@gmail.com>

2012.07.11 21:35 "Re: Doubts about Strip and Tile Oriented read/write TIFF files", by Bob Friesenhahn

On 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/