Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Advanced Color Imaging Reference /
Chapter 3 - ColorSync Manager Reference for Applications and Device Drivers / ColorSync Manager Functions
Converting Between Color Spaces /


CMConvertRGBToGray

Converts colors specified in the RGB color space to equivalent colors defined in the Gray color space.

pascal CMError CMConvertRGBToGray (
const CMColor *src, 
CMColor *dst, 
unsigned long count);
src
A pointer to an array containing the list of colors specified in RGB space to convert to colors specified in Gray space.
dst
A pointer to an array containing the list of colors, resulting from the conversion, as specified in the Gray color space.
count
The number of colors to convert.
function result
A result code of type CMError. See "Result Codes" (page 3-174) for a list of ColorSync-specific result codes.
DISCUSSION
The CMConvertRGBToGray function converts one or more colors defined in the RGB color space to equivalent colors defined in the Gray color space. Both color spaces are device dependent.

If your application does not require that you preserve the source color list, you can pass the pointer to the same color list array as the src and dst parameters and allow the CMConvertRGBToGray function to overwrite the source colors with the resulting converted color specifications.

SEE ALSO
For information about the color conversion routines in previous versions of ColorSync, see "Converting Between Color Spaces" (page 3-143).


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996