IWICBitmapDecoder::CopyPalette method (wincodec.h)

Copies the decoder's IWICPalette .

Syntax

HRESULT CopyPalette(
  [in] IWICPalette *pIPalette
);

Parameters

[in] pIPalette

Type: IWICPalette*

AnIWICPalette to which the decoder's global palette is to be copied. Use CreatePalette to create the destination palette before calling CopyPalette.

Return value

Type: HRESULT

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

Remarks

CopyPalette returns a global palette (a palette that applies to all the frames in the image) if there is one; otherwise, it returns WINCODEC_ERR_PALETTEUNAVAILABLE. If an image doesn't have a global palette, it may still have a frame-level palette, which can be retrieved using IWICBitmapFrameDecode::CopyPalette.

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