Carbon


CMSetPartialProfileElement

Header: CMApplication.h Carbon status: Supported

Sets part of the element data for a specific tag in the specified profile.

CMError CMSetPartialProfileElement (
    CMProfileRef prof, 
    OSType tag, 
    UInt32 offset, 
    UInt32 byteCount, 
    void *elementData
);
Parameter descriptions
prof

A profile reference of type CMProfileRef 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.

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 the function CMSetProfileElementSize 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.

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 function CMSetProfileElement.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when ColorSync 2.0 or later is present.


© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)