IWICPalette::InitializeCustom method (wincodec.h)

Initializes a palette to the custom color entries provided.

Syntax

HRESULT InitializeCustom(
  [in] WICColor *pColors,
  [in] UINT     cCount
);

Parameters

[in] pColors

Type: WICColor*

Pointer to the color array.

[in] cCount

Type: UINT

The number of colors in pColors.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

If a transparent color is required, provide it as part of the custom entries. To add a transparent value to the palette, its alpha value must be 0 (0x00RRGGBB).

The entry count is limited to 256.

Requirements

Requirement Value
Minimum supported client Windows XP with SP2, Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 [desktop apps | UWP apps]
Target Platform Windows
Header wincodec.h
Library Windowscodecs.lib
DLL Windowscodecs.dll