2004.03.01 20:10 "[Tiff] Hello world", by Xevit

2004.03.03 14:18 "Re: [Tiff] Hello world", by Frank Warmerdam

I'm working on a vision project, and I want to make a viewer for a large files ( >= 4Gb ).

Currently I've developed a small viewer using libtiff that works on a tiled image that makes 100.000 x 100.000, and works fine. Altrought, I have some problems because I want to read and write some tiles in this file without doing the read from one file, and writing to another.

I've been read some information about this, and I find that libtiff don't support this. Anybody knows a solution for this problem or alternative.

Xevit,

I'm not sure how you are addressing the > 4GB issue.

There has been some work to implement support for random update of TIFF files with libtiff. Open it the mode string "r+" to TIFFOpen() and you can (with many restrictions) read and write the file.

Generally this works best for uncompressed files, but I *think* it can work for compressed files as well with the caveat that if you write a block with a larger compressed representation than the old one, it will be added at the end of the file, and the old strip/tile space will be lost.

This is a relatively recent innovation in libtiff, and is undoubtedly buggy in many regards but it does allow "in place" update of TIFF files in some sitations.

Try opening the file with mode="r+" and then report (via small example programs) what goes wrong.

Best regards,

---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent