From 20043ca97f9f816b234ec904429c12a595f965d2 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Wed, 1 Jul 2009 16:59:51 -0500 Subject: [PATCH] include: add definitions for IWICPalette --- include/wincodec.idl | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 63 insertions(+), 0 deletions(-) diff --git a/include/wincodec.idl b/include/wincodec.idl index e72bb36..e5f22e3 100644 --- a/include/wincodec.idl +++ b/include/wincodec.idl @@ -51,6 +51,24 @@ typedef enum WICBitmapDecoderCapabilities { WICBitmapDecoderCapabilityCanDecodeThumbnail = 0x00000010, } WICBitmapDecoderCapabilities; +typedef enum WICBitmapPaletteType { + WICBitmapPaletteTypeCustom = 0x00000000, + WICBitmapPaletteTypeMedianCut = 0x00000001, + WICBitmapPaletteTypeFixedBW = 0x00000002, + WICBitmapPaletteTypeFixedHalftone8 = 0x00000003, + WICBitmapPaletteTypeFixedHalftone27 = 0x00000004, + WICBitmapPaletteTypeFixedHalftone64 = 0x00000005, + WICBitmapPaletteTypeFixedHalftone125 = 0x00000006, + WICBitmapPaletteTypeFixedHalftone216 = 0x00000007, + WICBitmapPaletteTypeFixedWebPalette = WICBitmapPaletteTypeFixedHalftone216, + WICBitmapPaletteTypeFixedHalftone252 = 0x00000008, + WICBitmapPaletteTypeFixedHalftone256 = 0x00000009, + WICBitmapPaletteTypeFixedGray4 = 0x0000000A, + WICBitmapPaletteTypeFixedGray16 = 0x0000000B, + WICBitmapPaletteTypeFixedGray256 = 0x0000000C, + WICBITMAPPALETTETYPE_FORCE_DWORD = CODEC_FORCE_DWORD +} WICBitmapPaletteType; + typedef GUID WICPixelFormatGUID; typedef REFGUID REFWICPixelFormatGUID; @@ -73,6 +91,8 @@ typedef struct WICRect { INT Height; } WICRect; +typedef UINT32 WICColor; + cpp_quote("#define WINCODEC_ERR_WRONGSTATE 0x88982f04") cpp_quote("#define WINCODEC_ERR_CODECNOTHUMBNAIL 0x88982f44") @@ -121,6 +141,49 @@ interface IWICBitmapSource : IUnknown [ object, + uuid(00000040-a8f2-4877-ba0a-fd2b6645fb94) +] +interface IWICPalette : IUnknown +{ + HRESULT InitializePredefined( + [in] WICBitmapPaletteType ePaletteType, + [in] BOOL fAddTransparentColor); + + HRESULT InitializeCustom( + [in, size_is(colorCount)] WICColor *pColors, + [in] UINT colorCount); + + HRESULT InitializeFromBitmap( + [in] IWICBitmapSource *pISurface, + [in] UINT colorCount, + [in] BOOL fAddTransparentColor); + + HRESULT InitializeFromPalette( + [in] IWICPalette *pIPalette); + + HRESULT GetType( + [out] WICBitmapPaletteType *pePaletteType); + + HRESULT GetColorCount( + [out] UINT *pcCount); + + HRESULT GetColors( + [in] UINT colorCount, + [out, size_is(colorCount)] WICColor *pColors, + [out] UINT *pcActualColors); + + HRESULT IsBlackWhite( + [out] BOOL *pfIsBlackWhite); + + HRESULT IsGrayscale( + [out] BOOL *pfIsGrayscale); + + HRESULT HasAlpha( + [out] BOOL *pfHasAlpha); +} + +[ + object, uuid(3b16811b-6a43-4ec9-a813-3d930c13b940) ] interface IWICBitmapFrameDecode : IWICBitmapSource -- 1.5.4.3