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
November 2008

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

2008.11.18 02:14 "Creating a tiled tiff from scratch (essentially)", by Tucker A Beck
2008.11.18 04:04 "Re: Creating a tiled tiff from scratch (essentially)", by Frank Warmerdam
2008.11.18 09:28 "Re: Creating a tiled tiff from scratch (essentially)", by <jcupitt@gmail.com>

2008.11.18 02:14 "Creating a tiled tiff from scratch (essentially)", by Tucker A Beck

I am using libtiff in an image processing application.  The input images are
tiled, multi-image, JPEG compressed tiff files.  I have had great success in
opening, converting, and processing the image data using libtiff.  Now, I
need to be able to store the results of processing in a new tiff file.  I
have encountered a few problems along the way.

When I create the tiff file, I would like to set up each directory when I
create the file.  I do not want to store any image data in them at creation,
I just want them to be ready for writing data when it needs to be done. 
There are somewhere between 3 and 7 directories that I need to make.  It
seems like the only way to do this is to set all the fields for the
directory, write a single dummy tile (using TIFFWriteTile) and then write
the directory (TIFFWriteDirectory).  This seems like an ugly way to do
things; I'd rather not have to write any data until absolutely necessary. 
If I try to write the directory without having written a tile, I get a
message that says, "MissingRequired: lib/op.svs: TIFF directory is missing
required "TileOffsets" field."  Is there any way to set up the directory
with all the fields correctly assigned, but no data yet written?

Are there any tutorials/guides/example code out there that show a tiled tif
being built from scratch?  I would love to see a similar example to what I
am trying to do.

Any help is greatly appreciated.

Tucker Beck
Software Developer
Washington State University / Pacific Northwest National Laboratory