In some cases, to achieve better quality, it is recommended to divide the conversion into two steps. For example, if the conversion from CMYK to Lab is needed, first convert from CMYK to RGB, then convert from RGB to Lab. This lets you use other methods for the conversion like the ICC profiles or the emulation tables, which give better results. In addition to this, each color space can be converted to itself. This is sometimes needed for aligning or copying a buffer.
There is also the USE_AUTO method, which guarantees the best conversion algorithm.
Conversions from one color space to the same is supported with both built-in and custom ICC options. The built-in conversion will perform a copy, while the custom ICC depends on the input profiles. For example, a conversion from CIELab with D50 white point to CIELab with D65 white point can be done with D50-CIELab as input profile and D65-CIELab as output profile.