Published by @SoNiceInfo at 9/24/2026
Have you ever opened a photo from an iPhone or a recent camera on a Mac with a Liquid Retina XDR display and seen the sun, a sunset, or light glinting off water look as if it were actually glowing? That is what HDR (High Dynamic Range) photos can do.
But as soon as you convert those photos for the web or send them to someone, trouble starts: the highlights suddenly blow out and lose detail, or the whole image turns dark and dull. HDR images are structured very differently from SDR images, so ordinary tools can't process them correctly.
This article explains what HDR images are and how they work (gain maps versus PQ/HLG), then walks through practical ways to batch convert and export them on a Mac without losing HDR brightness or wide color.
HDR (High Dynamic Range) is a technology that records and displays a far wider range of brightness, from the darkest shadows to the brightest light, than the conventional SDR (Standard Dynamic Range) format.
SDR (sRGB), the long-standing standard for the web and computers, is based on a specification from the era of CRT televisions.
In SDR, white is just the value RGB(255, 255, 255). A sheet of white copy paper indoors, direct summer sunlight, and a streetlight against the night sky all hit the same ceiling of 100% white. Brighten the sun and the blue sky around it blows out to white; keep the sky clean and everything on the ground crushes to black. That was the physical limit of SDR.
On HDR displays (the Liquid Retina XDR display in MacBook Pro, Pro Display XDR, recent smartphones, and so on), normal screen brightness stays around 100–200 nits while only the highlights are boosted locally to 1,000–1,600 nits, and in some cases 4,000 nits or more.
| Feature | Conventional SDR image | Modern HDR image |
|---|---|---|
| Peak brightness | About 100–200 nits | 1,000–4,000+ nits |
| Color depth (gradation) | 8-bit (256 levels) | 10-bit (1,024 levels) to 12-bit |
| Color space (gamut) | sRGB | Display P3 / Rec.2020 (wide gamut) |
| Banding | Common in sunsets and skies | Extremely smooth gradients |
| Common formats | Standard JPEG, PNG, WebP | AVIF, JPEG XL, Ultra HDR JPEG, HEIC |
The shade under a tree stays calm and dark, while only the sunlight filtering through the leaves and the reflections on the water sparkle the way they do in real life. The result is much closer to what your eyes actually saw.
“HDR image” covers two broad approaches in use today: gain maps and direct encoding. Understanding the difference is the first step toward converting and handling them properly.



