2011.01.05 22:17 "Re: [Tiff] Cannot add EXIF tag to image being written (non-EXIF tags are being added)", by Andreas Kleinert
there is no direct support for EXIF tags in libtiff - instead they are kept in a private IFD (TIFFTAG_EXIFIFD) which has to be handled by your custom code. You possibly might want to use a dedicated exif library instead, like libexif or exifv2.
Andreas, author of SView5
-------- Original Message --------
Subject: [Tiff] Cannot add EXIF tag to image being written (non-EXIF tags are being added)
One more try. using v3.9.4 of libtiff and cannot add EXIF tag(s) I’m to the image being written. ImageWriteTiff is the main call. Everything works as expected except that the tag EXIFTAG_FOCALLENGTH is not being added to the image. No error occurs.
I just started using libtiff for adding tags a few days ago and am not sure if missing something that should be obvious (with experience I’m with the lib) or if I hit a bug.
result = TIFFSetField(tiff, TIFFTAG_SUBFILETYPE, (USHORT) 0);
result = TIFFSetField(tiff, TIFFTAG_MAKE, "Allied");
result = TIFFSetField(tiff, TIFFTAG_MODEL, "GC2450C");
// Does not work no error no tag value added to TIFF image when – written other tags added above are added –
result = TIFFSetField(tiff, EXIFTAG_FOCALLENGTH, (float) 12.5F);