Bug 492458 - Supporting HDR gain map & Ultra HDR image
Summary: Supporting HDR gain map & Ultra HDR image
Status: REPORTED
Alias: None
Product: krita
Classification: Applications
Component: File formats (other bugs)
Version First Reported In: 5.2.3
Platform: unspecified Unspecified
: NOR wishlist
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-31 15:29 UTC by Alvin Wong
Modified: 2025-08-04 19:19 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alvin Wong 2024-08-31 15:29:37 UTC
There seems to be a new HDR image format gaining some traction. I haven't got a good understanding of them yet, so I am just writing down some very rough notes:

Gain Map spec draft by Adobe: https://helpx.adobe.com/nz/camera-raw/using/gain-map.html
This seems to be in the process of being standardized as ISO/CD 21496-1.

A website with some info on gain map: https://gregbenzphotography.com/hdr-photos/jpg-hdr-gain-maps-in-adobe-camera-raw/

## File format support:

Google's "Ultra HDR Image" format: https://developer.android.com/media/platform/hdr-image-format
This seems to be a format Google has developed to encode gain map data into JPEG in a backward-compatible way.
They also have a library for handling this: https://github.com/google/libultrahdr
(This seems to be slightly different from Adobe's JPEG gain map, but I haven't found the spec on that.)

Apple seems to use gain map in their HEIF photos (needs checking).

libavif and libjxl has experimental gain map reading and writing support API.

## Support in other software (as far as I know):

- Adobe Camera Raw seems to be able to output JPEG gain map images.
- Chrome is able to read and render such JPEG images (tested on Windows)
- Ultra HDR is supported on Android 14
- Google Pixel Camera can save Ultra HDR (tested on Pixel 6)

## Relevance to Krita:

- Krita may want to be able to import these files as HDR format.
- This format may be a good candidate for exporting HDR painting.
Comment 1 Mark B 2024-10-23 09:54:23 UTC
Importantly:

## File format support:
Imagemagick already has support for libultrahdr and conversions with HDR gain maps (and i.ex: archlinux has libultrahdr and imagemagick support).

Example command to create an UltraHDR JPEG: 
https://github.com/ImageMagick/ImageMagick/pull/7198#issuecomment-2381592909

# Support in other software
Adobe Lightroom, Instagram and others also support it.
Information about all the software support with HDR gain maps in HDR Photography:
https://gregbenzphotography.com/hdr

The camera apps of the latest Samsungs, Oneplus, Pixels and others support shooting it. And all devices since Android 14 display it.