PANDORE Version 6 | GREYC-IMAGE |
prgb2cmyk converts color image from the color space RGB (Red, Green, Blue) to the color space CMYK (Cyan, Magenta, Yellow, Key).
The CMYK color model is a subtractive color model, used in color printing. CMYK refers to the four inks used in some color printing: cyan, magenta, yellow, and key (black).
The conversion from RGB to CMYK uses the following algorithm:
if (R=0 and G=0 and B==0) then C=0; M=0; Y=0; K = 255; else x = 1 - (R/255); y = 1 - (G/255); z = 1 - (B/255); min = MIN(x, MIN(y,z)); C = (x - min) / (1 - min) *255; M = (y - min) / (1 - min) *255; Y = (z - min) / (1 - min) *255; K = min * 255;
Returns SUCCESS or FAILURE.
Converts parrot.pan from rgb to cmyk, and stoire the cyan band.
prgb2cmyk parrot.pan a.pan pgetband 0 a.pan cyan.pan
Changement d'espace couleur de RGB vers Cyan-Magenta-Yellow-Key.
Author: Régis Clouard