Important: The information in this document is obsolete and should not be used for new development.
CMGetPartialProfileElement
Obtains a portion of the element data from the specified profile based on the specified element tag signature.
pascal CMError CMGetPartialProfileElement ( CMProfileRef prof, OSType tag, unsigned long offset, unsigned long *byteCount, void *elementData);
prof
- A profile reference (page 3-63) to the profile containing the target element.
tag
- The tag signature for the element in question. 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
- Beginning from the first byte of the element data, the offset from which to begin copying the element data.
byteCount
- A pointer to a data byte count. On input, the number of bytes of element data to copy, beginning from the offset specified by the
offset
parameter. On output, the number of bytes actually copied.elementData
- A pointer to memory for element data. On input, you allocate memory. On output, this buffer holds 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
TheCMGetPartialProfileElement
function allows you to copy any portion of the element data beginning from any offset into the data. For theCMGetPartialProfileElement
function to copy the element data and return it to you, your application must allocate a buffer in memory to hold the data.You cannot use this function to obtain a portion of a profile element in the profile's
CM2Header
header. Instead, you must call theCMGetProfileHeader
function (page 3-88) to copy the profile header and read its contents.