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
June 2006

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

2006.06.07 11:39 "Editing a tiff image using libtiff", by Sachin Garg
2006.06.07 12:51 "Re: Editing a tiff image using libtiff", by Joris Van Damme
2006.06.12 13:59 "Re: Editing a tiff image using libtiff", by Sachin Garg
2006.06.12 15:09 "Re: Editing a tiff image using libtiff", by Joris Van Damme
2006.06.13 07:29 "Re: Editing a tiff image using libtiff", by Rob Van Den Tillaart
2006.06.13 08:32 "Re: Editing a tiff image using libtiff", by Gerben Vos
2006.06.13 08:55 "Re: Editing a tiff image using libtiff", by Rob Van Den Tillaart
2006.06.13 16:04 "Re: Editing a tiff image using libtiff", by Joris Van Damme
2006.06.13 16:02 "Re: Editing a tiff image using libtiff", by Joris Van Damme
2006.06.14 09:08 "Re: Editing a tiff image using libtiff", by Gerben Vos

2006.06.14 09:08 "Re: Editing a tiff image using libtiff", by Gerben Vos

> If ever a TIFF with memory-management data were to be designed, the data
> better accompanies each data block.

The easiest way is of course to make a single-linked list: put a pointer to
the first free memory block in bytes 8-11. Every free memory block then
contains a pointer to the next block in bytes 0-3 of the block, and its own
length in bytes 4-7. End of list is indicated by a zero pointer. Blocks of
less than 8 bytes can't be linked and are lost. In BigTiff, the pointers and
lengths would become 8 bytes, and the minimum reclaimable block size 16
bytes.

Two problems: how to indicate the fact that we have a free block list (a
magic number in bytes 12-15?), and non-free-block-list-aware programs that
edit a TIFF will destroy it, so implementations using the list should be
extremely robust (at the very least, check for pointers outside the file,
and that you're not overwriting IFDs). The second problem probably makes
this idea too complicated to implement; it may be easier for
applications/libraries to just calculate the free spaces from the IFDs.

Sorry, just thinking aloud... :-)

					Gerben.