Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Advanced Color Imaging Reference /
Chapter 3 - ColorSync Manager Reference for Applications and Device Drivers / ColorSync Manager Functions
Accessing Profile Elements /


CMSetProfileElement

Sets or replaces the element data for a specific tag in the specified profile.

pascal CMError CMSetProfileElement (
CMProfileRef prof, OSType tag, 
unsigned long elementSize, 
void *elementData);
prof
A profile reference (page 3-63) to the profile containing the tag for which the element data is set.
tag
The tag signature for the element whose data is set. For a complete list of the tag signatures a profile may contain, including a description of each tag, refer to the International Color Consortium Profile Format Specification. See "Profiles" in Advanced Color Imaging on the Mac OS for information on how to obtain this document. The signatures for profile tags are defined in the CMICCProfile.h header file.
elementSize
The size in bytes of the element data set.
elementData
A pointer to the buffer containing the element data to transfer to the profile.
function result
A result code of type CMError. See "Result Codes" (page 3-174) for a list of ColorSync-specific result codes.
DISCUSSION
The CMSetProfileElement function replaces existing element data if an element with the specified tag is already present in the profile. Otherwise, it sets the element data for a new tag. Your application is responsible for allocating memory for the buffer to hold the data to transfer.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996