UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:wincodec.IWICPalette.InitializeFromBitmap |
IWICPalette::InitializeFromBitmap (wincodec.h) |
Initializes a palette using a computed optimized values based on the reference bitmap. |
|
wic\_wic_codec_iwicpalette_initializefrombitmap.htm |
wic |
f17d0f16-729e-466c-902f-61398daf2921 |
12/05/2018 |
IWICPalette interface [Windows Imaging Component],InitializeFromBitmap method, IWICPalette.InitializeFromBitmap, IWICPalette::InitializeFromBitmap, InitializeFromBitmap, InitializeFromBitmap method [Windows Imaging Component], InitializeFromBitmap method [Windows Imaging Component],IWICPalette interface, _wic_codec_iwicpalette_initializefrombitmap, wic._wic_codec_iwicpalette_initializefrombitmap, wincodec/IWICPalette::InitializeFromBitmap |
wincodec.h |
Windows |
Windows XP with SP2, Windows Vista [desktop apps \| UWP apps] |
Windows Server 2008 [desktop apps \| UWP apps] |
Wincodec.idl |
Windowscodecs.lib |
Windowscodecs.dll |
Windows |
19H1 |
|
|
|
|
|
|
Initializes a palette using a computed optimized values based on the reference bitmap.
Type: IWICBitmapSource*
Pointer to the source bitmap.
Type: UINT
The number of colors to initialize the palette with.
Type: BOOL
A value to indicate whether to add a transparent color.
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
The resulting palette contains the specified number of colors which best represent the colors present in the bitmap. The algorithm operates on the opaque RGB color value of each pixel in the reference bitmap and hence ignores any alpha values. If a transparent color is required, set the fAddTransparentColor parameter to TRUE and one fewer optimized color will be computed, reducing the colorCount, and a fully transparent color entry will be added.