Share via


CMCheckColorsInGamut

The CMCheckColorsInGamut function determines whether specified RGB triples lie in the output gamut of a specified transform.

BOOL WINAPI CMCheckColorsInGamut(
  HCMTRANSFORM hcmTransform,  // transform handle
  RGBTRIPLE *lpaRGBTriple,    // RGB triple array
  LPBYTE lpaResult,           // buffer for results
  UINT nCount                 // result buffer size
);

Parameters

  • hcmTransform
    Specifies the transform to use.

  • lpaRGBTriple
    Points to an array of RGB triples to check.

  • lpaResult
    Points to the buffer in which to put results.

    The results are represented by an array of bytes. Each byte in the array corresponds to an RGB triple and has an unsigned value between 0 and 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.

  • nCount
    Specifies the number of elements in the array.

Return Values

If this function succeeds, the return value is TRUE.

If this function fails, the return value is FALSE. If the function is not successful, the CMM should call SetLastError to set the last error to a valid error value defined in Winerror.h.

Remarks

Every CMM is required to export this function.

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 Wingdi.h.
**  Library:** Use Gdi32.lib.

See Also

Basic Color Management Concepts, Functions