Closed as not planned
Description
It is now common to come across displays that support more than 8 bits per channel. HTML Image elements can use these wider-gamut displays by embedding a color profile in the resource. The CSS Working Group is adding a way to specify the profile used in a color definition, and ensuring that colors are not clipped to 0-255.
That leaves Canvas objects. We need at least a few things in order to use better colors in canvas:
- When calling getContext("2d", options) we need to specify in the options that we want a deeper backing store. This could be done a few ways (a boolean indicating 10bpp, explicitly saying the depth, or some keywords).
- A way to ask an existing canvas object (or the context) how deep its backing store is.
- Alternative forms of getImageData and putImageData that are not restricted to 0-255 bytes. For example, we might need a ImageDataFloat that uses floats in the 0-1 range, and get/setImageDataFloat methods.
All existing methods that take images or ImageData would still keep the existing behaviour. That is, if you create a deep canvas and putImageData into it, that data is assumed to be in sRGB.