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
October 2005

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

2005.10.24 07:20 "How can I insert IFD at custom index?", by Eugene Shebeko
2005.10.24 20:02 "Re: How can I insert IFD at custom index?", by Andrey Kiselev
2005.10.24 20:16 "Re: How can I insert IFD at custom index?", by Andrey Kiselev
2005.10.25 06:53 "Re: How can I insert IFD at custom index?", by Eugene Shebeko
2005.10.26 14:45 "Re: How can I insert IFD at custom index?", by Eugene Shebeko

2005.10.24 20:02 "Re: How can I insert IFD at custom index?", by Andrey Kiselev

Eugene,

> I need to insert IFD at a custom index.
> 
> I see only function that insert IFD at the end of file.
> Maybe it's possible some hack solution do do this?

You can write IFD either at the end of file (using usual method) or at
the any position using the TIFFCheckpointDirectory() function. The IFD
structure will be dumped out immediately whenever the
TIFFCheckpointDirectory() will be called. See the attached sample code,
it will create the TIFF file with the IFD in the middle of image (you
can confirm that with binary viewer, just search for the DateTime tag
contents).

> By the way. Is TIFFWriteDirectory() check the space need for writing
> IFD? I beleive that if enough space in old IFD locattion
> TIFFWriteDirectory write it in old location. if not write it at the
> end of file. Is it true?

No. libtiff does not contain any memory management logic. There is a bit
of such logic for image data: in update mode strips will be overwritten
if they are smaller or equal of written data chunks, otherwise data will
go at the end of file. Not so for directories, they always will be
written at the end whenever updated.

Regards,
Andrey

PS.
Please, use latin transliteration of your name in From: field. Thanks.


-- 
Andrey V. Kiselev
Home phone:  +7 812 5970603  ICQ# 26871517