Auto-Upright Rotation FixSingle-pass irot/EXIF reconciliation, output Orientation=1 or stripped

HEIC Single-Pass Orientation Fixer

Eliminate sideways iPhone portrait exports by reconciling container `irot`/`imir` transforms against EXIF `Orientation` (`1..8`) in a single pixel pass.

Drop iPhone HEIC photos here — upright & private

30 MB / 48 MP per photo · stays on your device · Burst series & Live Photo stills supported.

Save As:
Burst Selection, JPG Quality & Batch Naming
Verified Sample · CC0-1.0Sample file: portrait-burst-o6.heic (10.1 KB)

Verified Sample Result & Instant Demo

Try Sample File in 1 Click

How is portrait-burst-o6.heic straightened without double rotation? Container irot is absent while EXIF Orientation=6 is present; applying matrix [0,-1,1,0] rotates 32×24 storage 90 degrees CW once to 24×32.

Authoritative Transform Source
exif-orientationsource
Applied 2×2 Matrix
0,-1,1,0basis
Dimensions Before to After
32×24 to 24×32px
Input EXIF Orientation
6code
Cryptographic SHA-256 & Engine Provenance
Sample Input File
portrait-burst-o6.heic · 10339 bytes · CC0-1.0
Browser Codec Engine
libheif-js 1.23.5
Input SHA-256 Digest
682c6b4d505a79bc2f967d7cbddae9bf5b0586022a0ca4f1ba9b0d5639a2f75a
Engine Artifact SHA-256
095194187be00d3e36335b8ad7f5552d70655e5e2159486d7d36cd4daa47bba9
Reference Verification
TIFF 6.0 Tag 0x0112 + ISO 23008-12 single-pass
Schema & Preset ID
heic.heictopngtool.heic-orientation-fix.v1 · single-pass-orientation-fix · proj-a-exif6-matrix

Why iPhone HEIC Portraits Turn Sideways & How Single-Pass Matrix Normalization Fixes Them

The Two Competing Orientation Mechanisms Inside HEIC

Camera sensors read out rows in landscape scan order regardless of how you hold the handset. When shooting a vertical portrait, an iPhone can record that 90-degree rotation in two separate places inside a .heic file: as an authoritative ISO BMFF irot transformative item property inside ipco, and as TIFF tag 0x0112 (Orientation = 6) inside an attached Exif metadata item.

When libheif decodes an item that possesses an irot or imir property, it applies that container transform automatically during RGBA display. However, if a container omits irot and stores rotation solely in EXIF (as in portrait-burst-o6.heic), libheif returns unrotated 32×24 landscape pixels. Conversely, if a file carries both irot and EXIF Orientation = 6 and a naive converter applies EXIF rotation on top of libheif output—or copies Orientation = 6 into the output JPEG—the portrait rotates 180 degrees or 90 degrees too far.

  • Inspects ipma transformative properties per item before consulting numeric EXIF Orientation (1 through 8).
  • Prefers authoritative container presentation transforms and suppresses duplicate EXIF rotation.
  • Applies exact lossless 2D coordinate remapping across all eight TIFF orientation states when container transforms are absent.

Quadrant Landmark Verification

Every run computes mean sRGB landmarks across all four image quadrants before and after normalization so you can verify mathematically that bottom-left pixels moved to top-left under 90-degree clockwise rotation.

Common Questions & Answers

What happens if a HEIC file has both container irot and EXIF Orientation 6?

Our reconciler honors the container irot transform applied by libheif, flags the duplicate EXIF tag as suppressed, and writes upright pixels with Orientation stripped or reset to 1.

Does rotating pixels in RGBA degrade PNG quality?

No. Orthogonal 90/180/270-degree rotations and axis flips permute integer pixel coordinates on an exact sample grid with zero interpolation blur.

100% Private In-Browser Processing

Verified local execution

  • Zero Cloud Uploads

    Your files stay on this device and are never sent to any remote server.

  • Instant Local Speed

    Runs directly on your device up to 30 MB with no upload queue.

  • No Account Needed

    Open a file, inspect your preview, and download immediately without signing up.

View Security Architecture
Execution Sandbox
Dedicated Web Worker
Post-Init Network
Locked (0 Egress)
Max File Budget
30 MB
Cross-Origin Isolation
Single-Thread WASM

After local WebAssembly initialization, Worker network APIs (fetch, XMLHttpRequest, WebSocket) are locked to prevent outbound data egress.