Skip to main content
sylwesterg95401861
Known Participant
October 10, 2023
Answered

Do the HDR exports contain gain maps?

  • October 10, 2023
  • 3 replies
  • 5914 views

Hi,

I have a question regarding HDR editing and export in the newest update to Lightroom.

I've been testing it since yesterday, and in general, it works great—as long as I'm working on HDR displays and also viewing the exported files on an HDR display (e.g., on an iPhone or the internal HDR display on my MacBook). However, I've noticed that exported AVIF or JPG XL files are heavily clipped when displayed on a non-HDR display, such as the Apple Studio display.

This behavior is different compared to HDR pictures created by the iPhone camera. Those show extended highlights when displayed on an HDR display but also exhibit nice tone mapping when displayed on a non-HDR display.

I even tested it with Lightroom: I imported an HDR HEIF made on an iPhone into Lightroom, and Lightroom displayed it nicely in HDR during editing. I then exported it back to Apple Photos as an HDR AVIF. On the iPhone and MacBook HDR displays, the original and exported files looked essentially the same. However, when I moved the Photos window to the Studio display, the original iPhone picture still looked nice and tone-mapped, while the AVIF was heavily clipped.

Now, after watching this video, https://youtu.be/HBVBLV9KZNI?si=5l3ozsiM16Xq5cAV  I understand that Apple and Adobe are working together to introduce a gain map-based HDR standard for still images. As I understand it, gain maps are precisely what allow for controlled compatibility and tone mapping of a single image so that it looks great on both HDR and SDR displays.

My question is: Are the HDR files currently exported from Lightroom lacking gain maps, which is why they are not compatible with SDR displays? Or is it that Apple Photos software doesn't yet fully support AVIF HDR files with gain maps, but the images are, in principle, future-proof and already have gain maps encoded? Could we expect that, with the right software, they would look more like the "SDR preview" in Lightroom, available in HDR editing mode?

This topic has been closed for replies.
Correct answer Rikk Flohr_Photography

JPG Files can contain a Gain Map if they have HDR Information.  AVIF and JXL do not yet contain Gain Maps

3 replies

Inspiring
November 2, 2023

You can also test for gain maps with Adobe's demo tool, which I show towards the end of my video on gain maps: https://gregbenzphotography.com/hdr-images/jpg-hdr-gain-maps-in-adobe-camera-raw/

sylwesterg95401861
Known Participant
November 3, 2023

Yep, I checked it.  I hope there will be support for gain maps in AVIF/HEIF in both Lightroom and Apple photos, otherwise as it stand now exporting HDR pics create a lot of strange display issues in grid view in Apple Photos, and is not really working on non-HDR displays (and I have a few: iPad, MacBook Air, Studio Display etc). It is really frustrtating since it sseem all parties agreed on standards and yet not implemented those (yet?).

Inspiring
November 3, 2023

FYI on a related feature request I've submitted on custom gain maps to allow greater artist control to improve quality: 

https://community.adobe.com/t5/photoshop-ecosystem-ideas/allow-full-user-control-of-the-sdr-rendition-in-an-hdr-gain-map-export/idi-p/14205440

Rikk Flohr_Photography
Community Manager
October 10, 2023

JPG Files can contain a Gain Map if they have HDR Information.  AVIF and JXL do not yet contain Gain Maps

Rikk Flohr: Adobe Photography Org
Participant
October 15, 2024

Hi~ for export AVIF/JXL with HDR gain maps, October release notes for lightroom said that now gain map is supported in export HDR photos, is that means we can export AVIF/JXL with gain maps? or still there are other limitations.

Known Participant
October 16, 2024

To be fair, my primary concern was the ability to store my photos—and display them correctly—in Apple Photos.

 

Thanks to tips from another user, I discovered it is possible now: https://community.adobe.com/t5/lightroom-ecosystem-cloud-based-discussions/not-able-to-see-improvement-with-hdr-compatibility-between-lightroom-and-apple-photos/m-p/14918458#M96008 

 

It seems there is some bug in the macOS version of Apple Photos that strips gain maps from files imported through the desktop app. But airdropping to iPhone works: the file then correctly syncs and displays the HDR version on HDR screens and the SDR version on SDR screens, desktop Photos included.

 

EDIT: I was wrong. New "ISO HDR" maps indeed behave differently in Apple's apps, but in no way can I say they work correctly. After syncing through iCloud, they no longer work correctly. Interestingly, while Photos after syncing display the SDR version, Preview or QuickLook display only the HDR version (even on SDR display, which destroys colors)


Ok, following up on this after some more careful testing. For files exported by LrC 14:

 

Plain HDR AVIF (no gainmap): works the same as it has since iOS 17. Tonemapping/display adaption is imperfect, but it displays in HDR on my iPhone and iPad. Displays in HDR on Win 11 (24H2) Photos app as well

 

Gainmap AVIF: Displays in HDR on the iPad, but not the iPhone - regardless of which device it was imported on! But also, has weird crushed shadows that is not present on the gainmap-less version or the gainmap JPG. Win 11 Photos sees it as SDR.

 

Gainmap JPG: Works perfectly on the iPad (although with almost triple the file size of gainmap AVIF + noticeably worse quality for the same image and same compression strength slider setting). Does NOT display in HDR on the iPhone 16 Pro, regardless of which device imported it. Win 11 Photos also sees it as SDR.

 

However, this behavior is not consistent for all gainmap JPG files! I have some files on my iCloud Photos that were taken with a friend's Pixel 8 Pro, these display in HDR on both iPhone and iPad just fine. Why does the iPhone show these in HDR but not the ones from Lightroom? Absolutely no idea!

 

Should also note: my 12.9 M1 iPad Pro's handling of bright HDR highlights on regular (no gainmap) HDR AVIF/JXL files is wildly different from both iOS 17, and on the iPhone 16 Pro despite also running iOS 18.

JohanElzenga
Community Expert
Community Expert
October 10, 2023

AFAIK, you can select to add a gaim map if you export an HDR image as JPEG. The support for gain maps is very limited at present however. Google Chrome apparently supports them, but I think that's about it. And yes, if the software supports them, then your image will look like the 'SDR preview' when viewed on an SDR display.

 

-- Johan W. Elzenga
sylwesterg95401861
Known Participant
October 10, 2023

Ok, I checked JPG with "HDR output" and in conditions described by me above it is not clipping, but it is also not HDR, at least when displayed in Apple Photos and judged by eye. So it seems to me that current state of support is still generally half-there and there is no way to create image that would look good on HDR and SDR displays. 

JohanElzenga
Community Expert
Community Expert
October 10, 2023

I think my initial remark was not entirely correct. The way I understand it is as follows. By itself, JPEG does not support HDR. If you export as JPEG with HDR enabled, then the SDR Preview will be exported as the base JPEG image. That means no clipping, but also no HDR. What the gain map does is add the HDR information, so an app that does support gain maps can show the image in HDR.

 

-- Johan W. Elzenga