2004.08.27 05:08 "[Tiff] Copy custom TIFF tags", by Sachin Garg

2004.08.27 05:08 "[Tiff] Copy custom TIFF tags", by Sachin Garg

When using tiffcp (v3.7.0alpha), I noticed that it does not copies custom tiff tags.

The directory reading/writting routines support the custom tiff tags (by maintaining an expanding list of such tags).

I was trying to copy custom tags too (using the code copied below) but it aint working correctly. I guess I am able to read the values fine, but something wrong happens while trying to write.

uint32 count;
int  i;
count = (short) TIFFGetTagListCount(in);

for( i = 0; i < count; i++ )
{

        ttag_t  tag = TIFFGetTagListEntry( in, i );
        {
                short value_count;
                int j;
                void *raw_data;

                if( TIFFGetField( in, tag, &value_count, &raw_data ) != 1 )
                        continue;
                TIFFSetField(out, tag, value_count, raw_data);
        }
}

http://www.geocities.com/schngrg
http://sachingarg.go.to
schngrg@yahoo.com schngrg@gmail.com
sachingarg@msn.com sachin.garg@paxcel.net