2009.10.28 15:18 "[Tiff] extending tags in "a"ppend mode?", by Juergen Buchmueller

2009.10.28 16:02 "Re: [Tiff] extending tags in "a"ppend mode?", by Frank Warmerdam

Hi list,

should it be possible to extend the tags of (the first directory of) an existing tiff file opened in "a"ppend mode?

What I'm trying to do is:
+ open an existing tiff file with TIFFOpen(...,"a")
+ create an array of TIFFFieldInfo
+ call TIFFMergeFieldInfo() with this array and count
+ Write some (string) tags that were defined in the array
+ close the tiff handle with TIFFClose()

It seems that TIFFClose() hangs somewhere and doesn't return, which is why I suspect that what I'm trying to do is impossible.

Juergen,

It should be possible to extend the first directory with new tags by opening in "r+" (update) mode, setting the tags and closing. I don't know why you are seeing the behavior you encountered. I would have expected it to attempt to append a new image directory and complain about your not providing a complete set of tags to define an image.

It might be helpful if you provided a minimal program and file demonstrating your problem.

Also, in place update of directories is always an iffy procedure with libtiff but I would strongly encourage using the most recent release (3.9.1?) if you are trying this.

Best regards,
--
---------------------------------------+--------------------------------------

I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam

and watch the world go round - Rush    | Geospatial Programmer for Rent