There are discrepancies when converting to an lcms built-in profile, 
compared to converting to the same profile previously saved to disk.

I noticed the discrepancies while testing GIMP 2.9 16-bit integer and 
32-bit floating point ICC profile conversions. The same discrepancies 
happen when using tificc and also when using transicc. So the 
discrepancies seems to be consistent across various ways of accessing 
lcms built-in profiles.

Here is transicc output showing the discrepancies:

Converting to a copy of the lcms built-in sRGB profile that was 
previously saved to disk ("-o sRGB-lcms-built-in.icc"):

$ transicc -w -t1 -c0 -b -i sRGB-elle-V4-g100.icc -o sRGB-lcms-built-in.icc
LittleCMS ColorSpace conversion calculator - 4.2 [LittleCMS 2.06]

Enter values, 'q' to quit
R? 255 255 255
G? B?
R=255.0019 G=254.9968 B=255.0028

Enter values, 'q' to quit
R? 255 0 0
G? B?
R=255.0450 G=0.0839 B=-0.0372

Enter values, 'q' to quit
R? 0 255 0
G? B?
R=-1.3516 G=254.9937 B=-0.3004

Enter values, 'q' to quit
R? 0 0 255
G? B?
R=0.0858 G=0.0080 B=255.0143

Converting to the transicc built-in sRGB profile ("-o *sRGB"):

$ transicc -w -t1 -c0 -b -i sRGB-elle-V4-g100.icc -o *sRGB
LittleCMS ColorSpace conversion calculator - 4.2 [LittleCMS 2.06]

Enter values, 'q' to quit
R? 255 255 255
G? B?
R=255.0007 G=254.9997 B=255.0009

Enter values, 'q' to quit
R? 255 0 0
G? B?
R=255.0428 G=0.1139 B=-0.0725

Enter values, 'q' to quit
R? 0 255 0
G? B?
R=-1.3259 G=254.9944 B=-0.2851

Enter values, 'q' to quit
R? 0 0 255
G? B?
R=0.0893 G=0.0423 B=255.0130


Here's the code that I used to save a copy of the lcms built-in sRGB 
profile to disk:

After declaring/defining the variables:

profile = cmsCreate_sRGBProfile();
cmsWriteTag(profile, cmsSigCopyrightTag, copyright);
cmsWriteTag(profile, cmsSigDeviceMfgDescTag, manufacturer);
description = cmsMLUalloc(NULL, 1);
cmsMLUsetASCII(description, "en", "US", "sRGB-lcms-built-in.icc.");
cmsWriteTag(profile, cmsSigProfileDescriptionTag, description);
filename = "sRGB-lcms-built-in.icc";
cmsSaveProfileToFile(profile, filename);
cmsMLUfree(description);


Elle Stone

------------------------------------------------------------------------------
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user

Reply via email to