Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Advanced Color Imaging Reference /
Chapter 3 - ColorSync Manager Reference for Applications and Device Drivers / ColorSync Manager Functions
Accessing Profile Elements /


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 the CMSetPartialProfileElement 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 call CMSetPartialProfileElement 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 the CMSetProfileElement function (page 3-96).


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 NOV 1996