<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>265797</bug_id>
          
          <creation_ts>2023-12-04 09:12:44 -0800</creation_ts>
          <short_desc>JPG gain maps are not rendered as HDR</short_desc>
          <delta_ts>2026-05-06 10:06:05 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Images</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=270981</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Greg">greg323464</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>heycam</cc>
    
    <cc>nicole</cc>
    
    <cc>sabouhallawa</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1996750</commentid>
    <comment_count>0</comment_count>
    <who name="Greg">greg323464</who>
    <bug_when>2023-12-04 09:12:44 -0800</bug_when>
    <thetext>JPG images with a gain map are not properly rendered as HDR (EDR) on supporting displays. These images may be created with Adobe software (ACR and Lightroom) and Android 14 (at least with the Pixel 8 Pro). Only the base SDR image is displayed, the gain map is ignored.
Spec: https://helpx.adobe.com/camera-raw/using/gain-map.html

The Chrome, Edge, Brave, and Opera web browsers all properly display gain maps (including on Android devices running Android 14). While all of those browsers are a suitable workaround on MacOS (vs using Safari), they are all dependent upon WebKit for browsing on iOS / iPadOS. Therefore, it is not possible to properly view HDR photos on Apple iPhone / iPad, which is unfortunate as Apple has some of the best hardware out there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1997495</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2023-12-06 13:42:02 -0800</bug_when>
    <thetext>Thank you for the report. Do you have an example to easily test with?

Most of the time, these issues are below WebKit, and are better reported to Apple via https://feedbackassistant.apple.com. One way to check is whether the image is displayed correctly in Preview.app.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1997496</commentid>
    <comment_count>2</comment_count>
    <who name="Greg">greg323464</who>
    <bug_when>2023-12-06 13:53:05 -0800</bug_when>
    <thetext>Adobe has made several JPG gain map samples available via https://www.adobe.com/go/gainmap_sample_photos

You can also see several more via https://gregbenzphotography.com/hdr-gain-map-gallery/. These images will render as HDR on MacOS via Chrome, Edge, Brave, and Opera when browsing with an XDR or otherwise HDR-capable MacOS computer. They will render as SDR on FireFox / Safari or on displays which do not support HDR.

Last I checked (MacOS 14.0 public release), core Apple apps (Preview / Photos) did not render JPG gain maps as HDR (displayed the SDR base image). However, Sonoma did add support for ISO HDR JPG gain maps (https://developer.apple.com/videos/play/wwdc2023/10181)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1998673</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-12-11 09:13:14 -0800</bug_when>
    <thetext>&lt;rdar://problem/119497155&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>