CMSetPartialProfileElementSets 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);
- A profile reference (page 3-63) to the profile containing the tag for which the element data is set.
- 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
- The offset in the existing element data where data transfer should begin.
- The number of bytes of element data to transfer.
- 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.
DISCUSSIONYou can use the
CMSetPartialProfileElementfunction 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 call
CMSetPartialProfileElementto 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 ALSOTo copy the entire data for an element as a single operation, when the amount of data is small enough to allow this, call the
CMSetProfileElementfunction (page 3-96).