2005.10.25 06:53 "Re: [Tiff] How can I insert IFD at custom index?", by Шебеко Евгений
>> 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).
Sorry, it my bad English ;). I really don't care where in the file my IFD will be located. But i need to insert IFD at custom index.
For example I have file with 6 IFD, and I need to insert new IFD at the index 3.
3 <--- need to insert at this index
3 (new directory)