The TIFF spec is unambiguous that IFD offsets shall be word-aligned, and TiffLibrary currently throws InvalidDataException when this is not the case. In practice however, many files in the wild violate this requirement, and most software can handle these files. As far as I can tell the decoder does not rely on this assumption and decodes such files fine if the checks for this (here and here) are removed. An option like "strict mode" for rejecting such files might allow for detecting spec violations while still being able to open files with this common spec noncompliance.
Some brief discussion here, archived from the libtiff mailing list from 2005.
The TIFF spec is unambiguous that IFD offsets shall be word-aligned, and TiffLibrary currently throws
InvalidDataException
when this is not the case. In practice however, many files in the wild violate this requirement, and most software can handle these files. As far as I can tell the decoder does not rely on this assumption and decodes such files fine if the checks for this (here and here) are removed. An option like "strict mode" for rejecting such files might allow for detecting spec violations while still being able to open files with this common spec noncompliance.Some brief discussion here, archived from the libtiff mailing list from 2005.