Function: readJpegGainMap()
readJpegGainMap(
buffer):HdrifyImage
Read a JPEG buffer that contains embedded gain map (XMP + MPF) and return decoded HDR as HdrifyImage. Supports UltraHDR/JPEG-R layout.
Parameters
buffer
Uint8Array
Full JPEG-R file bytes
Returns
HdrifyImage with linear HDR RGBA; metadata.format is 'ultrahdr' or 'adobe-gainmap'
Throws
If no gain map XMP is found, or if primary/gain map images cannot be extracted