Skip to content

TIFF Header is not recognized in big endian HEIC files #241

@mv1005

Description

@mv1005

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions