Open mildsunrise opened 3 years ago
There's a class in the mcc contrib module that permits colorspace conversions (differents RGB colorspaces, and CIE colorspaces, linear or not), but it's not available to the API. May be interesting to expose them ?
I'm opening this to put all color space-related issues (#15717, #4973, #13066) in one place. The current state of things in the color conversion API is (as far as I know):
[ ] The documentation talks about "RGB" in general without specifying the actual color space used.
Some conversions expect sRGB, some expect one of the BT.601 color spaces, some are generic transforms that work on top of any RGB space, etc.
[ ] YCbCr / YUV transforms don't specify what standard they are using (BT.601, BT.709, etc.).
[ ] The documentation doesn't specify whether the values have the space's transfer function applied or not.
Some conversions (such as RGB ↔ XYZ) expect/return physical intensities; while others (such as RGB ↔ Lab) expect/return gamma-corrected values (i.e. they take care of applying the reverse transfer function on the input, or the forward transfer function on the output).
[ ] The documentation on
imdecode
/imencode
doesn't specify the color space, or if it has the transfer function applied or not.[ ] There's no API to manually apply or unapply the transfer function of a color space --is the user supposed to do it themselves?
[ ] There's no API to convert between different RGB color spaces (sRGB, BT.601-625, etc.).
[ ] There's no documentation / API on clipping or how to check for clipped colors (i.e. to check for colors which are outside of the new gamut).