IWICPalette::GetColors method (wincodec.h)

Fills out the supplied color array with the colors from the internal color table. The color array should be sized according to the return results from GetColorCount.


HRESULT GetColors(
  [in]  UINT     cCount,
  [out] WICColor *pColors,
  [out] UINT     *pcActualColors


[in] cCount

Type: UINT

The size of the pColors array.

[out] pColors

Type: WICColor*

Pointer that receives the colors of the palette.

[out] pcActualColors

Type: UINT*

The actual size needed to obtain the palette colors.

Return value


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


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