You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be a very useful convenience if users could request image data in a target color space / configuration. This impacts both getImageData and toDataURL.
Example use cases:
The user has a wide gamut display, so we use a rec2020 Canvas for drawing, but we need to generate an sRGB snapshot for social media.
We're compositing in linear half float, but we need to read out clamped 8 bit data for use as a WebGL texture.
The user wants to "eyedropper" the color from a deep color Canvas at an arbitrary place, and see the results as both a color(p3, 1, 0, 1) declaration and an sRGB #ff00ff hex code.
Currently the workflow would be to use the drawImage method to draw the canvas into another canvas in the destination colorspace, but that's rather inelegant.
And of course, toDataURL would need to start tagging the destination ICC profile.
It would be a very useful convenience if users could request image data in a target color space / configuration. This impacts both getImageData and toDataURL.
Example use cases:
rec2020Canvas for drawing, but we need to generate an sRGB snapshot for social media.color(p3, 1, 0, 1)declaration and an sRGB#ff00ffhex code.Currently the workflow would be to use the
drawImagemethod to draw the canvas into another canvas in the destination colorspace, but that's rather inelegant.And of course, toDataURL would need to start tagging the destination ICC profile.