Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CheckColorsInGamut function

The CheckColorsInGamut function determines whether a specified set of RGB triples lies in the output gamut of a specified device. The RGB triples are interpreted in the input logical color space.

Syntax


BOOL WINAPI CheckColorsInGamut(
  HDC hDC,
  LPVOID lpRGBTriples,
  LPVOID lpBuffer,
  UINT nCount
);

Parameters

hDC

Handle to the device context whose output gamut to be checked.

lpRGBTriples

Pointer to an array of RGB triples to check.

lpBuffer

Pointer to the buffer in which the results are to be placed. This buffer must be at least as large as nCount bytes.

nCount

The number of elements in the array of triples.

Return value

If this function succeeds, the return value is a nonzero value.

If this function fails, the return value is zero.

Remarks

The function places the test results in the buffer pointed to by lpBuffer. Each byte in the buffer corresponds to an RGB triple, and has an unsigned value between CM_IN_GAMUT (= 0) and CM_OUT_OF_GAMUT (= 255). The value 0 denotes that the color is in gamut, while a nonzero value denotes that it is out of gamut. For any integer n such that 0 < n < 255, a result value of n + 1 indicates that the corresponding color is at least as far out of gamut as would be indicated by a result value of n, as specified by the ICC Profile Format Specification. For more information on the ICC Profile Format Specification, see the sources listed in Further Information.

Note that for this function to succeed, WCS must be enabled for the device context handle that is passed in through the hDC parameter. WCS can be enabled for a device context handle by calling the SetICMMode function.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Wingdi.h

Library

Gdi32.lib

DLL

Gdi32.dll

See also

Basic Color Management Concepts
Functions
SetICMMode

 

 

Community Additions

Show:
© 2014 Microsoft