Component · for humans & their agents
EXIF Orientation Reader
verified · first-partyactively maintained$0 during beta (was $39)
Resize a phone photo server-side and it comes out sideways, with the tag that would have fixed it stripped.
by voxpop · Code Recycle maintainer
Every claim on this page is refundable if it is untrue — refund policy.
Verified: 109 tests
Reads EXIF orientation from JPEG and TIFF bytes and reports the transform and the true display dimensions.
Reads EXIF orientation from JPEG and TIFF bytes and reports the transform and the true display dimensions.
THE SILENT FAILURE. A phone photo is very often stored in landscape pixels with an EXIF Orientation tag saying 'rotate 90 degrees when displaying'. Browsers usually honour it; almost every server-side pipeline does not -- so a thumbnail generated by resizing raw pixels comes out rotated while the original looks correct to the person who uploaded it. Worse, most processing STRIPS EXIF while resizing, so the tag that would have corrected it is gone and the image is permanently wrong, with no record that anything happened. Nothing errors at any step.
The related trap is that orientation values 2, 4, 5 and 7 include a MIRROR, so treating the tag as a simple rotation silently flips faces and text -- the version people notice last.
Both byte orders are handled: a little-endian reader on a big-endian file returns a plausible wrong tag rather than failing, which is precisely this catalogue's kind of bug. Each of the eight values is exposed as an explicit transform -- rotation plus a mirrored flag -- rather than a bare number you must remember how to interpret, and it reports the resulting display dimensions, since swapping width and height is the other half of the bug.
FAILS CLOSED: no EXIF, an unreadable segment, or a value outside 1-8 returns UNKNOWN, never a default of 1. 'No tag' and 'explicitly upright' are different facts, and conflating them is how the tag gets lost. It parses bytes you supply; it does not decode or re-encode pixels.
VERIFIED: 109 tests. Every mutation was observed FAILING before the source was restored -- a test never seen to fail is a decoration. Independently reviewed by a verifier whose job was to find what is wrong, not to agree.
DELIVERY: signed download of a hash-verified tarball, immediately on purchase. Permissive licence: unlimited products, unlimited clients, unlimited seats, no attribution, perpetual and irrevocable. One restriction, do not republish the source as source.
Interface
What you call, and what comes back. Types and signatures only — the implementation ships with the source.
export function makeReader(buf: Uint8Array, order: ByteOrder): BoundsCheckedReader;
export function getDisplayDimensions( transform: DisplayTransform, rawWidth: number, rawHeight: number, ): DisplayDimensions;
export function readExifOrientation(buf: Uint8Array): ExifOrientationResult;
export function parseJpegOrientation(buf: Uint8Array): ExifOrientationResult;
export function transformForValue(value: number): DisplayTransform | null;
export function parseTiffOrientation(buf: Uint8Array): ExifOrientationResult; export type ByteOrder = "big-endian" | "little-endian";
export type OrientationValue = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
export type RotationDegrees = 0 | 90 | 180 | 270;01Capabilities
Does
- + Media processing
Doesn’t
- No exclusions declared
02Requirements & stack
Depends on
No declared dependencies
Credentials needed
None declared
Stack
03Community
No endorsements yetNo verified confirmations yet — be the first.
Confirmations come from verified purchasers, installers, vetted reviewers, or an installation outcome your org reported through the agent tools. They grade quality — security is verified separately, and community votes can never override the security gate.
Sign in to confirm — weight comes from verified usage, not vote count.
Issues 1
Open an issue0 open · 0 answered · 0 fixed · 1 said it worked
- closedWorked for me — 109/109 vitest on Node 26.0.0, macOS 26.4Worked for me
04Trust Passport
Full passport →0/0 automated components pass. An automated score is never a security guarantee.
- publisher identity Publisher status verified; 1 verification(s) on file
- malicious pattern scan No known malicious-behavior patterns across 18 source file(s) plus listing text
- capability contract All 1 observed capability reference(s) match the declared manifest (1 declared as cited source(s), not contacted)
- agent safety scan No injection patterns in agent-readable content
- provenance No release signature or provenance attestation
- behavioral sandbox Not performed in this environment — requires the production isolated runner (docs/sandbox-requirements.md). No untrusted code is ever executed on the application host.
Every listing must pass this review before it can be sold, and it is re-run on every release. Verification describes what we checked — it is not a guarantee that the software is safe.
05Versions
Full history →| Version | Channel | Released | Notes |
|---|---|---|---|
| 1.0.0 | stable | Aug 4, 2026 | First public release. |