[4/5] windowscodecs: Implement IWICBitmapScaler::CopyPalette.
Vincent Povirk
madewokherd at gmail.com
Thu Jun 28 11:06:01 CDT 2012
-------------- next part --------------
From e3adcba3ccdb1033a335bf297bb09c29137044ae Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at codeweavers.com>
Date: Tue, 28 Feb 2012 16:34:51 -0600
Subject: [PATCH 4/6] windowscodecs: Implement IWICBitmapScaler::CopyPalette.
---
dlls/windowscodecs/scaler.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/windowscodecs/scaler.c b/dlls/windowscodecs/scaler.c
index 511968c..992d12c 100644
--- a/dlls/windowscodecs/scaler.c
+++ b/dlls/windowscodecs/scaler.c
@@ -150,9 +150,16 @@ static HRESULT WINAPI BitmapScaler_GetResolution(IWICBitmapScaler *iface,
static HRESULT WINAPI BitmapScaler_CopyPalette(IWICBitmapScaler *iface,
IWICPalette *pIPalette)
{
- FIXME("(%p,%p): stub\n", iface, pIPalette);
+ BitmapScaler *This = impl_from_IWICBitmapScaler(iface);
+ TRACE("(%p,%p)\n", iface, pIPalette);
- return E_NOTIMPL;
+ if (!pIPalette)
+ return E_INVALIDARG;
+
+ if (!This->source)
+ return WINCODEC_ERR_WRONGSTATE;
+
+ return IWICBitmapSource_CopyPalette(This->source, pIPalette);
}
static HRESULT WINAPI BitmapScaler_CopyPixels(IWICBitmapScaler *iface,
--
1.7.9.5
More information about the wine-patches
mailing list