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 /


CMSetProfileElementSize

Reserves the element data size for a specific tag in the specified profile before setting the element data.

pascal CMError CMSetProfileElementSize (
CMProfileRef prof, 
OSType tag, 
unsigned long elementSize);
prof
A profile reference (page 3-63) to the profile in which the element data size is reserved.
tag
The tag signature for the element whose size is reserved. The tag identifies the element. 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. The signatures for profile tags are defined in the CMICCProfile.h header file.
elementSize
The total size in bytes to reserve for the element data.
function result
A result code of type CMError. See "Result Codes" (page 3-174) for a list of ColorSync-specific result codes.
DISCUSSION
Your application can use the CMSetProfileElementSize function to reserve the size of element data for a specific tag before you call the CMSetPartialProfileElement function, described next, to set the element data. The most efficient way to set a large amount of element data when you know the size of the data is to first set the size, then call the CMSetPartialProfileElement function to set each of the data segments. Calling the CMSetProfileElementSize function first eliminates the need for the ColorSync Manager to repeatedly increase the size for the data each time you call the CMSetPartialProfileElement function.

In addition to reserving the element data size, the CMSetProfileElementSize function sets the element tag, if it does not already exist.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996