Open mikhin opened 8 months ago
I am not sure what is supported or not.
You can try to PR
Seems that we should pass a config object to functions creating a Canvas2DRenderingContext.
This way devs can control the color space and willReadFrequently
.
The same applies for toCanvasElement
, toDataURL
, toBlob
A config option can also be added.
Do you have a link to the actual implemented proposal in w3c org?
@asturur, there are couple links like these:
I would argue that for a feature like this a PR is not the best way to come up with. There are a bunch of issues that come to my mind:
Color class updates to handle the different formats
Testing. How do we do testing for different color spaces functionalities?
Node support. Does node-canvas have this ? ( no that i know of ).
getContext changes: today we assume that the operation canvas.getContext('2d')
give us back always the same context, while i m not sure what happens if you change the color space on the fly or if you can't specify the color space when getting a new context from somewhere else.
Speed issues. When i tried it color space conversion had unbearable speed issue when doing the operations. Is that still the case? That wouldn't be a blocker since at the end a developer can configure the app as he/she prefers.
Definetely a larger plan needs to be done before try to pass a parameter in. If you want to start looking at those things feel free to do so, but take in mind this is possibly a medium/ long term project. Also if you can think of more color-space issues please add them in this thread
CheckList
Description
Add Add Display P3 color space.
Current State
Links:
Additional Context
No response