| 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:05 "newbiequestion: [?] backup complete ifd > private ifd", by Karin Hoehnethanx for your helpfull suggestions. well, here's another newbie-cry-for-help. (hope, that's not too stupid.) (this is refering to this: http://www.asmail.be/msg0055393448.html ... just in case) after reconsidering the natur of the described assignment and doing some further tiff-structure-research/libtiff-homework, i more or less came to following conclusions: [1] knowing about values of the tags won't help - what i really need is something like a numerical value-comparison. note: the goal is >not< anything like a real tag analyses, but something like a backup-system without the need of knowing anything about the tag-values (or possible private-tag-values). in other words: i just need something like a byte-copy/comparison. ------------------------------------------------------------------------- [2] let's assume i have a tiff-file like this: | header | ifd[0] | data | ... 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? 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]. 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) ------------------------------------------------------------------------- [4] what i want to know about ifd[0] (and copy to ifd[1]) is something like this (copied elsewhere): 00000008 : 00 10 number of tags : 16 0000000A : 00 FF 00 03 00 00 00 01 00 01 00 00 whatever_tag[1] 00000016 : 01 00 00 04 00 00 00 01 00 00 02 40 whatever_tag[2] 00000022 : 01 01 00 04 00 00 00 01 00 00 01 80 whatever_tag[3] 0000002E : 01 02 00 03 00 00 00 01 00 01 00 00 whatever_tag[4] 0000003A : 01 03 00 03 00 00 00 01 00 01 00 00 whatever_tag[5] ... 000000BE : 01 28 00 03 00 00 00 01 00 02 00 00 whatever_tag[16] 000000CA : 00 00 00 00 pointer to next IFD (or 0) it would be nice, if i could manage to get and compare >something< like a plain string of the bytes in the ifd: 001000FF00030000000100010000 ... ... 00000000 (something like the tiffinfo -d option, only for the directory.) ------------------------------------------------------------------------- hope, anyone could help. i'm a little lost. :) thx again in advance /karin |
|||||||