---
title: CMGetPartialProfileElement
framework: Application Services
role: pseudoSymbol
platforms: []
path: applicationservices/colorsync_manager/1804984-cmgetpartialprofileelement
---

# CMGetPartialProfileElement

Obtains a portion of the element data from the specified profile based on the specified element tag signature.

## Declaration

```occ
CMError CMGetPartialProfileElement (
   CMProfileRef prof,
   OSType tag,
   UInt32 offset,
   UInt32 *byteCount,
   void *elementData
);
```

## Parameters

- `prof`: A profile reference of type [doc://com.apple.documentation/documentation/applicationservices/cmprofileref](applicationservices/cmprofileref.md) 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 return, the number of bytes actually copied.
- `elementData`: A pointer to memory for element data. On input, you pass a pointer to allocated memory. On return, this buffer holds the element data.

## Return Value

A `CMError` value. See [Result Codes](../colorsync_manager.md).

## Overview

The `CMGetPartialProfileElement` function allows you to copy any portion of the element data beginning from any offset into the data. For the `CMGetPartialProfileElement` 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 the `CM2Header` profile header. Instead, you must call the function [CMGetProfileHeader](1804879-cmgetprofileheader.md) to get the entire profile header and read its contents. 

## See Also

### Accessing Profile Elements

- [CMCountProfileElements](1804963-cmcountprofileelements.md)
- [CMProfileElementExists](1804967-cmprofileelementexists.md)
- [CMGetProfileElement](1804973-cmgetprofileelement.md)
- [CMSetProfileElement](1804977-cmsetprofileelement.md)
- [CMSetProfileElementSize](1804980-cmsetprofileelementsize.md)
- [CMSetPartialProfileElement](1804989-cmsetpartialprofileelement.md)
- [CMGetIndProfileElementInfo](1804996-cmgetindprofileelementinfo.md)
- [CMGetIndProfileElement](1805002-cmgetindprofileelement.md)
- [CMSetProfileElementReference](1805005-cmsetprofileelementreference.md)
- [CMRemoveProfileElement](1805008-cmremoveprofileelement.md)
