Message-Id: <199802192341.QAA19710@dns.ccit.arizona.edu> Date: Thu, 19 Feb 1998 16:38:46 +0000 From: "Louis H. Sharpe II" <mailto:lsharpe@PICTUREL.COM> Subject: Re: How to convert RGB image to CMYK To: mailto:IMAGELIB@LISTSERV.ARIZONA.EDU
At 02:53 PM 2/18/98 +0800, you wrote:>Does anyone know the arithmetic of converting RGB to CMYK?
>or, does anyone have any recommendations ?
The short answer is, there isn't a short answer.
A good reference (if only to see how complex the subject is) might be: Handbook of Applied Photometry, Casimer DeCusatis, ed., 1997, AIP Press, Chapter 10 on Colorimetry by Janos D. Schanda.
In conversions between two idealized color spaces, a simple 3 by 3 matrix multiply can be used.
In the messy thing we call real life, two cascaded table look-ups are used, one for the scanning device that created the image and got it into some (non-standard) RGB color space and one for the printing device/system that is going to lay down patches of some variant of each of Cyan, Magenta and Yellow colored inks.
ICC profiles are used as a standard way of expressing and interchanging these look-up tables. More on this from ICC: http://www.color.org
Another discussion of this process can found at a German printing standards web site:
http://www.fogra.org/Dienstleistung/ICC-ProfileOffset/CM-theory-e.html#trans formation
There is a new standardized RGB color space, "sRGB" for web images. It is also used by the FlashPix standard. If your source image uses that color space (or if you avert your eyes and pretend it does), you could get away with just characterizing the output device (a single table look up).
Then, pretending you're a programmer with a problem who doesn't have time to swallow the whole ICC pill, you could be really reckless and ignore that all process inks and presses or printers are a little different and do the conversion the way PostScript Level 2 does (PostScript Language Reference Manual, 2nd edition, Adobe Systems, 1990, pg. 306):
C = 255 - R (for 8-bit values) M = 255 - G Y = 255 - B K = minimum of (C, M, Y), but see below...
K (or Black) is a little trickier. There are two tricks used in printing which improve the appearance of the printed result (and save ink cost?) by taking ink out of the CMY values and putting it into K. Black generation (BG) and undercolor removal (UCR) are functions that modify the above equations in a way suited to the specifics of the output device.
C' = C - UCR M' = M - UCR Y' = Y - UCR K' = K + BG
>I'm so sorry to haven't strike the right note, I 'm interested in the
>principle or arithmetic which is used by Photoshop to convert RGB image to
>CMYK (and CMYK to RGB).
As to what Photoshop does, I don't know, but bet it depends on the version. The latest likely uses the Apple and Microsoft versions of the ICC profile scheme, or the next version will.
Hope this helps.
Lou
Louis H. Sharpe II mailto:lsharpe@picturel.com Picture Elements, Inc. +1 303-444-6767 410 22nd Street, Boulder, CO 80302 USA fax +1 303-415-1392 http://www.picturel.com PGP Key Available: http://www.pgp.com