ISO gain maps: sharing HDR photos is about to get much easier
HDR photography offers incredible improvements in image quality and support has come a long way in just a couple short years. We have a great range of editing software (all versions of Lightroom, Adobe Camera RAW, Photoshop, Affinity, Pixelmator Pro, etc). Most people have at least one HDR-capable display, considering smart phones and TVs – not to mention the majority Apple laptops / displays and a growing range of PC laptop and external monitor options (including a very budget-friendly monitor). We even have a good degree of support on Instagram and Threads (see here for more details). And “gain maps” allow us to share HDR images that look incredible on any monitor (even if it has limited or no HDR support at all).
However, we’ve had ongoing challenges in distribution. While there is fairly significant support for creating and viewing HDR photos (much more than most people realize), the key bottleneck has been distribution. For example, you can capture and upload an HDR photo to Instagram on an iPhone, you cannot upload that same image on an Android phone and vice versa. And uploading an edited image has been a problem too.
The reason for these challenges is because we have not had a single standard for “gain maps”, which are the key technology that let us safely share HDR images with anyone. Apple, Adobe, and Google (Android) have all used somewhat different mechanisms for encoding gain maps. They are all conceptually similar, but the differences have created technical issues. Additionally, these multiple formats create a burden for any website or app which wants to support HDR, as it significantly increases the development effort and risk of bugs. Thankfully, we now have an official standard for gain maps: ISO 21496-1.
Benefits of ISO 21496-1 gain maps:
This official standard is likely to have numerous benefits:
- HDR support will likely increase significantly in the coming year. This may be nearly automatic in some cases as important backend tools / libraries add support (for example, support in the WordPress media library will likely come from ongoing updates to a piece of software called ImageMagick). And even developers who do not use such libraries should be more motivated given significantly less development effort.
- This greater simplicity and increased support will likely be an important catalyst for adoption of HDR, in turn spurring a virtuous cycle of increased content creation and greater support.
- It should get much easier to share HDR on existing platforms (such as Instagram / Threads). The pain of figuring out which format works on which platform/device should start to go away.
- HDR image quality may improve further on existing platforms. This is not so much because the format is better, but rather because there are some cases where compromises are used due to format conflicts or lack of support on a specific operating system. This should allow improved image quality on iPhones in particular.
Support for ISO 21496-1 gain maps:
The ISO standard is already at a very mature stage and is rapidly gaining support, including:
- Web Sharp Pro (WSP) v6
- WSP creates the most compatible HDR files possible. They offer the highest quality HDR possible, while remaining 100% compatible on any system (they’d work even in a 30-year old web browser). The JPG gain maps are dual encoded with both ISO and Android XMP, which offers the greatest HDR support possible both now and into the future.
- The gain maps are supported as HDR by Instagram and Threads.
- WSP offers full control of the base SDR image, which offers vastly higher quality on SDR or limited HDR displays.
- WSP’s “enhance SDR to HDR” allows you to optimize your image for print and at the same time offer an optimized image which will stand out on Instagram. The SDR base image in the gain map will match your original edit exactly. Everyone gets a great result, regardless of HDR support. And you don’t even need an HDR monitor to create these HDR images for social media.
- Adobe Lightroom (Classic v14, Cloud v8, Mobile v10 apps) and Adobe Camera RAW v17, which were all just released in Oct 2024.
- All versions support JPG gain maps, which is the format you should use currently. If you see options for “HDR output” or “maximize compatibility”, you should make sure they are checked (if you do not see an option, it is effectively enabled).
- There is also quite a bit of ISO gain map support for other formats, but this seems to vary at this point based on the version of Lightroom used.
- In LRC / ACR: ISO gain maps are created when you export with “HDR output” and “maximize compatibility” checked. This includes the JPG, AVIF, JXL, and TIF formats.
- In LR mobile (iOS / Android), gain maps are created when you use the “export as” option with “HDR output” enabled under “more options” and use JPG or AVIF (there is no explicit “maximize compatibility” option). Other file formats do not appear to support gain maps (JXL, TIF, and DNG will export simple HDR images without a gain map).
- In LR (cloud), gain maps are created when you export an HDR image as a JPG. Other file formats do not appear to support gain maps (AVIF, JXL, TIF, and DNG will export simple HDR images without a gain map).
- Note that the Adobe spec references additional file types (PNG, DNG and HEIF), but Lightroom does not appear to provide encoding support at this time. I presume the ISO spec would allow for these formats (Adobe’s new demo app already reports that HEIC images captured with iOS 18 are encoded with the ISO standard). These are relative niche formats (PNG might for example be used by governments / museums for lossless encoding), but it seems likely that many common image formats will get support for ISO gain maps.
- Adobe has updated their gain map resources:
- Their support page references the ISO spec.
- The Adobe Gain Map Demo app v17 (available on the same page) supports the ISO file types and will explicitly tell you which format is used via the optional text overlay (<ctrl/cmd>-I).
- The support page also includes updated sample ISO gain map images in JPG, AVIF and JXL file formats.
- Chrome-based browsers (which includes Edge, Brave, and Opera).
- These all support ISO JPG gain maps.
- It also includes ongoing legacy support for the Adobe/Google specs (which is great for images you’ve already exported from Adobe software or captured with your Android phone).
- Additionally, AVIF with ISO gain maps is
- Apple software (including MacOS Sequoia, iOS / iPadOS 18).
- This includes ISO JPG gain map support for Photos, iMessage, Previews, QuickLook, and 3rd-party apps (ie developer APIs).
- The latest native camera app also writes the ISO format when capturing in supported modes to JPG or HEIF.
- Additionally, Apple continues to support the older Apple encoding for JPG / HEIC (which is great for images you’ve already captured with your iPhone / iPad).
I expect to update this list as support grows (or I learn of others, as I may easily be overlooking someone). Support is likely to expand significantly in the coming year.
Where do we need support for ISO 21496-1?:
Ultimately, it will be ideal to have support on nearly all software for ISO gain maps in the JPG and AVIF formats. There are a few key applications where support would be especially beneficial given the large number of devices which would benefit immediately:
- Apple Safari / WebKit.
- As all iPhone / iPad browsers use WebKit, this is a critical update as we cannot yet see HDR images in HDR browsers on Apple’s mobile devices (the hardware is widely available, including any iPhone less than 4 years old).
- No one has invested more in HDR computer displays than Apple and their recent software updates include considerable support for ISO gain maps. They have been clear leaders in the space and it would be amazing to see them unlock the full potential of their mobile devices.
- The support in Apple software needs a bit of work still. ISO gain maps appear to be treated as if they were simple 3-stop HDR images (ie the gain map is not used as expected), resulting in an inferior result to what you would see in Chrome. Additionally, iMessage is not working correctly yet as of Jan, 2025.
- Instagram / Threads / Facebook.
- Meta (the parent company for all these platforms) has been an early adopter and champion for HDR photography, especially on Instagram.
- We already have a good deal of support (I have posted dozens of SDR vs HDR comparison images on Instagram).
- Adding ISO support should make it much easier to post (without the workarounds I’ve been using) and likely should further benefit quality in the iOS app (which does not currently use the full 3 stops of headroom on the phone).
- There is likely significant work to transcode existing images and update support on multiple platforms (iPhone, Android, and web), so it may take some time.
- Open source libraries, which are critical to support in applications such as WordPress and probably most websites. The Google-backed open-source libultrahdr library supports ISO JPG and is an ideal way for other libraries to add support. See the developers section of my main HDR page for more info.
How does ISO 21496-1 compare to”legacy” gain map encodings?
The important thing to know is that the best format to use going forward is the ISO spec. However, this transition naturally raises questions about whether existing images can or should be converted to the ISO spec.
Time will tell how how many existing gain maps in “legacy” (Apple / Adobe / Android) formats are converted to ISO, but it seems likely that existing support will be retained for a very long time. So nothing should break, even if existing HDR image are not re-encoded in the ISO format. That said, you may benefit from re-encoding anything you’ve already shared. For example, Apple has not added support for the Adobe / Android spec, so re-exporting to ISO will give you greater HDR support on Apple devices.
All the various gain map encodings are conceptually very similar. It is even possible to dual-encode an image with both ISO and one of the XML formats (for example, Web Sharp Pro encodes with both ISO and Android XMP – along with some optimizations required for Instagram / Threads, which make it widely compatible with nearly all existing gain map decoders, as well as being future-proof).
However, there are differences which have resulted in the pain noted above. The differences include:
- The ISO spec is most similar to the Adobe / Android spec.
- One very significant difference is that the metadata is now in the “codestream”, rather than in the XML.
- This seems ideal to prevent confusion / mistakes that might result from unwanted alteration or retention of the data in subsequent edits. However, it likely means some significant development work to add support for any application which does not use an open source library or APIs built into the host operating system.
- The Adobe / Android specs are nearly identical (the Android spec adds a redundant “GContainer” header pointing to the auxiliary image).
- The compatibility issues we have seen to stem more from Android decoders being written for single channel map data, resulting in Adobe images sometimes failure with software associated with the Android spec. But this has created issues where images exported from Adobe software did not work in some cases.
- I would anticipate there is a very good chance that these images may be converted to the ISO format with no loss of quality, but cannot confirm at this time (I have not seen the ISO standard itself and am unaware of any transcoding tools which support such a conversion at this time).
- The Apple format is more unique. It is not fully documented, but has several unique metadata values.
- I haven’t attempted to dig through their decoding example, so I am not sure if it is possible to losslessly transcode (convert) images previously captured with an iPhone to the ISO standard.
- If the gain map “image” itself does not need to be re-encoded, it should be possible to do such a conversion with no loss of quality.
I would like to share a special thanks to the teams Apple, Adobe, and Google for consistently championing HDR photography, including gain maps. It is an industry-wide effort, and there are of course numerous other companies and individuals who have helped us get to this point. These collective efforts have unlocked an incredible new opportunity to share images which are vastly more realistic and lifelike than anything previously possible.