Important: The information in this document is obsolete and should not be used for new development.
The ColorSync Manager Bitmap
The ColorSync Manager provides a bitmap structure of typeCMBitmap
to describe color bitmap images. When your application calls theCWMatchBitmap
function (page 3-120), you pass a pointer to a source bitmap of typeCMBitmap
containing the image whose colors are to be matched to the color gamut of the device specified by the destination profile of the given color world. If you do not want the image color matched in place, you can also pass a pointer to a resulting bitmap of typeCMBitmap
to define and hold the color-matched image. When your application calls theCWCheckBitmap
function (page 3-123), it passes a pointer to a source bitmap of typeCMBitmap
, describing the source image, and a pointer to a resulting bitmap of typeCMBitmap
, to hold the color-check results.
- IMPORTANT
- For QuickDraw GX, an image can have an indexed bitmap to a list of colors. The ColorSync Manager does not support indexed bitmaps in the same way QuickDraw GX does. ColorSync supports indexed bitmaps only when the
cmNamedIndexed32Space
color space constant is used in conjunction with a named color space profile.struct CMBitmap { char *image; /* a bit image */ long width; /* pixel width of a row in the image */ long height; /* number of rows in the image */ long rowBytes;/* offset in bytes from one row to the next */ long pixelSize;/* number of bits per pixel */ CMBitmapColorSpacespace;/* color space for colors of bitmap image */ long user1; /* not used by ColorSync; reserved for QD GX */ long user2; /* not used by ColorSync; reserved for QD GX */ };
Field Description
image
- A pointer to a bit image.
width
- The width of the bit image, that is, the number of pixels in a row.
height
- The height of the bit image, that is, the number of rows in the image.
rowBytes
- The offset in bytes from one row of the image to the next.
pixelSize
- The number of bits per pixel.
space
- The color space in which the colors of the bitmap image are specified. For a description of the possible color spaces for color bitmaps, see "Abstract Color Space Constants" (page 3-23).
user1
- Not used by ColorSync. This field is reserved for use by QuickDraw GX.
user2
- Not used by ColorSync. This field is reserved for use by QuickDraw GX.