My apologies in advance for a long preamble to three short questions!
It seems to me that a fundamental requirement of an RGB working space
is that it be color-balanced, meaning that if R=G=B, then in CieLAB
space a=b=0 (the color is completely neutral gray). Also, for an 8-bit
image, if R=G=B=255, then LAB L* should be 100 on a scale from 0 to
100.
The "sRGB.icm" profile that comes with Argyllcms *is* color-balanced.
Checking "sRGB.icm" using transicc and xicclu, there is a small
discrepency between transicc and xicclu values:
$ transicc -w -i sRGB-argyll.icc -o *Lab -t1 -c0
R? G? B? 255 255 255 L*=100.0000 a*=0.0005 b*=-0.0004
$ xicclu -ir -pl -s255 sRGB-argyll.icc
255.000000 255.000000 255.000000 [RGB] -> MatrixFwd -> 100.000000
0.000000 0.000000 [Lab]
I wrote a program that uses lcms (v2.5) to make 3 different V2 sRGB
profiles. Whether the resulting profile is color-balanced depends on
the values used for the D65 white point. The profile that uses the D65
value from the Argyll sRGB profile is *almost* color-balanced. But the
profiles that use the D65 value from the lcms API are not
color-balanced. This is true whether the profiles are V4 or V2, but
the examples below are V2 so that xicclu can also read the profiles.
cmsCIExyY d65_lcms = {0.3127, 0.3291, 1.0}; /* from
lcms 2.5 API */
cmsCIExyY d65_argyll = {0.312700492, 0.329000939, 1.0}; /*
argyllcms srgb white point */
Code for three sRGB profiles:
1. whitepoint = d65_argyll; /* using d65-argyll */
primaries = srgb_primaries;
tone_curve[0] = tone_curve[1] = tone_curve[2] = srgb_parametric_curve[0];
profile = cmsCreateRGBProfile ( &whitepoint, &primaries, tone_curve );
cmsSetProfileVersion(profile, 2.1);
filename = "sRGB-V2-d65-argyll.icc";
cmsSaveProfileToFile(profile, filename);
2. whitepoint = d65_lcms; /* using d65_lcms */
primaries = srgb_primaries ;
tone_curve[0] = tone_curve[1] = tone_curve[2] = srgb_parametric_curve[0];
profile = cmsCreateRGBProfile ( &whitepoint, &primaries, tone_curve );
cmsSetProfileVersion(profile, 2.1);
filename = "sRGB-V2-d65-lcms.icc";
cmsSaveProfileToFile(profile, filename);
3. hprofile = cmsCreate_sRGBProfile(); /* cmsCreate_sRGBProfile */
cmsSetProfileVersion(hprofile, 2.1);
filename = "lcms-cmsCreate_sRGBProfile.icc";
cmsSaveProfileToFile(hprofile, filename);
1 above, using the same D65 value as the Argyllcms "sRGB.icm",
produces a profile that is almost identical to sRGB.icm and is almost
color-balanced:
$ transicc -w -i sRGB-V2-d65-argyll.icc -o *Lab -t1 -c0
R? G? B? 255 255 255 L*=100.0000 a*=0.0005 b*=0.0008
$ xicclu -ir -pl -s255 sRGB-V2-d65-argyll.icc
255.000000 255.000000 255.000000 [RGB] -> MatrixFwd -> 100.000000
0.000000 0.001233 [Lab]
2 and 3 above, using the D65 value from the lcms API, produce almost
identical profiles that are not color-balanced. Checking
"lcms-cmsCreate_sRGBProfile.icc":
$ transicc -w -i lcms-cmsCreate_sRGBProfile.icc -o *Lab -t1 -c0
R? G? B? 255 255 255 L*=100.0006 a*=-0.0020 b*=0.0018
$ xicclu -ir -pl -s255 lcms-cmsCreate_sRGBProfile.icc
255.000000 255.000000 255.000000 [RGB] -> MatrixFwd -> 100.000590
-0.002543 0.002250 [Lab]
Similar results obtain with other D65 profiles (eg adobe_compatible)
and also with D50 profiles like widegamut and prophoto, where again
the difference between color-balanced and not color-balanced depends
on using a white point that isn't exactly equal to official D50 white
point values.
Three questions: First, when making a profile, is there any reason to
use official D65 and D50 white points that produce profiles that
aren't color-balanced?
Second, for an 8-bit image, perhaps it doesn't matter whether an ICC
profile is perfectly color-balanced or not. Does it matter for the
increasing number of image editors and raw processors that work with
32-bit linear gamma floating point images?
Third, why the discrepency between xicclu and transicc values?
Thanks in advance for insight on this issue of color-balanced profiles!
--
Elle Stone
http://ninedegreesbelow.com - articles on color management & open
source photography
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Lcms-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lcms-user