-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Adding support for High Dynamic Range (HDR) imagery to HTML Canvas: a baseline proposal #9461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
cc @whatwg/canvas Not my domain of expertise at all, so pardon me if I'm out of context here, but the |
Is the following use case the one you have in mind?
What should the |
I'll continue the first branch of the discussion over at the linked issue.
Yes, that's the use case I had in mind. And I'm not sure how using that API it can be handled, nor if it's actually possible to handle it. |
One approach is to set the Another approach is to simply not specify any Finally, the next step for the CG is to define an API that allows the web app to perform its own tone-mapping. for more complex uses or when the app needs finer control. |
Please find below an updated proposal for adding support for High Dynamic Range (HDR) imagery to HTML Canvas. https://github.com/w3c/ColorWeb-CG/blob/hdr_canvas_r2/hdr_html_canvas_element.md Selected highlights of this revision to the proposal;
Feedback, issues and questions are welcome at mailto:[email protected] and https://github.com/w3c/ColorWeb-CG/issues. Contacts: @palemieux and @svgeesus (Color on the Web CG co-chairs) |
(Crosspost from my local github) World's First Web HDR Test MatrixThis is not even found on 'caniuse' (cc: @Fyrd) yet. Due to the emerging flagless WebGPU HDR situation, I am refactoring TestUFO 2D animations to eventually support any canvas type for common 2D animations. By summer my intent is all TestUFO animations can run on Canvas2D / WebGL / WebGPU (switchable in TestuFO settings), making flagless HDR easy in many browsers. To make this easy, I want to team-up and/or donate time to creating a single webpage to check common HDR HTML elements (canvas/video/image). A quick visual check of true end-to-end HDR support (HTML to photons). Also complicating testing is many VMs (e.g. BrowserStack, Parallels) do not suport HDR yet, although VMWARE Fusion does support HDR. Happy 404 DayOne time manual-test special for State of Web HDR on Windows and Mac. HDR Support Per Browser Engine, 2025-04-04
LegendA successful pass is the human visible brighter-than-#FFFFFF-white becoming visible on HDR monitor on both Windows/Mac, as indicated in below photograph example.
Test Suite (Manual Tests)
Example Test Pass Of End-To-End HDR: Brighter-Than-#FFFFFF WhiteThe background of the gregbenz page is RGB Hex #FFFFFF. Anything that successfully shows as HDR, means the browser compositing framebuffer is already successfully matching display colorspace (usually float16x3 = 48bit framebuffer), and successfully displaying whites brighter than hex #FFFFFF white, confirming definitive end-to-end HDR support.
|
Uh oh!
There was an error while loading. Please reload this page.
The Color on the Web CG would very much appreciate your feedback on the following strawman, which motivates and proposes baseline modifications to the HTML Canvas API to enable support for High-Dynamic Range (HDR) imagery:
https://github.com/w3c/ColorWeb-CG/blob/8eac62f15e5b41940636beb031f6214b61e933af/hdr_html_canvas_element.md
The proposed modifications allow the HTML Canvas API to manipulate High Dynamic Range (HDR) images expressed using the widespread BT.2100 PQ and BT.2100 HLG color spaces, without precluding adding future HDR capabilities, such as support for additional color spaces like a linear high-dynamic range color space.
The text was updated successfully, but these errors were encountered: