Important: The information in this document is obsolete and should not be used for new development.
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 theCMSetProfileElementSize
function to reserve the size of element data for a specific tag before you call theCMSetPartialProfileElement
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 theCMSetPartialProfileElement
function to set each of the data segments. Calling theCMSetProfileElementSize
function first eliminates the need for the ColorSync Manager to repeatedly increase the size for the data each time you call theCMSetPartialProfileElement
function.In addition to reserving the element data size, the
CMSetProfileElementSize
function sets the element tag, if it does not already exist.