Great HDR requires a great SDR in the gain map

Modern HDR displays finally allow us to display with a dynamic range approaching what we saw in person. The vast majority of your audience on Instagram already has great support due to the capabilities of modern phones (85% of my audience reported seeing HDR support in my recent white square test). I hear from countless photographers every week who are starting to edit and share HDR images. But I see many of them making a mistake you can easily avoid: ignoring the experience others with a less capable display may have.

While most of your Instagram audience has HDR support, not everyone does. They might have an old phone, be in low power mode, or be viewing outside (where the brightness required for SDR will leave no headroom). And even if they have HDR support, most will have 1.5 – 3 stops of headroom. If you’re editing up to 4 stops (the limit for a MacBook Pro), they won’t see your full HDR either. Whether they have limited headroom or none at all, your image will be adapted to the capabilities of their display. If you create a proper gain map, you can ensure a great result by providing a high-quality base SDR image. But if you don’t consider the SDR, your viewer may see a very poor result.

Below, you’ll see why the base SDR matters, how to check your own images, and how you can easily ensure a great result for everyone.

 

The difference between good and bad SDR base images when posting HDR to Instagram:

I posted the same HDR image to Instagram using three difference approaches:

  • custom HDR JPG gain map using Web Sharp Pro v6 (workflow #2) and uploaded via computer.
  • HDR AVIF exported from Adobe Camera RAW and uploaded via iPhone. The SDR base image is auto-generated by (either by my iPhone or Instagram, I’m not sure but assume via iOS).
  • HDR shared directly from Lightroom iOS mobile app (the Classic and Desktop versions have no similar direct sharing option). The SDR base image is auto-generated in this scenario (either by LR or IG, I assume LR – either way, it is not affected at all by the “preview for SDR display” settings in LR).

Note that Lightroom / Adobe Camera RAW support creation of JPG gain maps (see this tutorial). I have skipped them here because Instagram does not support them (these are valid HDR images, but Instagram supports only very specific encoding and the result is that the posted image will only show SDR).

Let’s first take a look at the SDR experience. The next three images are the result you will see when viewing the Instagram posts on an SDR display.

 

SDR results: Web Sharp Pro

With the custom gain map created by WSP, the SDR image is an exact match to the version I created from the HDR. This took about 30 seconds of work and ensures that the image looks great on any display, regardless of HDR support.

 

SDR results: AVIF

When posting the HDR-only AVIF, the SDR base image is automatically generated. As you can see, the result is low quality. The sky is over-saturated, far too dark (it providing light for the scene), and the water is low contrast and lacks detail. This is a serious concern for me as my source image uses 3.4 stops of HDR headroom. Most of my audience has HDR support, but most will have 1.5-3 stops of support. That means some portion of this bad SDR will be mixed with the full HDR when adapting to their screen. So even those with HDR support will see some loss of quality (with results being problematic at 2 stops or less of support).

Any time you share an HDR image on the web, it is critical that you share it with a gain map. A simple HDR-only AVIF will result in low-quality automatic tone mapping, and the results will vary from one browser to another. By the end of 2025, we should be able to share AVIF images encoded with a gain map – but you should definitely avoid sharing an AVIF without a gain map.

 

SDR results: LRM

When posting directly via the Lightroom mobile app, the result is unfortunately clipped at 2.23 stops of headroom. If you limit your edit to 2 stops of headroom, you should avoid this. However, even the global preview for SDR display controls are not used here. You have no control over the base SDR image. Additionally, the gain map is luminosity only. Adobe has done an incredible job with HDR support overall and I would expect these results will improve over time.

 

 

Impact on HDR results:

The results above show that it is critical to manage the SDR base image. If you were to compare the source HDR on a display with the 3.4 stops of headroom to avoid any tone mapping, you’d see that all three approaches are visually identical. However, that isn’t the case when the image is transcoding during the upload to Instagram. It turns out that the HDR results are significant different as well.

It is important to remember that a JPG gain map does not include an HDR image. It has an SDR base image and a pseudo image (the gain map). The HDR is generated by multiplying each base SDR pixel by the value encoded in the gain map. So if the base SDR is low quality, the HDR will likely be impacted. A low quality gain map will also reduce quality.

A gain map may be encoded at lower resolution than the base image, with 1/2 linear resolution being common for images encoded with a smart phone. This is done to minimize the size of the image, as the gain map obvious takes up some space. When the gain map is saved at low resolution, it will get resampled to full resolution to combine with the base image. The result is some loss of sharpness and clarity in highlights (as that’s where the gain map most likely deviates from the base image).

A gain map may also be encoded with a single channel (luminosity only) or three channels. A luminosity-only map cannot adapt color or saturation. This frequently causes issues with the color of highlights. A proper SDR often shows low saturation in the highlights (you can’t make a sunset bright without losing saturation in SDR). But an HDR does not have such constraints. If the image is encoded with a luminosity only-map, you may see an oversaturated SDR or an undersaturated HDR. And there can be other subtle hue corrections required when moving from SDR to HDR, and a color gain map can be very helpful there too.

Each of the images below are the actual HDR served from Instagram, with the extracted gain map shown beneath each image.

 

HDR results: Web Sharp Pro

With the custom gain map created by WSP, the result on Instagram is a very close match. The transcoding done by IG is imperfect, and there is some minor loss of saturation in the sky. It’s trivial and overall a great result. The gain map is full resolution and includes color information, which allows the highest quality.

There is some JPG artifact and loss of detail in the transcoded result, but it’s similar to what you would see with any image on Instagram (not an HDR-specific concern).

 

HDR results: AVIF

The HDR AVIF is also a pretty good match for tone and color to the original. The sky is slightly oversaturated in this case. I would rate the result from Web Sharp Pro as slightly better in that regard, but they’re both close.

However, there are other concerns here. There is significantly more loss of detail than the result from WSP. The issue is that the final result from WSP has a full resolution gain map, while the auto-generated map from the AVIF is at 1/2 resolution.

The gain map itself is luminosity only. This helps explain the significantly over-saturated base SDR, as the only way to get the HDR color is to put it into the base image when using a luminosity-only map. Still, it’s a curious result as the HDR is over-saturated and both would be improved with a less saturated base image. But that is the nature of automatic tone mapping or auto-generated base images, they will often be disappointing.

 

HDR results: LRM

The HDR shared from LRM is clipped at 2.23 stops. At this time, you should clearly limit your edits to 2 stops if sharing directly from LRM.

While LRM offers controls for the SDR (“preview for SDR display”), that is not used for the direct sharing to Instagram at this time. Additionally, the gain map is also 1/2 resolution and luminosity only.

Those limits do not apply when saving from LRM to a local JPG gain map, but the encoding of that image will likely be rejected by Instagram (resulting in loss of HDR).

 

How to check for issues when sharing HDR:

The most important lesson here is to soft proof your results. You can (and should) check the image you create on your computer. But it’s also critical (at least when first using any new service) to also check the final result after you upload your image. As you can see above, there are many ways your image may be altered when transcoding during upload. This isn’t a problem if you directly share the image on your own website (but be careful with any media libraries, which might also transcode).

There are several ways to check your results:

  • You can open your image in Adobe Camera RAW and turn HDR mode on and off to see the SDR and HDR results.
  • You can also use the Adobe Gain Map demo app to soft proof at various levels of HDR support (use the manual slider on the right side).
  • You can view the image in an HDR-capable browser like Chrome and compare to FireFox (which lacks HDR photo support at this time).
  • You can disable HDR support in your display or use another device which lacks HDR support.

If you upload via an app on your phone, be aware that local caching may mean that you are seeing your local copy and not the actual result that was uploaded. It is best to check on a computer or another device when uploading from a phone.

While there is a lot of detail here, this is all very easy once you know what works. Most of my HDR images need only 30 seconds of work to optimize. This is very easy to do and well worth the minimal effort required.

 

How to ensure everyone sees a great result, regardless of HDR support:

As you’ve seen above, it is critical that you as an artist provide input into the SDR base image. Even if every device had HDR support, we’d still face scenarios where a phone is used outside or in low power mode. A proper gain map ensures your image looks great everywhere.

There are a few ways to control the SDR result:

  • Web Sharp Pro v6 puts you in full control.
    • The SDR and HDR results are completely predictable and completely in your control. You can optimize the SDR any way you like (see workflows #2 and #3).
    • If you wish to edit for print, you can automatically create an enhanced HDR and know that the base image will exactly match your SDR edit (see workflow #1).
  • Lightroom and ACR offer the “preview for SDR display” sliders.
    • These gives you predictable results and a better SDR than any automatic result. However, this only gives you 7 global sliders and no local control to optimize the result.
  • All versions of Lightroom / ACR can export JPG with a gain map (check the “HDR output” option).
    • While Instagram will not accept these images, you can post them to your own website (on a WordPress site like mine, just use the “full” size option in the media library).
    • The “preview for SDR display” sliders give you some global control. Web Sharp Pro offers much more control over the SDR, but this is still a good (and predictable) option for those who don’t use Photoshop.

Avoid any export process where you do not create a gain map with at least some artistic control over the fallback SDR image.

Here’s the workflow to create the final version of the image above (see the Web Sharp Pro v6 announcement for two other workflows to give you flexibility for any scenario).

 

Errata: exceptions around gain maps

The gain map spec is very clear and should provide perfect results every time (even when gain maps aren’t supported, as the JPG will fall back to the base SDR image). However, there are a couple of cases where the results may vary from what is expected:

  • The Instagram iOS app does not currently share your image as a gain map (this does not apply to Android or computers).
    • It will share a simple 3-stop HDR and tone map from there as needed, or it may share the base SDR if there is no support.
    • This is a very minor concern as most viewers will have 1.5 to 3 stops of headroom. For a small percentage of users, the results are not optimal.
    • Instagram has been rapidly improving their results and I would expect that this relatively rare edge case gets resolved in due time. The upcoming ISO standard for gain maps should help address device specific concerns like this.
    • The benefit of and support for HDR already greatly outweighs this concern. I primarily mention it in case you encounter it while testing an iPhone.
  • Apple’s new support for ISO gain maps actually renders the image as a 3-stop HDR and tone maps as needed
    • You may see it when using Apple Photos, iMessage, Preview, Quick Look, or apps using Apple APIs.
    • It has no impact on Safari as it just renders the base SDR image (no HDR photo support at this time).
    • This has no impact on Chrome, Brave, Edge, Opera, Lightroom, ACR, Photoshop, etc.
    • Given Apple has great HDR support on most devices, the impact is limited even where it is applicable.
    • Apple’s support is very new and hopefully this is improved with future software updates. The current behavior is not consistent with expected results for a gain map and I therefore consider this a bug (though it might be more of a deliberate decision to reduce memory consumption by holding a single image rather than two in memory, and it may have some performance benefits – though I see the same results even when a device is not running on battery power).

So neither of these are any cause for concern for photographers, but represent opportunities for ongoing improvement in support for HDR. They may even be resolved by the time you read this, this is a rapidly evolving space.

Greg Benz Photography