| 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.08.04 14:48 "Re: newbiequestion: [?] backup complete ifd > private ifd", by Gerben VosKarin Hoehne wrote: > [2] > ... and in the very end, what i want to have is: > > | header | ifd[0] | data | ifd[1] (=exact! copy of ifd[0]) | > [3] > i want to backup the ifd[0] >one< time and just leave it in what ever > position in the file. since ifd[0] does not have any pointers to the > backuped ifd[1], there shouldn't be any problems with the file, > because ifd[1] is just a chunk of data. am i right with that > assumption? Correct. > with every loading-function (in the to-be-programmed app) i want > compare >every< (numerical) value of ifd[0] and the backup ifd[1]. > if >anything< is different (e.g. a single bit), i want to copy the > values of ifd[1] to ifd[0]. Note that programs that change ifd[0] will be very likely to destroy or overwrite ifd[1]. I don't understand what it is you are trying to accomplish, but maybe you will want to store ifd[1] in a separate file. > i have to admit: it was mentioned and i know, thet i >can< somehow > copy the ifd, but i still couldn't figue aut >how<. (sorry... newbie) Libtiff can't really help you with that. Best is to write a program yourself that follows the IFD chain. See the code of tiffdump for an example; it is a lower-level utility than tiffinfo and doesn't even use libtiff. It should be easy to adapt its code to give you a hexdump of the IFD. Gerben Vos. -- I will be on holiday next week. |
|||||||