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
December 2005

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

2005.12.03 07:15 "Attempting to parse EXIF data (in a JPEG) with libtiff", by Joshua Muskovitz
2005.12.03 13:59 "Re: Attempting to parse EXIF data (in a JPEG) with libtiff", by Andrey Kiselev
2005.12.03 17:04 "Re: Attempting to parse EXIF data (in a JPEG) with libtiff", by Bob Friesenhahn

2005.12.03 07:15 "Attempting to parse EXIF data (in a JPEG) with libtiff", by Joshua Muskovitz

Hi all,

I'm trying to implement an JPEG/EXIF parser using libtiff.  Separately, I am 
able to extract the EXIF block from the source jpeg image, and I can see 
that it has the proper "II" preamble for TIFF.  I can also see the textual 
EXIF data within the block.

When I try to parse the data with libtiff, I fail in this logic in 
TIFFReadDirectory, called from TIFFClientOpen:

    if (!TIFFFieldSet(tif, FIELD_IMAGEDIMENSIONS)) {
        MissingRequired(tif, "ImageLength");
        goto bad;
    }

which fails, and then I'm dumped out of the file and unable to parse it. 
Now valid EXIF blocks supposedly have no image data in the 0th IFD, and I 
suspect this is the reason it chokes.

As a reality check, I *am* able to parse actual TIFF image files using my 
libtiff wrappers, so I have confidence that that isn't the problem.

Am I nuts to be attempting this in the first place?  Is there something 
obvious I'm missing here?

Joshua Muskovitz
Lead Software Engineer
Preclick Corporation
josh@preclick.com
www.preclick.com