Gain Map (HDR Photos)
Also known as: gain map hdr, ultra hdr gainmap, gain map hdr
A gain map is an extra grayscale layer stored inside an HDR photo that tells a display how much to brighten each pixel beyond the standard image. It lets one file look normal on SDR screens and brighter on HDR screens, at the cost of added file size.
- A gain map is a grayscale layer storing per-pixel brightness boosts for HDR displays.
- The base SDR image still shows everywhere; non-HDR apps just ignore the map.
- Used by Android Ultra HDR and recent iPhone HDR photos, it adds noticeable file size.
What a gain map does
A gain map turns an ordinary photo into an HDR-capable one without breaking compatibility. The file holds a normal SDR (standard dynamic range) base image plus a secondary grayscale map. The map encodes a per-pixel multiplier - how much extra brightness an HDR display should apply to highlights like the sun, lamps, or reflections.
On an HDR screen the device combines the base image with the gain map to recover bright highlights. On an SDR screen the gain map is simply ignored and the base image displays as usual. This is the approach behind Ultra HDR JPEGs on Android and the gain-map HDR photos produced by recent iPhone cameras.
How it is stored
The gain map is embedded as a second image within the same container, commonly a JPEG (Ultra HDR) or HEIC file, alongside metadata describing how to apply it. Because it is a full additional grayscale layer plus its parameters, an HDR photo is meaningfully larger than the same shot saved as plain SDR.
Apps that do not understand gain maps fall back to the base SDR image, so the photo still opens everywhere - it just looks flat on older software while quietly carrying the extra data.
Impact on storage
The brightness benefit comes at a size cost: every HDR photo bundles an extra layer, so a camera roll full of gain-map images takes more space than SDR equivalents. Re-saving or editing in apps that drop the gain map can shrink files but loses the HDR effect.
Cleanor helps here by surfacing your largest photos and duplicate or near-duplicate shots, so the storage spent on rich HDR images stays intentional rather than buried under redundant copies.