Describe the bug
When a JPG image with an HDR ("high dynamic range") gain map is transcoded, the gain map is stripped. This results in significant degradation of the image (loss of support for enhanced HDR display).
Modern displays support brighter and more vibrant HDR images. This includes most smart phones, Apple computers, and a general trend towards widespread support on the web. More info at https://gregbenzphotography.com/hdr and https://gregbenzphotography.com/hdr-photos/jpg-hdr-gain-maps-in-adobe-camera-raw/. Instagram also supports HDR gain maps and sample images may be easily viewed with the iOS or Android app on most smart phones with comparison images at https://www.instagram.com/gregbenzphotography/
To Reproduce
Upload an image with a gain map to WordPress (using GD) and the resulting image in the media library will no longer no longer have a gain map.
Expected behavior
The image should retain a proper gain map, even after any resizing / compressing / cropping.
Actual results
The transcoded JPG contains only the SDR ("standard dynamic range") base image, not the required auxiliary image / metadata to support HDR display.
Environment (please complete the following information):
Any version of GD will fail.
Additional context
The Google libultrahdr library fully supports proper transcoding of these images: https://gregbenzphotography.com/hdr-gain-map-gallery/
Describe the bug
When a JPG image with an HDR ("high dynamic range") gain map is transcoded, the gain map is stripped. This results in significant degradation of the image (loss of support for enhanced HDR display).
Modern displays support brighter and more vibrant HDR images. This includes most smart phones, Apple computers, and a general trend towards widespread support on the web. More info at https://gregbenzphotography.com/hdr and https://gregbenzphotography.com/hdr-photos/jpg-hdr-gain-maps-in-adobe-camera-raw/. Instagram also supports HDR gain maps and sample images may be easily viewed with the iOS or Android app on most smart phones with comparison images at https://www.instagram.com/gregbenzphotography/
To Reproduce
Upload an image with a gain map to WordPress (using GD) and the resulting image in the media library will no longer no longer have a gain map.
Expected behavior
The image should retain a proper gain map, even after any resizing / compressing / cropping.
Actual results
The transcoded JPG contains only the SDR ("standard dynamic range") base image, not the required auxiliary image / metadata to support HDR display.
Environment (please complete the following information):
Any version of GD will fail.
Additional context
The Google libultrahdr library fully supports proper transcoding of these images: https://gregbenzphotography.com/hdr-gain-map-gallery/