TranslateColors function (icm.h)

Translates an array of colors from the source color space to the destination color space as defined by a color transform.

Syntax

BOOL 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 nColorsCOLOR 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 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

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

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Header icm.h
Library Mscms.lib
DLL Mscms.dll

See also