Skip to content
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

Allow "display" mode to be independent of color space #64

Open
ccameron-chromium opened this issue Jul 19, 2021 · 0 comments
Open

Allow "display" mode to be independent of color space #64

ccameron-chromium opened this issue Jul 19, 2021 · 0 comments

Comments

@ccameron-chromium
Copy link
Collaborator

Suppose an application wishes to operate in a linear space, but would prefer that their output be composited as HLG or as PQ.

The following code could be one way of accomplishing this. The specifies that the canvas' storage (and thus working space) is extended-linear-srgb, but that its HDR compositing mode is hlg. The way that this is composited would be equivalent to converting to HLG before applying tonemapping. It would also have the property that any HLG images that are drawn to the canvas will appear exactly as they would, had they been specified in an img element.

    canvas.configureHighDynamicRange({mode:'rec2100-hlg'});
    context = canvas.getContext('2d', {colorSpace:'extended-linear-srgb'})
@palemieux palemieux changed the title Allow compositing mode to be independent of color space Allow "display" mode to be independent of color space Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant