2005.01.28 22:54 "Re: [Tiff] planarconfig", by Antoine
Looking at the tiff spec apparently planarconfig is not a required tag. It defaults to 1. I have a tiff that has a planar config of 1. My understanding was that when a tag is at at default value then it doesn't have to be included (copied to the new file), because that value will be assumed. However, if I do not copy planarconfig into the new file before copying over the image then I get a
atafieur: b.tif: Don't know how to copy/convert image.
Is there something I am missing about how tiff works?
It sounds like the reading program is not properly supplying the default value.
Hi I probably should have stipulated that I was using a modified tiffcp to do this. So it is basically TIFFGetField and TIFFSetField. Basically I got rid of the loop at the end (of the function tiffcp) which copies all the tags left (the "important/difficult/configurable" ones having been dealt with individually) over to the new file and tried to get only those tags I wanted. I then tried to get rid of some of the "important" but not strictly necessary tags, like planarconfig. I believe I have found a solution to my problem however, or at least for everything for the initial IFD offset - opentiff. opentiff has a remove tag functionality (which I need), and changes the datatype of rowsperstrip to long (also needed). It doesn't deal with fax G4 compressed images but I can always decompress with libtiff if I actually need to move an image around.
ps. I still don't understand why, but opentiff won't copy an image over if planarconfig is not set but will happily remove it afterwards.