Tools / Encode

Add real HDR headroom to an image

Encodes a gain-map JPEG (Ultra HDR style) — the one HDR output format Phase 0 proved works end-to-end, entirely locally. Every export is round-trip validated before you can download it.

Drop an image here
or choose a file
JPEG · PNG · WebP · AVIF

How Encode actually works

Encode runs a two-pass pipeline, entirely in a Web Worker so the tab stays responsive. Pass one computes a gain map against your original image — for each pixel, how much brighter it should get based on the mode and settings you picked, expressed as a log2 ratio. That gets fed through the same tone-mapping math Preview uses to produce a boosted primary image: the actual visual result you see in the live preview.

Pass two recomputes the gain map — this time against that boosted primary, not the original. That's deliberate: an HDR-capable viewer reconstructs brightness as primary × 2^gain. If the gain map were still computed against the unboosted original while the primary already carries the boost, a real HDR viewer would apply the boost twice and blow out the highlights. Recomputing against the actual shipped primary keeps the math self-consistent.

The primary and the gain map are both encoded as real JPEGs, then spliced together with hdrgm XMP metadata via an MPF container — the same structure Ultra HDR and Adobe's Gain Map spec describe. Before the download link ever becomes clickable, the resulting file is decoded back apart and checked: does the whole file still open at the right dimensions, does the embedded gain map decode at the right dimensions too. Only a genuine pass unlocks the download.

Questions people actually ask

Why does the exported file look boosted even in apps that don't support HDR?
By design, in this build: the boost is baked into the primary image itself (see the Superwhite mode explainer on the homepage for the mechanics), not left as a separate gain-map-only effect. That trades away the standard Ultra HDR convention of a flat, untouched SDR fallback — the file looks boosted everywhere, not just in gain-map-aware viewers. The gain map is computed against that boosted primary specifically so an HDR-capable viewer still reconstructs the correct target brightness on top of it, instead of double-boosting.
What's the actual difference between Superwhite, Highlight HDR, and Full HDR?
Superwhite only boosts pixels near clipping — genuinely bright, close-to-blown highlights — using a fixed threshold, not the adjustable one. Highlight HDR boosts everything above the threshold you set with the slider, which can be tuned to affect much more of the image. Full HDR boosts the entire tonal range proportionally, including midtones, not just highlights.
What happens if round-trip validation fails?
The download stays blocked. Every export gets decoded back apart immediately after being built — the primary image and the gain map both get re-parsed and checked against the expected dimensions. If that check fails, you see the real error, not a file that merely looks correct.
Does Encode work on any image I upload?
It needs to actually decode the file first, which covers JPEG, PNG, WebP, and AVIF — the formats this browser can confirm it decodes (see the Compatibility Checker for what's verified locally, live). If decoding fails, you get a real error, not a silently broken export.