2015.04.03 14:22 "Re: [Tiff] problem reading directories past 2GB on a 64bits system", by Romain Franconville
No, the directory count is well below 64k. It seems to have to do with the 2Gb limit, as I always get the error for the first frame going over it. I'll try to check how the software producing those tiff writes them, it's probably the source of the problem: so far I haven't found a single tiff reading library able to open them completely.
2015-04-02 21:59 GMT-04:00 Bob Friesenhahn <firstname.lastname@example.org>:
> I'm using libtiff 4.0-3 on Ubuntu (64bits) 14.04.
I'm trying to read tiff files that are signed 16bits. Everything run smoothly for files smaller than 2Gb. But I cannot access directories past that limit.
TIFFSetDirectory returns the following error in those cases:
TIFFFetchDirectory: Sanity check on directory count failed, zero tag
directories not supported.
>> TIFFReadDirectory: Failed to read directory at offset 256.
Opening as bigtiff doesn't make a difference (expected since it's still less than 4Gb).
>> Any ideas of what might be going on?
Now that I am looking at the code, I see that the directory count is expected to fit in a 16-bit storage size. Is it possible that you have more than 64k entries?
This is the relevant code (after passing several other checks):
dircount16 = (uint16)dircount64;
dirsize = 20;
if (dircount16 == 0 )
"Sanity check on directory count failed, zero tag directories not supported");