2005.09.28 00:49 "[Tiff] PSP libtiff hack?", by Frank Warmerdam

2005.10.20 22:52 "Re: [Tiff] Read EXIF Tag", by Chris Losinger

At 11:26 AM 10/20/2005, Frank Warmerdam wrote:
>On 10/19/05, Chris Losinger <losinger@earthlink.net> wrote:
> >
> > i just dropped-in LibTiff v3.7.4, and i'm having trouble
> reading tag
> > 0x8769 (TIFFTAG_EXIFIFD).
> >

> >     long *offset = 0;
> >     UINT16 count = 0;
> >     BOOL bFound = TIFFGetField(tif, 0x8769, &count, &offset);

> > is there anything i need to do before trying to read that tag?
>As Lou suggests, you don't need the count in the call. The problem
>is that whether a count is required or not by TIFFGetField() is
>determined by the TIFFFieldInfo declaration for the field.


but, the problem is not that i'm getting wrong values back in count and offset (as you'd expect, if you give a varargs call like TIFFGetField an unexpected number of parameters). the problem is that TIFFGetField is returning 0.

more specifically, TIFFVGetField is returning 0 because both isPseudoTag and TIFFFieldSet are returning 0.

it doesn't even have a chance to crash, or give me garbage, or whatever it's going to do, in _TIFFVGetField.


Chris Losinger

smallest@smalleranimals.com http://www.smalleranimals.com