Gain maps are today's mainstream approach, designed with compatibility first.
Like film and broadcast (the Rec.2100 standard), direct encoding stores the image data itself as 10-bit or 12-bit values using a transfer function (curve) made for HDR.
Direct encoding stores no duplicate data and keeps files as small as possible, but in older environments that don't support it, the whole image can look washed out and faded.
Many people run into trouble when they try to convert a beautiful iPhone photo or HDR material exported from a camera into another format. There are three main causes.
HDR images carry color metadata called CICP (Colour Primaries, Transfer Characteristics, Matrix Coefficients), as well as binary gain map data.
Many image converters and free online services don't understand this newer metadata. They strip it out as “unneeded Exif data,” so the exported image is treated as ordinary sRGB and you end up with flat, dim contrast and dull colors.
Converting 10-bit data with a dynamic range above 1,000 nits straight into an 8-bit JPEG or PNG simply doesn't work.
If the converter doesn't apply proper tone mapping (an algorithm that compresses the tonal range), every bright area above 100 nits is clipped to RGB 255 (pure white), and the detail in the highlights is blown out.
The free converters you find by searching for “HDR converter” work by uploading your images to a server, often overseas.
Handing unreleased work, high-quality portfolio masters, client deliverables, or photos of family and friends to someone else's server is a real security and privacy risk. On top of that, most online converters don't properly support HDR, so what you get back is usually a degraded 8-bit SDR image.
If you work with HDR images on a Mac, the most reliable way to get high-quality results is the Mac app Image Tool+.
Image Tool+ is deeply optimized for Apple Silicon's image pipeline and correctly recognizes transfer curves, peak luminance, CICP, and gain maps (Apple HDR / Ultra HDR). It exports to AVIF, JPEG XL, WebP, and more while keeping HDR tonality and the wide Display P3 / Rec.2020 gamut intact.
Drag and drop your images
Drop several iPhone HEIC photos or HDR images from your camera straight from Finder. Whole folders work too.
Choose an output format
Pick AVIF for web delivery, JPEG XL for archiving photo masters, or WebP for the widest compatibility.
Press Start to export them all
On Apple Silicon, even hundreds of 10-bit HDR images finish in seconds to tens of seconds. Processing is fully local, so your images never leave your Mac.
macOS 12+ · Apple Silicon native · One-time purchase
For developers and engineers who want to automate conversion in scripts, here is how to encode HDR images with command-line tools installed through Homebrew.
The example below exports AVIF, the most widely supported HDR format on the web, with the official encoder avifenc (libavif).
brew install libavifTo export HDR correctly from the command line, you must explicitly specify 10-bit depth (--depth 10) and the CICP values. Leave them out and the image is encoded as ordinary SDR.
avifenc --depth 10 --cicp 9/16/0 input.png output_hdr.avifHere is what the main options mean:
--depth 10: Output 10-bit color (required for HDR).--cicp 9/16/0:9 = Colour Primaries: BT.2020 (wide gamut)16 = Transfer: SMPTE ST 2084 (the PQ curve)0 = Matrix: GBR / Identity18 (BT.2100 HLG) and specify --cicp 9/18/0.The command line is flexible, but keep the following in mind:
.heic file and carry it over to an AVIF gain map.If you process large numbers of photos regularly, a GUI app that detects all of this automatically (Image Tool+) will save you a great deal of trouble.
When you publish HDR images on a website or blog, keep in mind that not every visitor has an HDR monitor.
By combining the CSS media query dynamic-range with the HTML <picture> element, you can build an ideal responsive setup that serves a bright HDR image to HDR-capable environments and a lighter SDR image to everyone else.
<picture>
<!-- HDR displays: HDR AVIF with bright highlights and wide color -->
<source media="(dynamic-range: high)" type="image/avif" srcset="/images/posts/hdr/venice-sunset-hdr.avif" />
<!-- Standard SDR displays: a lighter SDR AVIF -->
<source type="image/avif" srcset="/images/posts/hdr/venice-sunset-sdr.avif" />
<!-- WebP fallback -->
<source type="image/webp" srcset="/images/posts/hdr/venice-sunset-sdr.webp" />
<!-- Final fallback -->
<img src="/images/posts/hdr/venice-sunset-sdr.jpg" alt="Sunset over the Venetian lagoon" width="1600" height="1000" loading="lazy" />
</picture>media="(dynamic-range: high)": This <source> is used when the display supports HDR. Firefox, however, renders HDR images as SDR, so a PQ/HLG AVIF can look dark there. Check how each browser renders the result.<img src="venice-sunset-ultrahdr.jpg"> is rendered automatically as HDR where supported and as SDR everywhere else.This page serves images set up exactly like the code above. The table shows what your display and browser report right now.
Support in your current setup
| HDR displayCSS (dynamic-range: high) | Detecting… |
|---|---|
| HDR videoCSS (video-dynamic-range: high) | Detecting… |
| Color gamutCSS (color-gamut) | Detecting… |
| Loading the HDR AVIFthe sample images below | Detecting… |
| Image chosen by <picture>img.currentSrc | Detecting… |
The media queries tell you whether the display and browser combination can handle HDR, not how bright the display can get. On a Mac the result changes when you move the window to another display or when brightness drops to save power, and this table updates automatically.

