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.13 16:02 "Re: Editing a tiff image using libtiff", by Joris Van Damme

Rob,

Tillaart, Rob van den wrote:
> If space waste is an issue one could introduce a micro-memory manager
> (MMM).
>
> Suppopse one wants to update a strip/tile, the traditional scenario
> is: 1) the strip is loaded and decompressed in memory.
> 2) the strip is edited
> 3) the strip is compressed again
> 4) the strip is stored at the end of the TIFF file
> 5) and tags are updated
>
> An MMM would interact just before step 4.
> It looks at the size of the new strip and compares it to the previous
> size
> If (strip fits) reuse()
> Else append()
>
> On average there is a 50% chance (depends on type of editing) the new
> strip will fit, so on average the filesize will grow less fast.

That is of course a good idea.

> 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.
> The MMM described above can make a better decission when to reuse the
> existing strip space if these 'alloc-tags' would be in the file. Note
> that if these 'alloc-tags' would be removed TIFF would work just as we
> know. Drawback of the 'alloc-tags' is of course the space they cost :)

That is an attempt at inserting memory-management data at the wrong
level. There's not just compressed image data blocks to manage, but also
IFD blocks, tag value blocks (which can be quite large), etc. If ever a
TIFF with memory-management data were to be designed, the data better
accompanies each data block.


Joris Van Damme
info@awaresystems.be
http://www.awaresystems.be/
Download your free TIFF tag viewer for windows here:
http://www.awaresystems.be/imaging/tiff/astifftagviewer.html