CMSetProfileElementSizeReserves 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);
- A profile reference (page 3-63) to the profile in which the element data size is reserved.
- 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
- 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.
DISCUSSIONYour application can use the
CMSetProfileElementSizefunction to reserve the size of element data for a specific tag before you call the
CMSetPartialProfileElementfunction, 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
CMSetPartialProfileElementfunction to set each of the data segments. Calling the
CMSetProfileElementSizefunction first eliminates the need for the ColorSync Manager to repeatedly increase the size for the data each time you call the
In addition to reserving the element data size, the
CMSetProfileElementSizefunction sets the element tag, if it does not already exist.