[comp.graphics] RGB ---> YMCK

cn@allgfx.agi.oz (Con Neri) (02/08/90)

Does anybody know of the proper conversions to produce
	1) YMCK color images from RGB images.
	2) RGB images from YMCK images.

Any help with the above will be much appreciated. Please e-mail your reply or 
post into this newsgroup, I will summarise if there are enough replies.

thanks in advance
CON NERI

All Graphic R+D				e-mail: cn@allgfx.agi.oz.au
73 Whiteman ST				tele:   +61-3-6966401
South Melbourne				tele:   +61-3-6464333
Vic 3205				tele:   +61-3-6906788
AUSTRALIA

piety@hplred.HP.COM (Bob Piety) (02/09/90)

Given components in the 0..1 range,

C = 1 - R
M = 1 - G
Y = 1 - B
K = .59R + .30G + .11B = Luminance

darcy@druid.uucp (D'Arcy J.M. Cain) (02/09/90)

In article <1990Feb7.220805.27260@allgfx.agi.oz> cn@allgfx.agi.oz (Con Neri) writes:
>Does anybody know of the proper conversions to produce
>	1) YMCK color images from RGB images.
>	2) RGB images from YMCK images.
>
>Any help with the above will be much appreciated. Please e-mail your reply or 
>post into this newsgroup, I will summarise if there are enough replies.
>
given that the colours range from 0 to 255:

Cyan is 255 - red
Magenta is 255 - green
Yellow is 255 - blue

This will give the primary subtractive colours.  To include black, subtract
the lowest of the CMY values from each (making at least one of them 0) and
the subtracted value is the black component.

The reverse should be obvious.

-- 
D'Arcy J.M. Cain (darcy@druid)     |   Thank goodness we don't get all 
D'Arcy Cain Consulting             |   the government we pay for.
West Hill, Ontario, Canada         |
(416) 281-6094                     |

darcy@druid.uucp (D'Arcy J.M. Cain) (02/10/90)

In article <260002@hplred.HP.COM> piety@hplred.HP.COM (Bob Piety) writes:
>Given components in the 0..1 range,
>
>C = 1 - R
>M = 1 - G
>Y = 1 - B
>K = .59R + .30G + .11B = Luminance

I previously posted a different algorithm for this problem and it appears
now that I may have been wrong (not a first for me :-) ).  My algorithm
basically subtracted an equal amount from each of the resulting C, M and Y
values making this subtracted amount the black component.  I recognize the
RGB->Greyscale calculation in the above statement and I can understand that
the different components might have differing weights in the calculation but
doesn't the black component, at least to some extent, have to be adjusted
by reducing the CMY components.  Is the above generally accepted.  None of
the texts I have seen really details this algorithm.

Thanks for your help.

-- 
D'Arcy J.M. Cain (darcy@druid)     |   Thank goodness we don't get all 
D'Arcy Cain Consulting             |   the government we pay for.
West Hill, Ontario, Canada         |
(416) 281-6094                     |

buck@drax.gsfc.nasa.gov (Loren (Buck) Buchanan) (02/12/90)

In article <1990Feb10.151544.19088@druid.uucp> darcy@druid.UUCP (D'Arcy J.M. Cain) writes:
>In article <260002@hplred.HP.COM> piety@hplred.HP.COM (Bob Piety) writes:
>>Given components in the 0..1 range,
>>
>>C = 1 - R
>>M = 1 - G
>>Y = 1 - B
>>K = .59R + .30G + .11B = Luminance
>
>Is the above generally accepted.  None of
>the texts I have seen really details this algorithm.

This is actually a very complicated problem that is not totally
solved.  I imagine that several PhD's can be earned researching
this topic.  It really boils down to what are the CMYK values going
to be used for.  The conversion to CMY is correct.  The problem
with K is that if you use these four values for percentages of ink
to be put to paper your image will be much to dark.

The computation of K is typically on the order of:
  1. Set K to the smallest value of CMY
  2. Subtract K from C, M, and Y

The problem with the above computation is that it does not take
into account the various interactions of the four different inks,
the paper it is applied to, and the printing process used.  These
interactions are usually non-linear.

The thing to do is find a printer who can give you the values you
need (for a particular paper/ink set combination).  

Welcome to the confusing world of printing.  (I am not involved
in the printing industry, but I have had discussions with an expert 
in the field)

B Cing U

Buck
Loren "Buck" Buchanan | internet: buck@drax.gsfc.nasa.gov | standard disclaimer
CSC, 1100 West St.    | uucp: ...!ames!dftsrv!drax!buck   | "By the horns of a
Laurel, MD 20707      | phonenet: (301) 497-2531 or 9898  | sky demon..."