![]() |
PATH![]() |
![]() ![]() |
The data type
CMBitmap
defines a bitmap for an image whose colors can be matched with the function
CWMatchBitmap
or color-checked with the function
CWCheckBitMap
.
The space field of the CMBitmap type definition identifies the color space in which the colors of the bitmap image are specified. A color space is characterized by a number of components or dimensions, with each component carrying a numeric value. These values together make up the color value. A color space also specifies the format in which the color value is stored. For bitmaps in which color values are packed, the space field of the CMBitmap data type holds a constant that defines the color space and the packing format.
For the CWMatchBitmap function to perform color matching successfully, the color space specified in the CMBitmap data type's space field must correspond to the color space specified in the profile's dataColorSpace field. The source bitmap and source profile values must match and the destination bitmap and destination profile values must match. For the CWCheckBitMap function to perform color checking successfully, the source profile's dataColorSpace field value and the space field value of the source bitmap must specify the same color space. These functions will execute successfully as long as the color spaces are the same without regard for the packing format specified by the bitmap.
The following enumeration defines constants for abstract color spaces which, when combined with a packing format constant as described in Color Packing for Color Spaces , can be used in the space field of the CMBitmap structure. The combined constants are shown in Color Space Constants With Packing Formats .
enum {
cmNoSpace = 0,
cmRGBSpace = 1,
cmCMYKSpace = 2,
cmHSVSpace = 3,
cmHLSSpace = 4,
cmYXYSpace = 5,
cmXYZSpace = 6,
cmLUVSpace = 7,
cmLABSpace = 8,
cmReservedSpace1 = 9,
cmGraySpace = 10,
cmReservedSpace2 = 11,
cmGamutResultSpace = 12,
cmNamedIndexedSpace = 16,
cmMCFiveSpace = 17,
cmMCSixSpace = 18,
cmMCSevenSpace = 19,
cmMCEightSpace = 20,
cmRGBASpace = cmRGBSpace + cmAlphaSpace,
cmGrayASpace = cmGraySpace + cmAlphaSpace
};
CWCheckBitMap
. A bitmap never uses this constant alone. Instead, it uses the constant
cmGamutResult1Space
, which combines
cmGamutResultSpace
and
cmOneBitDirectPacking
to define a bitmap that is 1 bit deep.The constants cmRGBASpace and cmGrayASpace were moved to this enum from Color Space Constants With Packing Formats in ColorSync version 2.5.