AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
June 2004

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2004.06.29 04:44 "Saving Exif with TiffLib", by Alex Kon
2004.06.29 07:29 "Re: Saving Exif with TiffLib", by Joris Van Damme
2004.06.29 09:18 "Re: Saving Exif with TiffLib", by Alex Kon
2004.06.29 13:04 "Re: Saving Exif with TiffLib", by Joris Van Damme
2004.06.29 15:30 "Re: Saving Exif with TiffLib", by Antonio Scuri
2004.06.29 16:36 "Re: Saving Exif with TiffLib", by Joris Van Damme
2004.06.29 17:01 "Saving Exif with TiffLib", by Jim Schueckler
2004.06.29 18:03 "Re: Saving Exif with TiffLib", by Andrey Kiselev

2004.06.29 15:30 "Re: Saving Exif with TiffLib", by Antonio Scuri

Unfortunately the Exif specification defines the Exif Tag as an Offset 
to a private IFD. It is not a complete IFD, just some simple tags with 
camera and user information.

I've got a sample from a Sony Mavica. I put it on the url:

     http://www.tecgraf.puc-rio.br/~scuri/exif_test.tif (9Mb)

Sorry about the file size, but even changing the configuration in the 
camera the image saved is 2048x1536. Also the TIFF generated by the Sony is 
not compressed, and I would like to preserve the original file.

Some time ago I sent a message to the list about Exif data.

My idea was to use TIFFSetSubDirectory to access the Exif subdiretory, 
but since it has no image, TIFFReadDirectory fail to load.

I also registered the Exif tags using TIFFSetTagExtender, just like the 
GeoTIFF tags.

The code looks like:

   short tag_count;
   void* data;
   if (TIFFGetField(tiff, TIFFTAG_EXIFIFDPOINTER, &tag_count, &data))
   {
     uint32 offset = *(uint32*)data;                       // I checked the 
                                  returned offset and it is correct
     if (!TIFFSetSubDirectory(tiff, offset))             // I debug the 
                                  code and returns when it does not find 
                                  the image size, tif_dirread.c line 374
       return;

     // Use TIFFGetField to get the tags
     // Reset the sub directory using TIFFSetSubDirectory
   }

Or we could have a function just to load the tags in that IFD with 
interfering in the TIFFSetSubDirectory/TIFFReadDirectory logic.

Best,
scuri