[]
IWICPalette
[Guid("00000040-a8f2-4877-ba0a-fd2b6645fb94")]
public class Palette : ComObject, IDisposable, IUnknown
Initializes a new instance of the Palette class.
public Palette(IntPtr nativePtr)
nativePtr
System.IntPtrThe native pointer.
Gets the colors.
public int[] Colors { get; }
Initializes a new instance of the Palette class.
public static Palette Create(ImagingFactory factory)
factory
ImagingFactoryThe factory.
HRESULT IWICPalette::GetColorCount([Out] unsigned int* pcCount)
public int GetColorCount()
HRESULT IWICPalette::GetColors([In] unsigned int cCount,[Out, Buffer] void* pColors,[Out] unsigned int* pcActualColors)
public int GetColors(int count, IntPtr colorsRef)
count
intcolorsRef
System.IntPtrHRESULT IWICPalette::GetType([Out] WICBitmapPaletteType* pePaletteType)
public BitmapPaletteType GetTypeInfo()
HRESULT IWICPalette::HasAlpha([Out] BOOL* pfHasAlpha)
public bool HasAlpha()
Initializes with the specified colors.
public void Initialize(ColorF[] colors)
colors
ColorF[]The colors.
HRESULT IWICPalette::InitializePredefined([In] WICBitmapPaletteType ePaletteType,[In] BOOL fAddTransparentColor)
public void Initialize(BitmapPaletteType ePaletteType, Bool fAddTransparentColor)
ePaletteType
BitmapPaletteTypefAddTransparentColor
BoolHRESULT IWICPalette::InitializeFromBitmap([In] IWICBitmapSource* pISurface,[In] unsigned int cCount,[In] BOOL fAddTransparentColor)
public void Initialize(BitmapSource surfaceRef, int count, Bool fAddTransparentColor)
surfaceRef
BitmapSourcecount
intfAddTransparentColor
BoolHRESULT IWICPalette::InitializeFromPalette([In, Optional] IWICPalette* pIPalette)
public void Initialize(Palette paletteRef)
paletteRef
PaletteInitializes with the specified colors.
public void Initialize(int[] colors)
colors
int[]The colors.
HRESULT IWICPalette::InitializeCustom([In, Buffer] void* pColors,[In] unsigned int cCount)
public void Initialize(IntPtr colorsRef, int count)
colorsRef
System.IntPtrcount
intHRESULT IWICPalette::IsBlackWhite([Out] BOOL* pfIsBlackWhite)
public bool IsBlackWhite()
HRESULT IWICPalette::IsGrayscale([Out] BOOL* pfIsGrayscale)
public bool IsGrayscale()
Performs an explicit conversion from System.IntPtr to Palette.
public static explicit operator Palette(IntPtr nativePointer)
nativePointer
System.IntPtr