[comp.graphics] RGB-=>CMYK

jandreas@pro-graphics.cts.com (Jason Andreas) (06/02/90)

I'm in need of some software (specifically source code) for RGB-=>CMYK
conversion.  If someone could post a phone number or FTP site where such a
thing is available, please do so.


 ProLine: jandreas@pro-graphics
    UUCP: ...crash!pro-graphics!jandreas
ARPA/DDN: pro-graphics!jandreas@nosc.mil
Internet: jandreas@pro-graphics.cts.com

darcy@druid.uucp (D'Arcy J.M. Cain) (06/04/90)

In article <2967@crash.cts.com> jandreas@pro-graphics.cts.com
(Jason Andreas) writes:
>I'm in need of some software (specifically source code) for RGB-=>CMYK
>conversion.  If someone could post a phone number or FTP site where such a
>thing is available, please do so.
>
Perhaps this should be added to the FAQ.

This depends on how you store colour information but assuming each of
the RGB and CMYK components is an integer from 0 to 255 then you have
to do the following:

Convert to CMY
    C = 255 - R
    M = 255 - G
    Y = 255 - B

Find the black level.  This is simply the smallest of C, M or Y.  Subtract
this value from each of C, M and Y.  Note that this means that even with
black included, there is never more than 3 components for a colour.

There are further enhancements which involve adjusting for each of the inks
but this varies with different printing processes.

-- 
D'Arcy J.M. Cain (darcy@druid)     |   Government:
D'Arcy Cain Consulting             |   Organized crime with an attitude
West Hill, Ontario, Canada         |
(416) 281-6094                     |