2006.07.20 13:55 "[Tiff] newbiequestion: [?] backup complete ifd > private ifd", by Karin Hoehne

2006.07.20 14:19 "[Tiff] newbiequestion: [?] backup complete ifd > private ifd", by

(Whoops, forgot to include the list as a target)

-----Original Message-----

From: Pallek, Bernie: #CIPO - OPIC
Sent: Thursday, July 20, 2006 10:18 AM
To: 'Karin Hoehne'
Subject: RE: [Tiff] newbiequestion: [?] backup complete ifd > private

Karin wrote:

Is there a way to copy/backup an entire ifd and create a new, pivate one at the end after the last ifd?

Well, I guess not, but one can hope... :)

You can copy the IFD itself, but remember that it contains pointers (offsets) to other data, so just saving the IFD and doing something with it (e.g. replacing another IFD with it) won't be useful. You can add a new IFD, but the old one will have to be modified, because its last value is a pointer to the next (your new) IFD.

Is there a way [which i couldn't figure out till now] to print a list of all tags - including private tags?

[i mean in this way: is there something or not, indicated by an integer like 0 and 1] or [>some< kind of information of a private tag.]

You can use the tiffinfo and tiffdump utilities (in the tools subdirectory) to show most stuff, including private tags (though they will just be displayed as raw bytes, I think).

According to this: http://www.asmail.be/msg0054967690.html: As far as I don't know the datatype of possible private tags, do i have do restrict the task on the 45 baselinetags?

Yes, it's considered best to avoid propagating tags that your program doesn't understand, because if they depend on the structure of the file being a certain way, when you create a new file and copy those tags over, various offsets may be different, and so those tags will appear "broken" to whatever app can normally understand them. On the other hand, sometimes "broken" info is better than no info. It really depends on the application, but as a general rule, private tags should only be handled by the applications that understand those tags.

Is there some elegant, automated implementation in the libtiff to copy all of the baselinetags or do i have to write a readingfunction for every single tag?

I don't think there is such functionality, but if you should choose to add it, it might be helpful to keep in mind that tags must always appear in numerical order in an IFD (some sort of elegance might be squeezed out of this fact). :-)