AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2003.12.26 18:02 "[Tiff] Error with sample code to copy a custom tag", by Carl J. Collin
2003.12.26 18:32 "Re: [Tiff] Error with sample code to copy a custom tag", by Andrey Kiselev
2004.02.03 17:42 "[Tiff] Re: Recent Post you made about Custom Tags", by Frank Warmerdam

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

On Fri, Dec 26, 2003 at 12:02:55PM -0600, Carl J. Collin wrote:

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