Translates RGB input into CMYK output.
Translates three-band input images representing red, green, and blue values into images representing cyan, magenta, yellow, and/or black components in that order.
- IN
- Input image. The input image must be BYTE and must contain three image bands, containing the red, green, and blue components.
- OUT
- Output image. The output image is from one to four bands containing the cyan, yellow, magenta, and black components.
- BANDOPT(CYAN,MAGENTA,YELLOW,BLACK)
- Band option. Any combination of the bands specified are generated. The default is for the generation of all four bands.
= CYAN: Cyan band = MAGENTA: Magenta band = YELLOW: Yellow band = BLACK: Black band
- ODTYPE(SAME)
- Output data type. The data type of the output image.
= SAME: Same as input = BYTE: BYTE (8-bit unsigned integer) (0 through 255) = I*2: INTEGER*2 (16-bit signed integer) (-32768 through 32767) = I*4: INTEGER*4 (32-bit signed integer) (-2147483648 through 2147483647) = R*4: REAL*4 (32-bit signed real) (System dependent)
RGB2CMYK translates RGBIMG (containing the three bands of RGB components) into CMYKIMG (consisting of CMYK components). The data type of the output image is INTEGER*2.
A variety of techniques exist for displaying multi-spectral image data in color. One of these is displaying the red, green, and blue (RGB) components of an image. Another technique is to produce and display the complements of red, green and blue--namely cyan, magenta, and yellow (CMY). These are called subtractive primaries because their effect is to subtract some color from white light. The subspace of the cartesian coordinate system for CMY is the same as for RGB, except that white (full light) is at the origin instead of black (no light). Colors are specified by what is removed or subtracted from white light rather than by what is added to blackness.The algorithms for generation of cyan, magenta, yellow, and black bands are as follows:
CYAN(i,j) = 255 - RED(i,j) MAGENTA(i,j) = 255 - GREEN(i,j) YELLOW(i,j) = 255 - BLUE(i,j) BLACK(i,j) = MINIMUM (CYAN(i,j),MAGENTA(i,j),YELLOW(i,j))where (i,j) is the pixel location with RED being the first band, GREEN being the second band, and BLUE being the third band.
The algorithm used in the program was modeled after one presented in Fundamentals of Interactive Computer Graphics by J. D. Foley and A. VanDam.
Reference: J. D. Foley and A. VanDam, Fundamentals of Interactive Computer Graphics, Addison-Wesley Publishing Company, Reading, Massachusetts, 1982, Chap. 17, Section 17.4.2, "The HLS Color Model," p. 612.
An error occurred in closing the image files.
An error occurred while updating the minimum and/or maximum information within the DDR file.
An error occurred in updating the DDR file with the correct history information. The image data is saved.
The name specified in parameter "IN" must contain three bands to correspond to the red, green, and blue bands expected by the program.
The input image must be of BYTE data type only in order for the algorithm to work correctly.
The number of lines or samples for the specified images are different for the corresponding IN elements.
An error occurred in opening the input files.
An error occurred in opening the output files.
An error occurred while allocating dynamic memory for processing.
A fatal error was encountered during processing. The output image file is not deleted, and processing is terminated. The message that is displayed immediately preceding this error message is the specific error that was encountered.