Re: [Lcms-user] How to transform across profiles with different whitepoints?
An ICC-based CMM for color management
Brought to you by:
mm2
|
From: <mar...@li...> - 2025-10-27 16:06:01
|
Hi Lukas, Human vision is capable to discount the chromaticity of media or the light that illuminates that media. https://en.wikipedia.org/wiki/Chromatic_adaptation The ICC way to do color management assumes you want this behavior by default. Light used to illuminate the media is always discounted. Chromaticity of the media is controlled by the rendering intent. “absolute colorimetric” means to NOT discount the media color. You normally should use “perceptual” or “relative colorimetric plus black point compensation” , as you normally want to model full adaptation. That is, consider unprinted paper is “white” no matter different papers may be of different color. LittleCMS can also deal with the light, by using cmsSetAdaptationState(), but this is an advanced feature that may confuse you. Use only if strictly needed. So, to answer your question, you have just to use intent perceptual or relative colorimetric and white points are handled automatically by profiles. Hope that helps Marti Maria The LittleCMS Project https://www.littlecms.com From: Lukas Sommer <som...@gm...> Sent: Monday, October 27, 2025 1:31 PM To: Lcm...@li... Subject: [Lcms-user] How to transform across profiles with different whitepoints? Hello! I've a question about correct treatment of profiles with different whitepoints. Consider the following code: /////////////////////////////////////////////////////////////////////////// cmsHPROFILE srgbProfileHandle = cmsCreate_sRGBProfile(); // D65? cmsHPROFILE cielabProfileHandle = cmsCreateLab4Profile( // nullptr means: Default white point (D50) // TODO Does this make sense? sRGB, for example, has // D65 as whitepoint… nullptr); auto m_transform = cmsCreateTransform( cielabProfileHandle, // input profile handle TYPE_Lab_DBL, // input buffer format rgbProfileHandle, // output profile handle TYPE_RGB_DBL, // output buffer format INTENT_ABSOLUTE_COLORIMETRIC, // rendering intent cmsFLAGS_NOCACHE // flags ); /////////////////////////////////////////////////////////////////////////// Now, I suppose srgbProfileHandle is D65 and cielabProfileHandle is D50? Is it allowed to create simply the transform like in the example, and to rely on LCMS to do the conversion? Or do I have to make a white point adaption before? Best regards Lukas |