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

2005.10.20 15:26 "Re: [Tiff] Read EXIF Tag", by Frank Warmerdam

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;
 = TIFFGetField(tif, 0x8769, &count, &offset); BOOL bFound

is there anything i need to do before trying to read that tag?

Chris,

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. You apparently used the configuration that required count, but when it was formally added to libtiff it was done to not require the count.

Most built-in "known" tags that are single scalar values don't require the count. However we see a similar issue with unrecognised tags which will always be declared as requiring the count in TIFFGetField since we can't easily determine whether the tag we are seeing happens to be an array with one value in it, or a real scalar.

Best regards,
--

---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent