Re: HTML Canvas - Transforms for HDR and WCG

On Thu, Apr 1, 2021 at 3:35 AM Simon Thompson-NM <Simon.Thompson2@bbc.co.uk>
wrote:

> Hi,
>
>
>
> One further thought from me, the proposal last night depended on using a
> certain image import function which allowed the user to dictate a target
> colour space and transform set.  Does a similar video import function exist?
>
>
Yes! It's the same function, createImageBitmap
<https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/createImageBitmap>,
and it takes as input: images, SVG, video, canvas (so you can draw your
canvas into your canvas), and blob (not-yet-decoded image). The options
include a "colorSpaceConversion" option, which is currently "none" or
"default". This is where I think we should consider adding a well-defined
perceptual colorimetric intent (and this intent wouldn't be
path-independent).

When the input is a blob (a not-yet-decoded image), the color space
conversion can happen simultaneously with image decode.

Received on Thursday, 1 April 2021 18:13:10 UTC