This is trivial to do in Photoshop but if you have hundreds of images to convert, Marti's recipe is the preferred way to do this.
/ Roger -----Original Message----- From: lcms-user-requ...@lists.sourceforge.net [mailto:lcms-user-requ...@lists.sourceforge.net] Sent: Wednesday, September 7, 2016 8:05 AM To: lcms-user@lists.sourceforge.net Subject: Lcms-user Digest, Vol 112, Issue 5 Send Lcms-user mailing list submissions to lcms-user@lists.sourceforge.net To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/lcms-user or, via email, send a message with subject or body 'help' to lcms-user-requ...@lists.sourceforge.net You can reach the person managing the list at lcms-user-ow...@lists.sourceforge.net When replying, please edit your Subject line so it is more specific than "Re: Contents of Lcms-user digest..." Today's Topics: 1. converting to K-only CMYK (Peter Wang) 2. Re: converting to K-only CMYK (Marti Maria) ---------------------------------------------------------------------- Message: 1 Date: Wed, 7 Sep 2016 11:11:07 +1000 From: Peter Wang <noval...@gmail.com> Subject: [Lcms-user] converting to K-only CMYK To: lcms-user@lists.sourceforge.net Message-ID: <20160907111107.GE1583@lucy.localdomain> Content-Type: text/plain; charset=utf-8 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) ------------------------------ Message: 2 Date: Wed, 7 Sep 2016 09:24:09 +0200 From: "Marti Maria" <marti.ma...@littlecms.com> Subject: Re: [Lcms-user] converting to K-only CMYK To: "'Peter Wang'" <noval...@gmail.com>, <lcms-user@lists.sourceforge.net> Message-ID: <000001d208d8$d38e1d30$7aaa5790$@littlecms.com> Content-Type: text/plain; charset="iso-8859-1" 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 End of Lcms-user Digest, Vol 112, Issue 5 ***************************************** ------------------------------------------------------------------------------ _______________________________________________ Lcms-user mailing list Lcms-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lcms-user