exif-py icon indicating copy to clipboard operation
exif-py copied to clipboard

TIFF Header is not recognized in big endian HEIC files

Open mv1005 opened this issue 4 months ago • 0 comments

Problem Description When reading HEIC files encoded with big endian byte order, the TIFF Header is not recognized.

INFO   Opening: test.avif
DEBUG  Detected HEIC file
DEBUG  HEIC: found 'hdlr' Box hdlr, skipped
DEBUG  HEIC: found 'pitm' Box pitm, skipped
DEBUG  HEIC: 2 iloc items
DEBUG  HEIC: found Exif 'infe' box
DEBUG  HEIC: found 'iref' Box iref, skipped
DEBUG  HEIC: found 'iprp' Box iprp, skipped
DEBUG  HEIC: found Exif location.
DEBUG  Exif pointer to zeros, but found b'MM\x00*' instead of a TIFF header.
WARNING No EXIF information found

Sample File test.avif.zip

My investigation so far It seems that endianess is not respected when decoding the TIFF header itself. The message above claims that b'MM\x00*' is not valid TIFF header. But that is exactly what a TIFF header looks like when encoded in big endian.

mv1005 avatar Aug 14 '25 20:08 mv1005