Greg Rickaby

Greg Rickaby

Full-Stack Engineer / Photographer / Author

Brightening the Frame: How Gain Maps Elevate HDR Photography

Posted on | 11 minute read

High Dynamic Range (HDR) photos, displaying a wider range of brightness, contrast, and colors than Standard Dynamic Range (SDR), come to life on HDR-capable screens. With brighter highlights, detailed shadows, and vibrant colors, they convey a deeper sense of realism. This enhanced visual storytelling allows photographers to share a richer reflection of their experiences, capturing the essence of the moment.

A Brief History

For many years there have been two other types of “HDR” in photography. The over-the-top saturated ones from 2012…

An oversaturated and overly darkened “HDR” image from 2012

… to the ones captured via exposure bracketing and edited with HDR photo merge in Lightroom.

Dave's Falls
An HDR photo merge using Adobe Lightroom | Sony a7R IVA | Tamron 35-150mm

This post is not about those HDR pretenders though, because at the end of the day: the two photos above only have 8 bits worth of data and are inthe sRGB colorspace.

This post is about true High Dynamic Range photos– which can be seen in a larger colorspace and shown at a much higher luminance.

The Need For More Nits and Bits

Most images on the web only contain 8 bits worth of information and are in the sRGB color space. Most monitors can only display ~200-300 nits of brightness.

A graph plotting various color spaces and how they relate to the visible color spectrum

Did you know that cameras have been capturing RAW photos with more than 8 bits and in larger colorspaces like Adobe RGB going back 20+ years? The problem was that there was no practical way to “work” with those extra bits (or even view them on a display with enough nits).

Nowadays there are HDR-capable displays everywhere… smartphones, TVs, laptops, and more. Not only can these devices render all the colors contained in DCI-P3, Adobe RGB, and even the newer Rec.2020 colorspaces, but they also have many times the peak brightness as SDR displays. For example, the iPhone 15 Pro has up to 2,000 nits of peak brightness (while outdoors), and the current 14″ and 16″ MacBook Pros can display 1,000 nits of sustained brightness. In comparison, the best-selling LCD monitor on Amazon can only display 250 nits.

Even though modern displays have the ability to display true HDR photos, and that data already present in RAW files, the missing link has been a photo editor capable of editing in true HDR.

Adobe To The Rescue

In October 2022, Adobe released a technology preview of their High Dynamic Range Output in Adobe Camera Raw. This preview allowed Photographers to experiment with exporting images greater than 8-bit and viewing them on HDR-supported displays. The workflow was a bit cumbersome though and browser support was lacking, so for the last year, there wasn’t much you could do with your HDR photos except view them on your own computer.

Earlier this month (October 2023), Adobe released a new version of Lightroom Classic that brought full support for editing and displaying HDR photos. Finally, the missing link has been found!

A screenshot of Adobe's new HDR histogram and sliders
A screenshot of Adobe Lightroom Classic’s new HDR histogram and sliders

What Are Gain Maps?

Without getting too technical, a gain map is a tool in image processing used to adjust the intensity or brightness of an image. It’s a matrix of values that, when applied, multiply the original pixel values to brighten or darken different areas of the image independently. This allows improved shadow and highlight rendering and preparing images for further analysis in applications like medical imaging and machine vision systems.

If you want to deep dive into the technical side, check out the full spec and visit Greg Benz’s website to learn all about the technical details. If you want a basic introduction to HDR, Greg also has an awesome page that explains everything and an example gallery featuring beautiful HDR photos. Check it out!

Ok, Gain Maps sound interesting. So what?

If a user’s web browser can read a Gain Map and the device they’re viewing with can display it, the user will see the full HDR version of the photo you’re sharing. Otherwise, the web browser will automatically revert to the standard SDR version. This advancement means that as a photographer, you can export a single image today with support for both HDR and SDR, saving you from additional work in the future.

A screenshot of Adobe Lightroom's export settings to enable a Gain Map
A screenshot of Adobe Lightroom’s export settings to enable a Gain Map

Examples

While on vacation at Disney World, I snapped this photo while in the queue for Remy’s Ratatouille Adventure at EPCOT. (BTW: I love this scene because who wouldn’t want to have a studio space this lovely?!)

This first image is a regular ‘ol JPG right out of Lightroom:

Remy's Ratatouille Adventure SDR
SDR (JPG) | Sony a7R IVA | Sony 16-35mm PZ | 1/160 sec, f/4, ISO 10000

Here is the same image, edited with Lightroom’s new HDR sliders and exported as a JPG with a Gain Map:

Remy's Ratatouille Adventure - HDR
HDR (JPG) | Sony a7R IVA | Sony 16-35mm PZ | 1/160 sec, f/4, ISO 10000

The difference is subtle, the light from the lamps is not only brighter but there’s also no banding. Remy’s chef hat is a brilliant white– and matches what I saw in person, not a dull shade of blue.

Finally, here is the same image exported as an AVIF with a Gain Map:

