From 4ca205d0dab2c1dcbeac560cd0ecb7c3da7435df Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Thu, 2 Jul 2009 17:39:40 -0500 Subject: [PATCH] windowscodecs: implement GetColorCount and GetType for palettes --- dlls/windowscodecs/palette.c | 22 ++++++++++++++++++---- 1 files changed, 18 insertions(+), 4 deletions(-) diff --git a/dlls/windowscodecs/palette.c b/dlls/windowscodecs/palette.c index 768f92f..3cb9c13 100644 --- a/dlls/windowscodecs/palette.c +++ b/dlls/windowscodecs/palette.c @@ -142,14 +142,28 @@ static HRESULT WINAPI PaletteImpl_InitializeFromPalette(IWICPalette *iface, static HRESULT WINAPI PaletteImpl_GetType(IWICPalette *iface, WICBitmapPaletteType *pePaletteType) { - FIXME("(%p,%p): stub\n", iface, pePaletteType); - return E_NOTIMPL; + PaletteImpl *This = (PaletteImpl*)iface; + + TRACE("(%p,%p)\n", iface, pePaletteType); + + if (!pePaletteType) return E_INVALIDARG; + + *pePaletteType = This->type; + + return S_OK; } static HRESULT WINAPI PaletteImpl_GetColorCount(IWICPalette *iface, UINT *pcCount) { - FIXME("(%p,%p): stub\n", iface, pcCount); - return E_NOTIMPL; + PaletteImpl *This = (PaletteImpl*)iface; + + TRACE("(%p,%p)\n", iface, pcCount); + + if (!pcCount) return E_INVALIDARG; + + *pcCount = This->count; + + return S_OK; } static HRESULT WINAPI PaletteImpl_GetColors(IWICPalette *iface, UINT colorCount, -- 1.5.4.3