Carbon


CMBitmap

Header: CMApplication.h

struct CMBitmap {
    char *image; 
    SInt32 width; 
    SInt32 height; 
    SInt32 rowBytes; 
    SInt32 pixelSize; 
    CMBitmapColorSpace space; 
    SInt32 user1; 
    SInt32 user2;
};

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.

The ColorSync Manager defines a bitmap structure of type CMBitmap to describe color bitmap images. When your application calls the function CWMatchColors, 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.

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.


© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)