NEW 282299
[HDR] Support HDR images
https://bugs.webkit.org/show_bug.cgi?id=282299
Summary [HDR] Support HDR images
Said Abou-Hallawa
Reported 2024-10-29 16:29:16 PDT
This is an umbrella bug for the HDR support for images.
Attachments
Said Abou-Hallawa
Comment 1 2024-10-29 16:30:00 PDT
Said Abou-Hallawa
Comment 2 2025-03-28 17:36:51 PDT
*** Bug 265796 has been marked as a duplicate of this bug. ***
Greg
Comment 3 2025-03-28 18:23:25 PDT
Hi Said- (replying per your comment on https://bugs.webkit.org/show_bug.cgi?id=265796 to use 282299 as the place to track HDR photo concerns)... I have been unable to find any photos which properly renders as HDR under Safari Tech Preview Release 215 (Safari 18.4, WebKit 20622.1.6.111.4), with "Support HDR Display" enabled under Develop / Feature Flags on three different HDR monitors. I have heard several reports from others similarly reporting no HDR support. I have received one report (with confirming photo) of success with images from https://gregbenzphotography.com/hdr/#tests. I've tried testing multiple different file formats and encodings and had no success. Is there a test case or scenario you should share? I haven't seen any description of which file encodings are intended to work under this new capability. Is this currently only supported in WebKit and perhaps not yet in Safari Tech Preview 215? Thank you, Greg
Said Abou-Hallawa
Comment 4 2025-04-02 13:25:27 PDT
Hello Greg, Please make sure the experimental feature "Support HDR Display" is enabled in Safari. The feature may not work properly on older macOSs. And this is why we turned it off by default, see bug 290190. So please try to install macOS Sequoia if have not done so. Currently we only support the HLG and PQ formats. You can test this on https://ccameron-chromium.github.io/hdr-jpeg/index.html. The gain mapped images still do not show HDR contents; see bug 290940. Thanks for trying this feature and please report any unexpected behavior with HDR images. Said
Greg
Comment 5 2025-04-02 13:36:32 PDT
Hi Said- Thank you for the reference images. Using Safari Tech Preview 215, "Support HDR Display" enabled, MacOS v15.3.2, and using ProDisplay XDR or M4 Max MBP, I see all images on https://ccameron-chromium.github.io/hdr-jpeg/index.html clipped to SDR. That same URL looks great using Chrome, Brave, etc. Regards, Greg
Greg
Comment 6 2025-04-04 06:44:45 PDT
Updating with experiences I see under the new tech preview 216. The HLD-encoded JPG and AVIF images work at https://ccameron-chromium.github.io/hdr-jpeg/index.html JXL HDR appears to work. Use of the HDR range to render out of gamut SDR content is supported (Safari has been inconsistent in rendering test #14 across Safari on production MacOS vs iOS, and I consider the Tech Preview 216 behavior correct). JPG (and JXL) gain maps still not supported under 216, consistent with your link to bug 290940 (https://bugs.webkit.org/show_bug.cgi?id=290940). Should be ok to close this bug and 290940 will track the open need for support of gain maps. Great to see Safari supporting HDR photos!
Greg
Comment 7 2025-04-04 07:16:53 PDT
Should Safari 216 be reporting 8-bit support when HDR works? Perhaps HDR is only supported under 8+2 FRC? Test #5 shows 10-bit for Chrome, but not Safari 216: https://gregbenzphotography.com/hdr/#tests
Greg
Comment 8 2025-04-04 15:13:03 PDT
Spoke a bit too soon here, 216 shows proper HDR but at a significantly lower headroom than Chrome. I'm viewing images at https://gregbenzphotography.com/hdr/#tests
Greg
Comment 9 2025-04-17 15:30:05 PDT
Hi Said- Looks like 217 has regressed. I do not see HDR results on https://ccameron-chromium.github.io/hdr-jpeg/index.html with Safari Tech Preview 217. But 216 was HDR (though darker than what I see under Chrome). Tested with M4 MBP Max. Regards, Greg
Said Abou-Hallawa
Comment 10 2025-04-18 12:28:42 PDT
Hi Greg, We turned Support HDR Display off by default for now, see bug 290190. The system frameworks still have some glitches and we think it is better to enable it by default once everything is complete. You can turn it on from the Develop/Feature Flags dialog. Thanks, Said
Greg
Comment 11 2025-04-30 20:00:14 PDT
Thank you, Said. Makes sense. With Tech Preview 218 and enabling "Support HDR Display", I see support for simple HDR images. I do not see support for gain maps (which is probably the expected result at this stage), at least for the various ISO encodings at https://gregbenzphotography.com/hdr/#tests I see that bit depth reported via JavaScript reports 8 bits/channel. I would expect to see 10, but perhaps this is using 8-bit for HDR (or 8+2 FRC)? The CSS media query works as expected.
Greg
Comment 12 2025-07-02 06:48:26 PDT
Safari 222 shows a significant regression. With "Support HDR Display" enabled, I see only failure. I have tried multiple image formats, web sites, and tests - and none show support for HDR photos.
Said Abou-Hallawa
Comment 13 2025-07-02 10:16:03 PDT
Hello Greg, Thanks for reporting this last report. I think you are trying the HDR on not 100% supported configuration. I think you are trying it on macOS Sequoia which has a limited support for HDR. I know HDR used to work on this configuration but maybe some code was introduced which will not even compile on macOS Sequoia. This code is guarded by `#if HAVE(SUPPORT_HDR_DISPLAY_APIS)`. Introducing this code broke HDR on your configuration. I will have a look. This should not be a problem once the feature is enabled by default. Thanks, Said
Greg
Comment 14 2025-07-02 11:07:12 PDT
Hi Said- Thank you for that feedback. I did test on MacOS 15.5. I just now installed the Safari Tech Preview on another device running Tahoe beta 2 and it shows HDR support. With Safari TP 222 and regular Safari (both under Tahoe beta 2), I see the following bugs which were previously reported via Feedback Assistant remain open: - bit depth (via JS) reported as 8 bits per channel on an HDR display instead of 10 (test #5) - HDR AVIF gain map does not render properly (test #8c) - Safari shows improperly rendered as SDR. This may involve the entire view port or just large horizontal blocks. Task switching seems to be a potential trigger. For tests: https://gregbenzphotography.com/hdr/#tests
Said Abou-Hallawa
Comment 15 2025-07-02 14:19:36 PDT
I filed bug 295358 and bug 295354. I resolved bug 295354 as MOVED because it is below WebKit and tracked by Apple internally as rdar://154351676.
Note You need to log in before you can comment on or make changes to this bug.