libultrahdr icon indicating copy to clipboard operation
libultrahdr copied to clipboard

Request: Add support for multi-channel gain maps

Open gregbenz opened this issue 1 year ago • 0 comments

The gain map spec allows gain maps with either single channel (luminance only) and multi-channel (RGB values in the map and metadata to allow hue/saturation correction as well).

Currrently, libultrahdr appears to only process single-channel maps (https://github.com/google/libultrahdr/blob/ce361cae98820b4da499ffd044358479d9c2553a/lib/include/ultrahdr/jpegr.h#L318). However, Lightroom and Adobe Camera RAW and Lightroom export color images with RGB gain maps (the metadata is typically per channel, but occasionally a single value - probably because all three channels have identical limits for values like hdrgm:GainMapMax. The quality of such multi-channel maps is higher and allows for higher quality results and such 3D maps are therefore ideal.

It would be highly valuable for libultrahdr to support multi-channel maps to facilitate resizing, compressing, or cropping gain maps exported from Adobe software.

gregbenz avatar Mar 03 '24 23:03 gregbenz