IWICBitmapEncoder::SetPalette method (wincodec.h)
Sets the global palette for the image.
C++
HRESULT SetPalette(
[in] IWICPalette *pIPalette
);
[in] pIPalette
Type: IWICPalette*
The IWICPalette to use as the global palette.
Type: HRESULT
Returns S_OK if successful, or an error value otherwise.
Returns WINCODEC_ERR_UNSUPPORTEDOPERATION if the feature is not supported by the encoder.
Only GIF images support an optional global palette, and you must set the global palette before adding any frames to the image. You only need to set the palette for indexed pixel formats.
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 |