Hello, Indeed a very good question.
The short answer is no, there is no way in traditional ICC workflow to do that. The long answer is, yes, we can do it with some additional effort. As you already know, an ICC profile is a "black box" that performs color space translations. In the case of a CMYK profile, we have a black box that converts CIE L*a*b <=> CMYK. Since CMYK is a 4 dimension space and CIE L*a*b* has 3 dimensions, there are redundancy and when converting Lab -> CMYK the profile has to choose one from the many ways it can do it. On the other hand, black ink often is not pure black, it has some chroma for a observer adapted to D50 which is the ICC PCS. So, when we feed gray Lab to a CMYK profile, we often get CMY components. This is the gray generation and each profile vendor does it differently. sRGB here is out of the equation, what you need is a customized profile that would return K (and only K!) For all PCS input. To build it, we need also a conversion to gray. Since Lab is very good in splitting chroma and luma, we can use (L*, 0, 0) to force gray values. Here is the cooking recipe: - Create a CMYK to Lab transform by using your CMYK profile. - Measure L* of K at regular points by using this transform. i.e. for (k=0; k < 255; k++) transform (0, 0, 0, k) -> Lab; get L and discard a, b; - Normalize those point from 0..100 to 0..0xffff and create a sampled tone curve. This curve will implement L*(k), and should be monotonic. If not monotonic, the CMYK profile is not good and the game is over - Reverse the curve by using cmsReverseToneCurveEx. You will end with a curve implementing K(L*) - Create a constant zero tone curve by using two points set to 0. - Build a profile with cmsCreateLinearizationDeviceLink by using the reversed curve for L* and two zero curves for a* and *b. Mark this profile as Lab as input and 3 channels as output. Probably labeling it as output profile would be a good move. The profile has a weir output format (K, 0, 0) but this makes things a lot simpler. To do it "well" you would need to use a CLUT. Now you can use this profile as output in a sRGB to KXX transform. You will find K in the first output channel. As additional bonus you can use any input profile other than sRGB and any color other than R=G=B. Regards Marti Maria The LittleCMS project http://www.littlecms.com -----Original Message----- From: Peter Wang [mailto:noval...@gmail.com] Sent: miƩrcoles, 7 de septiembre de 2016 3:11 To: lcms-user@lists.sourceforge.net Subject: [Lcms-user] converting to K-only CMYK Hi, Is there a recommended way to convert a gray level in a source profile (namely sRGB) to a K value in a CMYK space? That is, I would like the C,M,Y channels to be zero. Peter (sorry if this is a repost) ---------------------------------------------------------------------------- -- _______________________________________________ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user ------------------------------------------------------------------------------ _______________________________________________ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user