Overview of libultrahdr and Gain Map technology
mainlibultrahdr is an image compression library that uses gain map technology to store and distribute HDR images.
How it works:
- Encoding: The library takes an SDR rendition and an HDR rendition of an image. It computes a Gain Map (the quotient between the two renditions).
- Storage: The resulting file contains the base image (SDR), the gain map image, and associated metadata. This format is backward compatible: legacy readers that do not understand gain maps will simply display the base SDR image, while compatible readers combine the SDR and gain map to render a high dynamic range image.
For deeper technical details on the format, refer to the android hdr-image-format guide.