Carbon


CMHeader

Header: CMICCProfile.h

struct CMHeader {
    UInt32 size; 
    OSType CMMType; 
    UInt32 applProfileVersion; 
    OSType dataType; 
    OSType deviceType; 
    OSType deviceManufacturer; 
    UInt32 deviceModel; 
    UInt32 deviceAttributes[2]; 
    UInt32 profileNameOffset; 
    UInt32 customDataOffset; 
    CMMatchFlag flags; 
    CMMatchOption options; 
    CMXYZColor white; 
    CMXYZColor black; 
    ATPCompletionUPP ioCompletion; 
    OSErr ioResult; 
    SInt32 userData; 
    SInt16 reqTID; 
    SInt16 ioRefNum; 
    SInt32 ataConfigSetting; 
    UInt8 ataPIOSpeedMode; 
    UInt8 reserved; 
    UInt16 atapcValid; 
    UInt16 ataRWMultipleCount; 
    UInt16 ataSectorsPerCylinder; 
    UInt16 ataHeads; 
    UInt16 ataSectorsPerTrack; 
    UInt16 ataSocketNumber; 
    gxTranslationOption options; 
    Rect srcRect; 
    Point styleStretch; 
    UInt32 dataLength; 
    gxBitmapDataSourceAlias alias; 
    UInt32 flags; 
    SInt32 portID; 
    UInt32 seed; 
    Str255 serverNameStr;
};

Field descriptions

size

The total size in bytes of the profile, including any custom data.

CMMType

The signature of the preferred CMM for color-matching and color-checking sessions for this profile. To avoid conflicts with other CMMs, this signature must be registered with the ICC. For the signature of the default CMM, see “Signature of Default Color Management Module”.

applProfileVersion

The Apple profile version. Set this field to $0100 (defined as the constant kCMApplProfileVersion).

dataType

The kind of color data. The types are

rgbData = 'RGB ', source or destination profilescmykData = 'CMYK', destination profilesgrayData = 'GRAY', source or destination profilesxyzData = 'XYZ ' source or destination profiles

deviceType

The kind of device. The types are

monitorDevice = 'mntr' scannerDevice = 'scnr'printerDevice = 'prtr'

deviceManufacturer

A name supplied by the device manufacturer.

deviceModel

The device model specified by the manufacturer.

deviceAttributes

Private information such as paper surface and ink temperature.

profileNameOffset

The offset to the profile name from the top of data.

customDataOffset

The offset to any custom data from the top of data.

flags

A field used by drivers; it can hold one of the following flags:

CMNativeMatchingPreferredCMTurnOffCache

The CMNativeMatchingPreferred flag is available for developers of intelligent peripherals that can off-load color matching into the peripheral. Most drivers will not use this flag. (Its default setting is 0, meaning that the profile creator does not care whether matching occurs on the host or the device.)

Use the CMTurnOffCache flag for CMMs that will not benefit from a cache, such as those that can look up data from a table with less overhead, or that do not want to take the memory hit a cache entails, or that do their own caching and do not want the CMM to do it. (The default is 0, meaning turn on cache.)

options

The options field specifies the preferred matching for this profile; the default is CMPerceptualMatch; other values are CMColorimetricMatch or CMSaturationMatch. The options are set by the image creator.

white

The profile illuminant white reference point, expressed in the XYZ color space.

black

The black reference point for this profile, expressed in the XYZ color space.

ioCompletion
ioResult
userData
reqTID
ioRefNum

ColorSync 1.0 defined a version 1.0 profile whose structure and format are different from that of the ICC version 2.x profile. The CMHeader data type represents the version 1.0 profile header. For more information on profile version numbers, see “ColorSync and ICC Profile Format Version Numbers”. To obtain a copy of the International Color Consortium Profile Format Specification, or to get other information about the ICC, visit the ICC Web site at .

Your application cannot use ColorSync Manager functions to update a version 1.0 profile or to search for version 1.0 profiles. However, your application can use other ColorSync Manager functions that operate on version 1.0 profiles. For example, your application can open a version 1.0 profile using the function CMOpenProfile, obtain the version 1.0 profile header using the function CMGetProfileHeader, and access version 1.0 profile elements using the function CMGetProfileElement.

To make it possible to operate on both version 1.0 profiles and version 2.x profiles, the ColorSync Manager defines the union CMAppleProfileHeader, which supports either profile -*header version. The CMHeader data type defines the version 1.0 profile header, while the CM2Header data type defines the version 2.x profile header.

VERSION NOTES

Use of the CMHeader type is not recommended for ColorSync versions starting with 2.0. Use CM2Header instead.


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