-
Notifications
You must be signed in to change notification settings - Fork 129
Open
Description
I have a tiff that starts with
4D 4D 00 2B 00 08 00 00 00 00 00 00 00 00 00 10
So, MM for big-endian, 43 for big tiff, 08 for magic and 0x10 for offset to first dir.
libtiff.net fails on this with "Can not read TIFF directory count".
Stepping through the code it reads the header with tiff_diroff=0x800 and then it messes it up even more in SwabBigTiffValue.
Wouldn't it better to read the header correctly immediately instead of trying to fix it up later? I.e. in readHeaderOk as soon as we read MM as tiff_magic we know all multibyte reads are big-endian. So when we read 0x2B00 don't store that in tiff_version but flip the bytes so that we don't miss the important further logic in readHeaderOk about bigTIFF
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels