Carbon


Flag Mask Definitions for Version 2.x Profiles

Header: CMICCProfile.h

Define masks your application can use to set or test various bits in the flags field of the CM2Header structure.

enum {
    cmICCReservedFlagsMask = 65535,
    cmEmbeddedMask = 1,
    cmEmbeddedUseMask = 2,
    cmCMSReservedFlagsMask = -65536,
    cmQualityMask = 196608,
    cmInterpolationMask = 262144,
    cmGamutCheckingMask = 524288
};

Constant descriptions

cmICCReservedFlagsMask

This mask provides access to bits 0 through 15 of the flags field, which are defined and reserved by the ICC. For more information, see the International Color Consortium Profile Format Specification, and the next two mask definitions.

To obtain a copy of the ICC specification, or to get other information about the ICC, visit the ICC Web site at .

cmEmbeddedMask

This mask provides access to bit 0 of the flags field, which specifies whether the profile is embedded. It has the value 1 if the profile is embedded, 0 if it is not.

cmEmbeddedUseMask

This mask provides access to bit 1 of the flags field, which specifies whether the profile can be used independently or can only be used as an embedded profile. It has the value 0 if the profile can be used anywhere, 1 if it must be embedded.

You should interpret the setting of this bit as an indication of copyright protection. If the profile developer set this bit to 1, you should use this profile as an embedded profile only and not copy the profile for your own purposes. The profile developer also specifies explicit copyright intention using the cmCopyrightTag profile tag (defined in the CMICCProfile.h header file).

cmCMSReservedFlagsMask

This mask provides access to bits 16 through 31 of the flags field, which are available for a color management system (CMS) vendor, such as ColorSync. ColorSync’s default CMM uses bits 16 through 19 to provide hints for color matching, as described in the following three mask definitions. Other CMM vendors should follow the same conventions.

cmQualityMask

This mask provides access to bits 16 and 17 of the flags field, which specify the preferred quality and speed preferences for color matching. In general, the higher the quality the slower the speed. For example, best quality is slowest, but produces the highest quality result.

Bits 16 and 17 have the value 0 for normal quality, 1 for draft quality, and 2 for best quality. “Quality Flag Values for Version 2.x Profiles” describes the constants ColorSync defines to test or set these bits.

This feature is provided by the ColorSync Manager; it is not defined by the ICC profile specification.

cmInterpolationMask

This mask provides access to bit 18 of the flags field, which specifies whether to use interpolation in color matching. The value 0 specifies interpolation. The value 1 specifies table lookup without interpolation. Specifying lookup only improves speed but can reduce accuracy. You might use lookup only for a monitor profile, for example, when high resolution is not crucial.

This feature is provided by the ColorSync Manager; it is not defined by the ICC profile specification.

cmGamutCheckingMask

This mask provides access to bit 19 of the flags field. When you use a profile to create a color world, bit 19 specifies whether the color world should include information for gamut checking. It has the value 0 if the color world should include a gamut-checking table, 1 if gamut-checking information is not required. ColorSync can create a color world without a gamut table more quickly and in less space.

Many applications do not perform gamut checking, so they should set this bit to 1. However, if you call a color checking function such as CWCheckColors, or CWMatchColors, after setting a profile’s gamut-checking bit so that the color world does not contain gamut information, these routines return the cmCantGamutCheckError error.

This feature is provided by the ColorSync Manager; it is not defined by the ICC profile specification.

The flags field of the structure CM2Header is an unsigned long value whose bits specify information about a profile. The ICC reserves the use of bits 0 to 15 and has assigned values to bits 0 and 1. Bits 16 to 31 are reserved for use by color management system (CMS) vendors. ColorSync has assigned values to bits 16 through 19.


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