Share via


TranslateColors

The TranslateColors function translates an array of colors from the source color space to the destination color space as defined by a color transform.

BOOL WINAPI TranslateColors(
  HTRANSFORM hColorTransform,  PCOLOR paInputColors,  DWORD nColors,   COLORTYPE ctInput,  PCOLOR paOutputColors,  COLORTYPE ctOutput);

Parameters

  • hColorTransform
    Identifies the color transform to use.
  • paInputColors
    Pointer to an array of nColors COLOR structures to translate.
  • nColors
    Contains the number of elements in the arrays pointed to by paInputColors and paOutputColors.
  • ctInput
    Specifies the input color type.
  • paOutputColors
    Pointer to an array of nColors COLOR structures that receive the translated colors.
  • ctOutput
    Specifies the output color type.

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

If the input and the output color types are not compatible with the color transform, this function fails.

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