AWARE [SYSTEMS]
AWare Systems, , Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
June 2005

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
Archive maintained by AWare Systems



New Datamatrix section



Valid HTML 4.01!



Thread

2005.06.07 20:52 "EXIF and PS Layer copy question", by <stopp@quart-edv.de>
2005.06.08 13:22 "Re: EXIF and PS Layer copy question", by <stopp@quart-edv.de>
2005.06.08 15:45 "Re: EXIF and PS Layer copy question", by Bob Friesenhahn
2005.06.08 16:53 "Re: EXIF and PS Layer copy question", by <stopp@quart-edv.de>
2005.06.08 17:00 "Re: EXIF and PS Layer copy question", by Bob Friesenhahn
2005.06.09 19:43 "Re: EXIF and PS Layer copy question", by Andrey Kiselev

2005.06.07 20:52 "EXIF and PS Layer copy question", by <stopp@quart-edv.de>

Hi,

I have a question on copying exif-tag (34665) and photoshop-layer-tag 
(37724) with tiffcp, extended by the following code:

#define TIFFTAG_PS_LAYER 	37724
#define TIFFTAG_EXIF_IFD 	34665

static void TagExtender(TIFF *tiff)
{
     static const TIFFFieldInfo xtiffFieldInfo[] =
	{
         { TIFFTAG_PS_LAYER, TIFF_VARIABLE, TIFF_VARIABLE, 
           TIFF_UNDEFINED, FIELD_CUSTOM, 0, 1, "Photoshop_Layer" },
         { TIFFTAG_EXIF_IFD, TIFF_VARIABLE, TIFF_VARIABLE, TIFF_LONG, 
           FIELD_CUSTOM, 0, 1, "EXIF_IFD" },
     };

     TIFFMergeFieldInfo( tiff, xtiffFieldInfo,
                         sizeof(xtiffFieldInfo) / 
sizeof(xtiffFieldInfo[0]) );
}

int main (......)
{
	uint32 len32;
   	void** data;

	TIFFSetTagExtender(TagExtender);

	/* leaving out TIFFOpen and the other stuff */

   	if (TIFFGetField(in, TIFFTAG_PS_LAYER, &len32, &data))
		TIFFSetField(out, TIFFTAG_PS_LAYER, len32, data);

   	if (TIFFGetField(in, TIFFTAG_EXIF_IFD, &len32, &data))
		TIFFSetField(out, TIFFTAG_EXIF_IFD, len32, data);
	
	/*..............*/
}

Maybe it is too late today... this code is not copying the tags right. 
How do I copy them the right way.

Thanks! Best regard

jerry