Hi All,
I am having an issue with little CMS built in Lab profiles that I have a hard
time understanding. When I try to represent the Gamut of my display from its
profile by using the API in different Lab spaces created with two different
white points (in this case D50 and D65), I would expect to observe some
differences.For instance, The White point (1.0, 1.0, 1.0) could not be
converted to Lab (100, 0.0, 0.0) in both spaces, as the reference illuminants
used for the conversions are different.
I wrote the code sample below to enlighten my confusion:
/* hProfile is a display profile read from a validated Icc profile
beforehand*/
cmsHPROFILE labD50, labD65;
labD50 = cmsCreateLab4Profile(cmsD50_xyY());
cmsCIExyY white; cmsCIEXYZ white_xyz; white_xyz.X = 0.95047;
white_xyz.Y = 1.00000; white_xyz.Z = 1.08883; //D65
cmsXYZ2xyY(&white,&white_xyz); labD65 = cmsCreateLab4Profile(&white);
cmsHTRANSFORM TD50 = cmsCreateTransform( hProfile,
TYPE_RGB_DBL, labD50, TYPE_Lab_DBL,
INTENT_ABSOLUTE_COLORIMETRIC, // same with relative 0 );
cmsHTRANSFORM TD65 = cmsCreateTransform( hProfile, TYPE_RGB_DBL,
labD65, TYPE_Lab_DBL, INTENT_ABSOLUTE_COLORIMETRIC, // same
with relative 0 );
const int SIZE = 64; int Errcount = 0; double sum = 0.0; for
(int r = 0; r < SIZE; ++r) for (int g = 0; g < SIZE; ++g)
for (int b = 0; b < SIZE; ++b) {
cmsCIELab LD50, LD65; double RGB[] = {
double(r)/double(SIZE-1), double(g)/double(SIZE-1),
double(b)/double(SIZE-1) };
cmsDoTransform(TD50,RGB,&LD50,1);
cmsDoTransform(TD65,RGB,&LD65,1); sum += abs(LD50.L -
LD65.L) + abs(LD50.a - LD65.a) + abs(LD50.b - LD65.b); if
(LD50.L != LD65.L || LD50.a != LD65.a || LD50.b != LD65.b) {
Errcount++; } }
As a result, absolutely no difference has been observed.
Could someone please give some more precision about those built in profiles?
Did I misunderstand something?
Best regards,
Vincent.
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user