FAILURE MAP
← Case archive

FA-78929 / Image orientation metadata / Member archive

Orientation entries of type LONG are trusted · case 04

A malformed LONG orientation entry shadows a later valid SHORT entry.

Member previewVariant 4 · 3 implementations · 8 checks per implementation

Case contract

Parse the orientation from an APP1 Exif payload given as a list of byte values: a 6-byte "Exif\0\0" header, then a TIFF header (II little-endian or MM big-endian, magic 42 as a 16-bit value, 32-bit IFD0 offset relative to the TIFF header). Scan IFD0 12-byte entries; the first entry with tag 0x0112, type SHORT (3) and count 1 supplies the value from the first two bytes of its value field. Values outside 1..8 and a missing entry yield 1; structural problems (short payload, bad header, byte order, magic, truncated entry) yield "malformed".

Why this case matters

Camera, phone and scanner images carry an orientation hint separately from the stored pixels; galleries, thumbnailers, editors and upload pipelines must interpret it consistently or photos appear sideways, mirrored or doubly rotated.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression: orientation entry type filter 018Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