Lane B3 — on-device HEIC decode: orientation proof

Left = trusted reference (libheif heif-dec). Right = our fast on-device path (the app's exact libheif/WASM decode, run here in real headless Chromium, re-encoded on OffscreenCanvas at JPEG q0.92 — identical to what a host's upload produces). Every pair is visually identical.

Root cause of the old sideways portrait: the prior "proof" fixture was a landscape photo whose pixels were physically rotated 90° and saved with no orientation metadata (irot=0, EXIF Orientation=1). Every faithful decoder renders that sideways — and the old test asserted output dimensions only, so a sideways-stored 1073×1600 passed as a "portrait". The decode path itself was correct. These fixtures carry real HEIF transforms for all 8 orientations, and the new regression test asserts pixel content, not just shape.

Displayed at 390px wide

Bedroom — real iPhone-style portrait (orientation 6) — THE FLAGGED CASE
reference Bedroom — real iPhone-style portrait (orientation 6) — THE FLAGGED CASE
Trusted reference (heif-dec) · 54 KB
ours Bedroom — real iPhone-style portrait (orientation 6) — THE FLAGGED CASE
Our in-browser WASM decode · 55 KB
EXIF orientation 1 — Normal
reference EXIF orientation 1 — Normal
Trusted reference (heif-dec) · 6 KB
ours EXIF orientation 1 — Normal
Our in-browser WASM decode · 6 KB
EXIF orientation 2 — Mirror horizontal
reference EXIF orientation 2 — Mirror horizontal
Trusted reference (heif-dec) · 6 KB
ours EXIF orientation 2 — Mirror horizontal
Our in-browser WASM decode · 6 KB
EXIF orientation 3 — Rotate 180
reference EXIF orientation 3 — Rotate 180
Trusted reference (heif-dec) · 6 KB
ours EXIF orientation 3 — Rotate 180
Our in-browser WASM decode · 6 KB
EXIF orientation 4 — Mirror vertical
reference EXIF orientation 4 — Mirror vertical
Trusted reference (heif-dec) · 6 KB
ours EXIF orientation 4 — Mirror vertical
Our in-browser WASM decode · 6 KB
EXIF orientation 5 — Mirror + rotate 270° (transpose)
reference EXIF orientation 5 — Mirror + rotate 270° (transpose)
Trusted reference (heif-dec) · 6 KB
ours EXIF orientation 5 — Mirror + rotate 270° (transpose)
Our in-browser WASM decode · 6 KB
EXIF orientation 6 — Rotate 90° CW
reference EXIF orientation 6 — Rotate 90° CW
Trusted reference (heif-dec) · 6 KB
ours EXIF orientation 6 — Rotate 90° CW
Our in-browser WASM decode · 6 KB
EXIF orientation 7 — Mirror + rotate 90° (transverse)
reference EXIF orientation 7 — Mirror + rotate 90° (transverse)
Trusted reference (heif-dec) · 6 KB
ours EXIF orientation 7 — Mirror + rotate 90° (transverse)
Our in-browser WASM decode · 6 KB
EXIF orientation 8 — Rotate 90° CCW
reference EXIF orientation 8 — Rotate 90° CCW
Trusted reference (heif-dec) · 6 KB
ours EXIF orientation 8 — Rotate 90° CCW
Our in-browser WASM decode · 6 KB

Displayed at 1280px wide

Bedroom — real iPhone-style portrait (orientation 6) — THE FLAGGED CASE
reference Bedroom — real iPhone-style portrait (orientation 6) — THE FLAGGED CASE
Trusted reference (heif-dec) · 421 KB
ours Bedroom — real iPhone-style portrait (orientation 6) — THE FLAGGED CASE
Our in-browser WASM decode · 439 KB
EXIF orientation 1 — Normal
reference EXIF orientation 1 — Normal
Trusted reference (heif-dec) · 25 KB
ours EXIF orientation 1 — Normal
Our in-browser WASM decode · 25 KB
EXIF orientation 2 — Mirror horizontal
reference EXIF orientation 2 — Mirror horizontal
Trusted reference (heif-dec) · 25 KB
ours EXIF orientation 2 — Mirror horizontal
Our in-browser WASM decode · 25 KB
EXIF orientation 3 — Rotate 180
reference EXIF orientation 3 — Rotate 180
Trusted reference (heif-dec) · 25 KB
ours EXIF orientation 3 — Rotate 180
Our in-browser WASM decode · 25 KB
EXIF orientation 4 — Mirror vertical
reference EXIF orientation 4 — Mirror vertical
Trusted reference (heif-dec) · 25 KB
ours EXIF orientation 4 — Mirror vertical
Our in-browser WASM decode · 25 KB
EXIF orientation 5 — Mirror + rotate 270° (transpose)
reference EXIF orientation 5 — Mirror + rotate 270° (transpose)
Trusted reference (heif-dec) · 25 KB
ours EXIF orientation 5 — Mirror + rotate 270° (transpose)
Our in-browser WASM decode · 25 KB
EXIF orientation 6 — Rotate 90° CW
reference EXIF orientation 6 — Rotate 90° CW
Trusted reference (heif-dec) · 25 KB
ours EXIF orientation 6 — Rotate 90° CW
Our in-browser WASM decode · 25 KB
EXIF orientation 7 — Mirror + rotate 90° (transverse)
reference EXIF orientation 7 — Mirror + rotate 90° (transverse)
Trusted reference (heif-dec) · 25 KB
ours EXIF orientation 7 — Mirror + rotate 90° (transverse)
Our in-browser WASM decode · 25 KB
EXIF orientation 8 — Rotate 90° CCW
reference EXIF orientation 8 — Rotate 90° CCW
Trusted reference (heif-dec) · 25 KB
ours EXIF orientation 8 — Rotate 90° CCW
Our in-browser WASM decode · 25 KB