AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2003.12.24 18:04 "[Tiff] writing custom tags with TIFFSetField", by Carl Collin
2003.12.26 11:51 "Re: [Tiff] writing custom tags with TIFFSetField", by Andrey Kiselev
2003.12.26 18:02 "[Tiff] Error with sample code to copy a custom tag", by Carl Collin
2003.12.26 18:32 "Re: [Tiff] Error with sample code to copy a custom tag", by Andrey Kiselev
2003.12.26 18:48 "[Tiff] CopyTag error again...", by Carl Collin
2003.12.26 19:17 "Re: [Tiff] CopyTag error again...", by Andrey Kiselev

2003.12.26 18:32 "Re: [Tiff] Error with sample code to copy a custom tag", by Andrey Kiselev

the copytag source code you sent me doesn't work. The error I receive...

_TIFFVSetField: Warning,  ... pass by value not implemented..
TIFFVGetField ... pass by value not imp.
_TIFFVSetField: Warning,  ... pass by value not implemented..
Carl2.tif: Error writing data for field "Wang".

Do you have any ideas?

Yes... I didn't check that code, so I have made a mistake. Following patch should solve the problem.

--- copytag.c.bak       Fri Dec 26 21:30:08 2003
+++ copytag.c   Fri Dec 26 21:30:15 2003
@@ -6,7 +6,7 @@
 static void TagExtender(TIFF *tiff)
 {
     static const TIFFFieldInfo xtiffFieldInfo[] = {
-        { TIFFTAG_WANG, -1, -1, TIFF_BYTE,  FIELD_CUSTOM,   1,  0,  "Wang" }
+        { TIFFTAG_WANG, -1, -1, TIFF_BYTE,  FIELD_CUSTOM,   0,  1,  "Wang" }
     };

     TIFFMergeFieldInfo(tiff, xtiffFieldInfo,

Andrey V. Kiselev
Home phone: +7 812 5274898 ICQ# 26871517