![]() |
PATH![]() |
![]() ![]() |
The ColorSync Manager defines a profile header type for version 2.x profiles, a separate header for version 1.0 profiles, and a header union that can provide access to either a version 2.x or a version 1.0 profile. For more information on profile version numbers, see ColorSync and ICC Profile Format Version Numbers .
CMHeader
defines the version 1.0 profile header;
not recommended starting with ColorSync 2.0
.CM2Header
supports the header format specified by the ICC format specification for version 2.x profiles.CMAppleProfileHeader
provides access to both version 2.x and version 1.0 profiles.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 http://www.color.org .
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.
struct CMHeader {
unsigned long size; /* byte size of profile */
OSType CMMType; /* signature of preferred CMM */
unsigned long applProfileVersion; /* Apple profile version */
OSType dataType; /* type of color data, such as rgb */
OSType deviceType; /* device type, such as monitor */
OSType deviceManufacturer; /* device manufacturer */
unsigned long deviceModel; /* as specified by manufacturer */
unsigned long deviceAttributes[2]; /* private info on ink, paper, etc. */
unsigned long profileNameOffset; /* offset to name from top of data */
unsigned long customDataOffset; /* offset to custom data from top */
CMMatchFlag flags; /* misc. info used by drivers */
CMMatchOption options; /* matching type, such as perceptual */
CMXYZColor white; /* white point in XYZ space */
CMXYZColor black; /* black point in XYZ space */
};
rgbData = 'RGB ', source or destination profiles
cmykData = 'CMYK', destination profiles
grayData = 'GRAY', source or destination profiles
xyzData = 'XYZ ' source or destination profiles
monitorDevice = 'mntr'
scannerDevice = 'scnr'
printerDevice = 'prtr'
CMNativeMatchingPreferred
CMTurnOffCache
For more information on ColorSync 1.0 headers, see How ColorSync 1.0 Profiles and Version 2.x Profiles Differ .
Use of the
CMHeader
type is not recommended for ColorSync versions starting with 2.0. Use
CM2Header
instead.
The ColorSync Manager defines the
CM2header
profile structure to support the header format specified by the ICC format specification for version 2.x profiles. For more information on profile version numbers, see
ColorSync and ICC Profile Format Version Numbers
. For a description of
CMHeader
, the ColorSync 1.0 profile header, see
CMHeader
. 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 http://www.color.org
.
Your application cannot obtain a discrete profile header value using the element tag scheme available for use with elements outside the header. Instead, to set or modify values of a profile header, your application must obtain the entire profile header using the function
CMGetProfileHeader
and replace the header using the function
CMSetProfileHeader
.
struct CM2Header {
unsigned long size; /* total size of profile */
OSType CMMType; /* CMM signature, registered with
CS2 consortium */
unsigned long profileVersion; /* version of the profile format */
OSType profileClass; /* input, display, output, devicelink,
abstract, color conversion, or
named color profile class */
OSType dataColorSpace; /* color space of data */
OSType profileConnectionSpace; /* profile connection color space */
CMDateTime dateTime; /* date & time of profile creation */
OSType CS2profileSignature; /* `acsp' constant, required by ICC */
OSType platform; /* primary profile platform, registered
with CS2 consortium */
unsigned long flags; /* gives hints for certain options */
OSType deviceManufacturer; /* registered with ICC consortium */
unsigned long deviceModel; /* registered with ICC consortium */
unsigned long deviceAttributes[2]; /* attributes such as paper type */
unsigned long renderingIntent; /* preferred rendering intent of object
tagged with this profile */
CMFixedXYZColor white; /* profile illuminant */
OSType creator; /* profile creator */
char reserved[44]; /* reserved for future use */
};
The ColorSync Manager defines the CMAppleProfileHeader structure to provide access to both version 2.x and version 1.0 profiles, as specified by the International Color Consortium. For related information, 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 http://www.color.org .
union CMAppleProfileHeader {
CMHeader cm1; /* ColorSync version 1.0 profile header */
CM2Header cm2; /* ColorSync version 2.x profile header */
};