Vincent Povirk : windowscodecs: Implement GetColorCount and GetType for palettes.

Alexandre Julliard julliard at winehq.org
Fri Jul 3 09:31:12 CDT 2009


Module: wine
Branch: master
Commit: 9a6400bc32a3b589df7113b63f96155209f733ea
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9a6400bc32a3b589df7113b63f96155209f733ea

Author: Vincent Povirk <vincent at codeweavers.com>
Date:   Thu Jul  2 17:39:40 2009 -0500

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 cacfd70..a3d67aa 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,




More information about the wine-cvs mailing list