Re: [Lcms-user] Getting the profile whitepoint
An ICC-based CMM for color management
Brought to you by:
mm2
|
From: Richard H. <hug...@gm...> - 2012-11-23 09:42:14
|
On 22 November 2012 22:38, Marti Maria <mar...@li...> wrote:
> - use cmsSetAdaptationState(0) prior transform. This is very important in
> order to get the white point from CHAD
Ahh, this is the bit I didn't know about.
> Hope that works to you
Using cmsCreateExtendedTransform allows me to do this without setting
the global state. Thanks!
As an aside, I did wonder about the documentation for
cmsCreateExtendedTransform.
cmsCreateExtendedTransform(cmsContext ContextID,
cmsUInt32Number nProfiles, cmsHPROFILE hProfiles[],
cmsBool BPC[],
cmsUInt32Number Intents[],
cmsFloat64Number AdaptationStates[],
cmsHPROFILE hGamutProfile,
cmsUInt32Number nGamutPCSposition,
cmsUInt32Number InputFormat,
cmsUInt32Number OutputFormat,
cmsUInt32Number dwFlags);
What I expected was nProfiles = 2, hProfiles[2], BPC[2], Intents[1],
AdaptationStates[2], i.e. you set (nProfiles-1) worth of transform
data. If you do this it doesn't work, and so I have to do something
odd like:
cmsUInt32Number intents[2] = { INTENT_ABSOLUTE_COLORIMETRIC,
INTENT_ABSOLUTE_COLORIMETRIC };
Also I don't think BPC makes sense for absolute-colorimetric, and I
kinda expected to be able to pass NULL there. If you do that it blows
up :)
Richard
|