2015.07.31 10:10 "[Tiff] How to use TIFFFieldDataType and TIFFFieldWithTag correctly?", by Andreas Romeyke

2015.07.31 13:25 "Re: [Tiff] How to use TIFFFieldDataType and TIFFFieldWithTag correctly?", by Olivier Paquet

2015-07-31 6:10 GMT-04:00 Romeyke, Andreas <Andreas.Romeyke@slub-dresden.de>:

In a function I want to recognize the datatype of given TIFF. I am using this piece of code, but I got datatype "16" instead of "4" as tiffdump prints out (StripByteCounts):

...

Please, could you point me, where I am going wrong? I am using libtiff 4.03 (Debian Jessie)

I doubt anything is really wrong with your code. 16 is TIFF_LONG8 (64-bit integer) which appears to be what libtiff always uses internally for the strip/tile byte counts. This was likely done to make BigTIFF support easier. tiffdump gives you the real value in the file because it does not use libtiff to read it.

I don't know enough about the intended purpose of TIFFFieldDataType() to say if this is a bug or not.

Olivier