windowscodecs: Implement GetColorCount and GetType for palettes.

This commit is contained in:
Vincent Povirk 2009-07-02 17:39:40 -05:00 committed by Alexandre Julliard
parent 9f9b71c3ee
commit 9a6400bc32
1 changed files with 18 additions and 4 deletions

View File

@ -142,14 +142,28 @@ static HRESULT WINAPI PaletteImpl_InitializeFromPalette(IWICPalette *iface,
static HRESULT WINAPI PaletteImpl_GetType(IWICPalette *iface, static HRESULT WINAPI PaletteImpl_GetType(IWICPalette *iface,
WICBitmapPaletteType *pePaletteType) WICBitmapPaletteType *pePaletteType)
{ {
FIXME("(%p,%p): stub\n", iface, pePaletteType); PaletteImpl *This = (PaletteImpl*)iface;
return E_NOTIMPL;
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) static HRESULT WINAPI PaletteImpl_GetColorCount(IWICPalette *iface, UINT *pcCount)
{ {
FIXME("(%p,%p): stub\n", iface, pcCount); PaletteImpl *This = (PaletteImpl*)iface;
return E_NOTIMPL;
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, static HRESULT WINAPI PaletteImpl_GetColors(IWICPalette *iface, UINT colorCount,