2012.01.26 16:41 "[Tiff] TIFFClientOpen() output stream/encoding behaviour", by Christopher Cameron

2012.01.26 18:24 "Re: [Tiff] TIFFClientOpen() output stream/encoding behaviour", by Bob Friesenhahn

I am noticing however that libtiff will occasionally attempt to seek back to data, and occasionally ask for the size of the file, while encoding. Is there a way to disable this random access for output streams? Perhaps by enabling something where libtiff will cache the metadata that has already been written? Or by forcing libtiff to write all the metadata first, followed by the image data?

I don't think that it is possible to do what you request other than by doing a full dry-run with all the data because otherwise it is not possible to know the TIFF offsets. If no compression is used, then it is technically possible to compute all offsets in advance.

If libtiff does not know the final content of the metadata, then it can not write it first.

If you have sufficient memory, then you could write the TIFF to memory, and then write the content of the memory to the output stream.

Bob
--
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/