PATHMac OS 8 Developer Documentation > Mutlimedia and Graphics > ColorSync Manager >

Managing Color With ColorSync


Bitmap Information

The ColorSync Manager defines the CMBitmap type to describe color bitmap images.


CMBitmap

The ColorSync Manager defines a bitmap structure of type CMBitmap to describe color bitmap images. When your application calls the function CWMatchBitmap , you pass a pointer to a source bitmap of type CMBitmap 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 type CMBitmap to define and hold the color-matched image. When your application calls the function CWCheckBitMap , it passes a pointer to a source bitmap of type CMBitmap , describing the source image, and a pointer to a resulting bitmap of type CMBitmap , 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 1 row to the next */
    long                pixelSize;  /* number of bits per pixel */
    CMBitmapColorSpace  space;      /* color space for colors of bitmap image */
    long                user1;      /* not used by ColorSync*/
    long                user2;      /* not used by ColorSync */
};

Field descriptions

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. The pixel size should correspond to the packing size specified in the space field. This requirement is not enforced as of ColorSync version 2.5, but it may be enforced in future versions.
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 Color Space Constants With Packing Formats .
user1
Not used by ColorSync. It is recommended that you set this field to 0.
user2
Not used by ColorSync. It is recommended that you set this field to 0.

© 1988-1999 Apple Computer, Inc. — (Last Updated 20 Jan 99)