Hi,
There is a special built-in profile called the null profile. This profile operates
on gray scale and returns always zero. Since the gamut warning bypasses the
output profile, you can use the null profile to do a quick gamut check: You will
obtain 0 for in-gamut and 255 (or whatever gamut alarm you set) for out of
gamut.
Example:
You want to check gamut colors on cmyk.icc, then:
cmsSetAlarmCodes(255, 255, 255) // This would turn gray alarm code to
255
hNULL = cmsCreateNULLProfile();
cmsCreateProofingTransform(hXYZ, TYPE_XYZ_DBL, hNULL, TYPE_GRAY_8,
hCMYK,
INTENT_RELATIVE_COLORIMETRIC,
INTENT_RELATIVE_COLORIMETRIC,
(cmsFLAGS_GAMUTCHECK|cmsFLAGS_SOFTPROOFING))
Then, for checking a single color
cmsCIEXYZ XYZ;
BYTE gamut;
... put value to check into XYZ ...
cmsDoTransform(xform, &XYZ, &gamut, 1);
Additionaly, icctrans on 1.15 (on CVS) has that implemented. You can
grab the beta sources here http://www.littlecms.com/lcms-1.15.tar.gz
or the precompiled windows binary here: http://www.littlecms.com/icctrans.exe.
Among CGATS support, it has this builtin accesible
I:\>icctrans -i*Lab -o*null -t1 -m1 -g -p cmyk.icc
little cms ColorSpace conversion calculator - v1.9
Enter values, 'q' to quit
L*? 50
a*? -10
b*? 34
G=0.00
Enter values, 'q' to quit
L*? 50
a*? -100
b*? 34
G=255.00
Hope this helps,
--
Marti Maria
The littlecms project.
www.littlecms.com
----- Original Message -----
From: "Alastair M. Robinson" <[EMAIL PROTECTED]>
To: <lcms-user@lists.sourceforge.net>
Sent: Thursday, July 28, 2005 8:40 PM
Subject: [Lcms-user] Out-of-gamut colours?
Hi,
I now have a ColorSavvy CM2C colorimeter to play with. Using the SDK
I've got the gadget reporting XYZ values for what's under its nose and
it seems to be working OK.
The first thing I'm going to try is a simple XYZ->CMYK transform using
LCMS, which leads me to my question:
What's the best way of determining whether a single colour value is
out-of-gamut.
The easiest way I can see is to create a "dummy" proofing transform,
XYZ->CMYK proofed to RGB, and then to watch for the alarm colour in the
output.
Is there a more elegant way that I've missed?
All the best,
--
Alastair M. Robinson
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.9.4/57 - Release Date: 22/07/2005
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September
19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user