Hi,

I think there may be a bug in cmsvirt.c/cmsCreateRGBProfileTHR, in the 
call to _cmsAdaptationMatrix, which causes the 'chad' matrix from 
resulting profiles to convert from PCS to device instead of the other 
way around.

(From the ICC spec)
"This tag, which must be invertible, converts an XYZ colour, measured at 
a device's specific illumination conditions, to an XYZ colour in the PCS 
illumination conditions after complete adaptation."

So, the inverted matrix should do the opposite.

This is not the case with the profile I looked at. When I multiply the 
inverted matrix with D50 XYZ numbers, which should yield the device 
illuminant (CCT around 6460K), I get a far too 'warm' result (CCT around 
4408K). Not inverting the matrix yields the correct values.

I think the FromIll/ToIll arguments to _cmsAdaptationMatrix are simply 
reversed.

_cmsAdaptationMatrix(&CHAD, NULL, cmsD50_XYZ(), &WhitePointXYZ);

should probably be:

_cmsAdaptationMatrix(&CHAD, NULL, &WhitePointXYZ, cmsD50_XYZ());

Regards
-- 
Florian Höch


------------------------------------------------------------------------------
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to