Remy's Ratatouille Adventure - HDR with SDR fallback (AVIF)
HDR (AVIF) | Sony a7R IVA | Sony 16-35mm PZ | 1/160 sec, f/4, ISO 10000

If all three of the images look the same, it’s because you may have an incompatible web browser or a non-HDR display. But that’s the beauty of Gain Maps! You can still see the SDR version because it is baked right into the same file!

This next example is one of my favorite photos: Christmas at Hollywood Studios on Hollywood Boulevard. With all the decorations and lights, the neon, sounds, smells, dramatic clouds overhead. This moment was electric!!

HDR (JPG) | Sony a7R IVA | Tamron 35-150mm | 1/40 sec, f/2, ISO 640

Unfortunately, the SDR version does not do this scene justice. It simply fails to fully capture the brilliance and the ambiance of standing on Hollywood Boulevard at Christmas time.

The HDR version does a much better job though! It is a much closer representation of what my eye saw and how I felt at that moment. As a photographer, isn’t that exactly what we’re trying to do?

Christmas at Hollywood Studios on Hollywood Boulevard
HDR (JPG) | Sony a7R IVA | Tamron 35-150mm | 1/40 sec, f/2, ISO 640

Here’s a photo of Cinderella’s Castle right before the fireworks. The SDR version captures the various shades of purples being projected onto the castle. It’s just okay though.

SDR (JPG) | Sony a7R IVA | Tamron 35-150mm | 1/40 sec, f/2, ISO 2500

And here is the HDR version…

HDR (JPG) | Sony a7R IVA | Tamron 35-150mm | 1/40 sec, f/2, ISO 2500

Even at a higher ISO, Lightroom’s HDR workflow is able to bring up the vibrance of the street lamps, the back-lit “50” on the front of the castle, and reduces the banding in the shades of purple. It took an “okay” photo and made it a bit more interesting.

Too Much of a Good Thing

It’s very easy to overdo it with the HDR “highlights” and “whites” sliders in Lightroom, as I did in this photo from Indiana Jones™️ Epic Stunt Spectacular. I cranked it to eleven!

HDR (JPG) | Sony a7R IVA | Tamron 35-150mm | 1/1250 sec, f/4, ISO 160

If you’re not careful, your photo may end up looking unrealistic and overly processed (like those terrible “HDR” images from 2012). My recommendation would be to keep your editing tasteful so you don’t blind your viewers!

But Can I Print in HDR?

Sadly, no. This is a physical limitation, not a technical one. We simply can’t make photo paper any brighter, the same way an HDR display can increase the brightness of individual pixels.

This Sounds Cool, Tell Me About Browser / App / CMS Support

The short answer is software is still catching up to the hardware.

Photo Editors

  • The latest versions of Adobe Photoshop, Lightroom, and Camera Raw have full support for editing and exporting images that include a Gain Map in either P3 or Rec.2020 color spaces.
  • Affinity Photo also supports Gain Maps (but they call it tone mapping).
  • iOS Photos App supports Gain Maps.

Image Formats

  • JPG (best browser support)
  • AVIF (an emerging format with good browser support and better compression than JPG)
  • HEIF (another emerging format, but limited browser support)
  • JPEG XL (a dead format, do not use)

Web browsers

As of this writing…

  • Chrome-based web browsers (Chrome, Edge, Brave) on version 116+ have full support.
  • Opera has full support.
  • Safari support is presumably on the way because the iOS Photos app now has support for Gain Maps.
  • Firefox is unknown at this time, but there has been a bug report filed.

Social Media

  • Instagram, Facebook, and Threads do not yet have support for Gain Maps.

Content Management Systems

  • WordPress, the web’s most popular CMS, fully supports Gain Maps.

HDR Capable Displays

  • Any M1 or M2 MacBook Pro
  • Modern iPhone and Google Pixel phones
  • Apple XDR Pro display
  • Modern TVs or monitors that support HDR10, HDR10+, HLG, and Dolby Vision

Wrap Up

Tron Lightcycle Run at Magic Kingdom in HDR
HDR (JPG) | Sony a7R IVA | Tamron 35-150mm | 1/40 sec, f/2, ISO 2500

The journey of HDR, from its early exaggerated renditions to its now more nuanced and true-to-life representations, truly showcases the remarkable path of photographic evolution. With technology finally catching up to the nuances of human vision, photographers are now equipped with tools that break past previous digital boundaries. The increasing support for HDR and Gain Maps across various platforms and software is a testament to the evolving landscape of digital photography.

Whether you are a professional photographer or a hobbyist, the realm of HDR opens up a canvas of possibilities, enabling a more authentic translation of our visual experiences. I will definitely be using Lightroom’s new HDR workflow going forward.

Thanks for reading and cheers! 📸

What do you think? Is enhanced HDR the next evolution in photography? Or will it be another fad? Let me know in the comments below or send me a message on Instagram or Threads.

Comments

Leave a Comment