The Adobe RGB 1998 specification 
(http://www.adobe.com/digitalimag/pdfs/AdobeRGB1998.pdf) states that the 
unadapted primaries are:

Red   x=0.6400, y=0.3300
Green x=0.2100, y=0.7100
Blue  x=0.1500, y=0.0600
White x=0.3127, y=0.3290

Further down, the specifications give the hexadecimal values for the 
profile colorants and (V2) white point tag:

The rXYZ tag shall be set to 9c18, 348d, 2631
The gXYZ tag shall be set to 4fa5, a02c, 102f
The bXYZ tag shall be set to 04fc, 0f95, be9c
The wtpt tag shall be set to f351, 10000, 116cc

Converting from hexadecimal to decimal (openoffice calc HEXTODEC), 
dividing by 65536, and rounding to 8 decimal places gives:

rXYZ 0.60974121 0.20527649 0.14918518
GXYZ 0.31111145 0.62567139 0.06321716
bXYZ 0.01947021 0.06086731 0.74456787
wtpt 0.95045471 1.00000000 1.08905029

Using iccToXML (which gives values to 8 decimal places), these are the 
exact values found in Argyllcms's ClayRGB1998.icm and Adobe's 
AdobeRGB1998.icc profiles.

Using LCMS2, the unadapted primaries and source white point values from 
the Adobe RGB specification together produce a profile with the wrong 
blue colorant Z value, being equal to 0.74455261 instead of 0.74456787.

I calculated the D65 to D50 Bradford matrix and used it to 
back-calculate "prequantized" primaries from the ClayRGB profile 
colorant tags.

Using LCMS2, the prequantized primaries plus the Adobe-specified white 
point values (x=0.3127, y=0.3290) produce a profile with colorants that 
exactly match the Adobe/ClayRGB1998 profiles.

Here's the code, if anyone wants to check my results:

cmsCIExyYTRIPLE adobe_primaries = {
{0.6400, 0.3300, 1.0},
{0.2100, 0.7100, 1.0},
{0.1500, 0.0600, 1.0}
};
cmsCIExyYTRIPLE adobe_primaries_prequantized = {
{0.639996511, 0.329996864, 1.0},
{0.210005295, 0.710004866, 1.0},
{0.149997606, 0.060003644, 1.0}
};
cmsCIExyY  d65_adobe_specs = {0.3127, 0.3290, 1.0};
cmsToneCurve* gamma220[3];
gamma220[0] = gamma220[1] = gamma220[2] = cmsBuildGamma (NULL, 2.19921875);
tone_curve[0] = tone_curve[1] = tone_curve[2] = gamma220[0];
profile = cmsCreateRGBProfile ( &d65_adobe_specs, &adobe_primaries, 
tone_curve );
filename = "Test-not-prequantized.icc";
cmsSaveProfileToFile(profile, filename);
profile = cmsCreateRGBProfile ( &d65_adobe_specs, 
&adobe_primaries_prequantized, tone_curve );
filename = "Test-prequantized.icc";
cmsSaveProfileToFile(profile, filename);

The reason for the discrepency between using the regular primaries and 
the prequantized primaries seems to be hexadecimal quantization, which 
affects the illuminant values and the colorant, chromatic adaptation, 
and white point tags.

The Argyllcms profile making code has hexadecimal quantization 
compensation. Is there such code in LCMS2 that I've overlooked? If not, 
could it be added?

Regards,
Elle Stone

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to