Detecting…
HDR
GAIN MAPOn an HDR display, only the sun and the sparkle on the water glow brighter in the HDR and gain map versions; the water and the paving stones stay as bright as in the SDR version. HDR does not make the whole screen brighter; it gives highlights brightness beyond the SDR white. When the display's headroom is below the image's peak (about 5× SDR white), the browser tone maps the PQ AVIF on its own while the gain map version is shown partway between its SDR and HDR renditions, so the highlights of these two can differ slightly in brightness and color.
Source: “Venice Sunset” by Greg Zaal (Poly Haven), CC0 1.0 (public domain). The view toward the sun is cropped from a real HDRI merged from bracketed exposures, and both the HDR and SDR versions are written from the same linear pixel data. SDR white = 203 nits, HDR peak 1000 nits (MaxCLL).
Several image formats support HDR. It's best to choose one based on what you need it for.
| Format | Key features and advantages | Best for |
|---|---|---|
| AVIF | About 50% smaller than JPEG. Supports 10/12-bit HDR (PQ/HLG) and gain maps. Every major browser displays AVIF, but only Chrome, Edge, and Safari 26+ show it as HDR; Firefox shows SDR. | The go-to format for HDR on the web |
| JPEG XL (.jxl) | Very high quality, with support for high bit depths and wide gamut. Existing JPEGs can be converted to it fully losslessly. Displayed in Safari 17 and later, as HDR from Safari 26. Chrome and Firefox are scheduled to enable it by default in October 2026 (Firefox shows SDR). Social platforms don't accept it, so it's not for sharing. | Long-term storage and archiving of photo masters |
| Ultra HDR (JPEG) | Adds a gain map to a standard JPEG. Shown as HDR on Instagram, Threads, Google Photos, iPhone, Android, Chrome, and Safari 26+. Its strength is compatibility: environments without HDR support still display it as a normal JPEG. | Social media and sharing (support by platform) |
| HEIC | The standard for capturing and storing photos on Apple devices. High quality and efficient, but Chrome, Edge, and Firefox can't display it, so convert to a gain map JPEG before sending it outside Apple devices. | Shooting and managing photos on iPhone and iPad |
For a closer look at how the formats compare, see our WebP vs AVIF comparison and our guide to batch converting images to JPEG XL.
The range of brightness they can show (dynamic range), along with their color gamut and tonal depth. SDR photos top out at roughly 100–200 nits and are limited to 8 bits (256 levels) per channel, so a bright light and a sheet of white paper both end up as the same “RGB 255”. HDR photos reach peak brightness of 1,000–4,000 nits or more with 10 bits (1,024 levels) or deeper, in wide gamuts such as Display P3 or Rec.2020, so highlights look as if they are actually giving off light while the shadows keep their detail.
A gain map is a grayscale map embedded in the metadata of a standard SDR image. It records how much brighter each pixel should become when the image is shown on an HDR display. SDR displays show the image as a normal photo, while HDR displays apply the map and make the highlights glow. Android's Ultra HDR, Apple's HDR photos, and the international standard ISO 21496-1 all use this approach.
Many common converters and websites can't handle the CICP tags or gain map information that HDR depends on, so they throw it away. Without that metadata the image is treated as ordinary sRGB and isn't tone mapped correctly: highlights clip to pure white, or the whole picture looks flat and gray.
Yes. Chrome and Edge (gain map JPEG from version 116, gain map AVIF from 129) and Safari 26 and later display HDR images. Firefox shows every HDR image as SDR, so always provide an SDR version or use a gain map format that falls back cleanly. The standard approach is to combine the CSS media query @media (dynamic-range: high) with the <picture> element, so visitors with HDR displays get a bright HDR image and everyone else gets a lighter SDR image.
You need an image app that correctly interprets transfer curves, peak luminance, CICP, and gain maps. With the Mac app Image Tool+, you can drag and drop iPhone HEIC photos or HEIF and RAW (DNG) files from your camera and batch convert them to AVIF, JPEG XL, or WebP while keeping HDR and wide color. Everything is processed on your Mac, so even unreleased photos are never uploaded anywhere.
As phone and computer displays improve, photography is moving quickly from SDR, which imitates paper, to HDR, which lets you see light itself.
But to make full use of the rich contrast and wide color of HDR photos, you need a workflow that handles CICP metadata and gain maps correctly. Convert them with a tool that only half understands HDR and blown highlights or dull colors will spoil an otherwise beautiful photo.
If you want to handle HDR photos on a Mac safely, simply, and reliably, give Image Tool+ a try. Drag and drop a folder, and your work comes out in next-generation formats with all of its light and color intact.
Mac App Store · One-time purchase · Fully local processing