Export (0) Print
Expand All
Expand Minimize

SetColorProfileElement Function

The SetColorProfileElement function sets the element data for a tagged profile element in an ICC color profile.

Syntax

BOOL WINAPI SetColorProfileElement(
    HPROFILE hProfile,
    TAGTYPE tag,
    DWORD dwOffset,
    PDWORD pcbSize,
    PVOID pBuffer
);

Parameters

hProfile

Specifies a handle to the ICC profile in question.

tag

Identifies the tagged element.

dwOffset

Specifies the offset from the first byte of the tagged element data at which to start writing.

pcbSize

Pointer to a variable containing the number of bytes of data to write. On return, it contains the number of bytes actually written.

pBuffer

Pointer to a buffer containing the data to write to the tagged element in the color profile.

Return Value

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.

If the color profile is not opened for read/write permission, this function fails.

If dwOffset exceeds the size set for the specified tagged element, this function fails.

If dwOffset + *pcbSize is greater than the size of the specified element, this function only writes as many bytes as will fit within the current size of the element.

Any existing data in the specified portion of the tagged element is overwritten when this function succeeds.

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

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Icm.h

Library

Mscms.lib

DLL

Mscms.dll

See Also

Basic Color Management Concepts
Functions

 

 

Send comments about this topic to Microsoft

Build date: 11/16/2010

Community Additions

ADD
Show:
© 2014 Microsoft