Important: The information in this document is obsolete and should not be used for new development.
CMSetPartialProfileElement
Sets part of the element data for a specific tag in the specified profile.
pascal CMError CMSetPartialProfileElement ( CMProfileRef prof, OSType tag, unsigned long offset, unsigned long byteCount, 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. 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.offset
- The offset in the existing element data where data transfer should begin.
byteCount
- The number of bytes of element data to transfer.
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
You can use theCMSetPartialProfileElement
function to set the data for an element when the amount of data is large and you need to copy it to the profile in segments.After you set the element size, you can call this
function repeatedly, as many times as necessary, each time appending a segment of data to the end of the data already copied until all the element data is copied.
If you know the size of the element data, you should call
CMSetProfileElementSize
(page 3-93) to reserve it before you callCMSetPartialProfileElement
to set element data in segments. Setting the size first avoids the extensive overhead required to increase the size for the element data with each call to append another segment of data.SEE ALSO
To copy the entire data for an element as a single operation, when the amount of data is small enough to allow this, call theCMSetProfileElement
function (page 3-96).