SetColorProfileElementSize

SetColorProfileElementSize sets the size of a tagged element in an ICC color profile.

BOOL WINAPI SetColorProfileElementSize(
  HPROFILE hProfile,  TAGTYPE tag,  DWORD cbSize);

Parameters

  • hProfile
    Specifies a handle to the ICC color profile in question.
  • tag
    Identifies the tagged element.
  • cbSize
    Specifies the size to set the tagged element to. If cbSize is zero, this function deletes the specified tagged element. If the tag is a reference, only the tag table entry is deleted, not the data.

Return Values

If this function succeeds, the return value is TRUE.

If this function fails, the return value is FALSE. For extended error information, call GetLastError.

Remarks

This function will fail if hProfile is not a valid ICC profile.

To create a new tagged element in a color profile, use SetColorProfileElementSize to set the size, then use SetColorProfileElement to set the element value.

If the specified tag already exists in the profile, SetColorProfileElementSize changes the size of the element by truncating it or adding zeroes at the end as the case may be.

If the specified tag already exists and is a reference to another tag, SetColorProfileElementSize creates a new data area for the tag that is not shared.

This function does not support Windows Color System (WCS) profiles CAMP, DMP, and GMMP; because profile elements are implicitly associated with and hard coded to ICC tag types and there exist many robust XML parsing libraries.

Requirements

**  Windows NT/2000/XP/Vista:** Included in Windows 2000 and later.
**  Windows 95/98/Me:** Included in Windows 98 and later.
**  Header:** Declared in Icm.h.
**  Library:** Use Mscms.lib.

See Also

Basic Color Management Concepts, Functions, SetColorProfileElement