IWICBitmapFrameEncode::SetPalette method
Sets the IWICPalette for indexed pixel formats.
Syntax
HRESULT SetPalette(
[in] IWICPalette *pIPalette
);
Parameters
- pIPalette [in]
-
Type: IWICPalette*
The IWICPalette to use for indexed pixel formats.
The encoder may change the palette to reflect the pixel formats the encoder supports.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
This method doesn't fail if called on a frame whose pixel format is set to a non-indexed pixel format. If the target pixel format is a non-indexed format, the palette will be ignored.
If you already called IWICBitmapEncoder::SetPalette to set a global palette, this method overrides that palette for the current frame.
The palette must be specified before your first call to WritePixels/WriteSource. Doing so will cause WriteSource to use the specified palette when converting the source image to the encoder pixel format. If no palette is specified, a palette will be generated on the first call to WriteSource.
Requirements
|
Minimum supported client |
Windows XP with SP2, Windows Vista [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server |
Windows Server 2008 [desktop apps | Windows Store apps] |
|
Header |
|
|
IDL |
|
|
Library |
|
|
DLL |
|