| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
Thread2006.06.13 08:55 "Re: Editing a tiff image using libtiff", by Rob Van Den Tillaart> > An additional way to handle space is the introduction of an > > 'alloc-tag'. > > This tag indicates the size of the 'allocated' block in the file in > > contrast to the size tag which indicates the count of the > > bytes used. > > There are already the FreeByteOffsets and FreeByteCounts (288 > and 289) tags for keeping track of unused space. Nothing is > specified about in which IFD they belong, though (the first? > the last? wherever you want, and use all of them together?). > The spec also says: "not recommended for general > interchange", probably partly because of this, and also > because it's not very nice to give someone a space-wasting > file, I guess :-). I agree, if a file can be rewritten with zero space-waste it is preferred. The original discussion triggered me to think about how to prevent unnecessary growth by only appending new information at the end of the TIFF file. In my thought experiment every tile/strip has its own 'alloc-tag' so it should be clear where it belongs to. This 'alloc-tag' is written when the the tile is written first time and its content does not change, unless new space is allocated at the end of the file. Free space is calculated when needed, this in contrast to the FreeBytesOffsets/Counts model in which the list of free space should be kept up to date. Thanx for your comment, Regards Rob |
|||||||