AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2004.03.15 23:58 "[Tiff] libtiff and streams", by Dimitar Gospodinov
2004.03.16 00:14 "Re: [Tiff] libtiff and streams", by Bob Friesenhahn
2004.03.16 00:43 "Re: [Tiff] libtiff and streams", by Joris
2004.03.16 01:38 "Re: [Tiff] libtiff and streams", by Dimitar Gospodinov
2004.03.16 02:08 "Re: [Tiff] libtiff and streams", by Joris
2004.03.16 06:56 "Re: [Tiff] libtiff and streams", by Andrey Kiselev
2004.03.16 12:16 "Re: Re: [Tiff] libtiff and streams", by dimitar
2004.03.16 04:30 "Re: [Tiff] libtiff and streams", by Frank Warmerdam
2004.03.16 08:00 "Re: [Tiff] libtiff and streams", by Rob van den Tillaart
2004.03.16 08:25 "Re: [Tiff] libtiff and streams", by Andrey Kiselev
2004.03.25 15:56 "Re: [Tiff] Jpeg compressing a file", by Andrey Kiselev
2004.03.29 11:42 "[Tiff] Jpeg compressing a file", by Carl J. Collin
2004.03.29 13:01 "Re: [Tiff] Jpeg compressing a file", by Andrey Kiselev

2004.03.16 00:43 "Re: [Tiff] libtiff and streams", by Joris

How difficult would be to modify libtiff to support streams-like operations? Having random access files is not always possible - for example when reading from sockets, the file size is unknown.

One of the things that should change, if streams are to be supported, is get file size functions. They can not be used.

I think/thought such a thing is completely incompatible with the TIFF specification. It's quite possible and compliant with the specification that the header points to the first IFD being at the end of the file, which points to data spread throughout the file, and may point to a second IFD that follows the header immediatelly. Plus, applications could be interested in page 10 to begin with, and develop an interest in page 1 afterwards. (OK, finding IFD for page 10 implies passing through IFD for page 1, but I mean, the actual raster decoding activity of page 1 should not be necessary at this stage, and yet still possible at any later stage.) So how can this scheme possible be combined with sequential access of the TIFF?

I must be missing something basic and hope that someone will be so kind as to correct me.

If I'm not mistaking, there's a kind of sub-specification somewhere, that does impose extra rules as to the actual order of the data blocks inside the TIFF file, mainly to work around this incompatibility of TIFF specification and stream-line sequential decoding. I seem to remember there's an RFC about this. But I could very well be mistaking.

P.S. I tried to use libtiff with streams and everything worked, except get file size.

Perhaps in this particular attempt both TIFF file and application requests where in some specific order?

I've never understood LibTiff's need for file size. That is *not* a logical consequence of the TIFF specification, I think. But again, I gladly stand corrected.

Joris Van Damme
info@awaresystems.be
http://www.awaresystems.be

Download your free TIFF tag viewer for windows here: http://www.awaresystems.be/free_downloads/astifftools.html