[1/5] windowscodecs: Implement IWICBitmapScaler::GetSize.

Vincent Povirk madewokherd at gmail.com
Wed Jun 27 11:03:05 CDT 2012


-------------- next part --------------
From 8988d65904a2d52a9c31876e7fdb78978f0564bc Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at codeweavers.com>
Date: Tue, 28 Feb 2012 16:21:24 -0600
Subject: [PATCH 1/8] windowscodecs: Implement IWICBitmapScaler::GetSize.

---
 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 be21dcc..c3b32e8 100644
--- a/dlls/windowscodecs/scaler.c
+++ b/dlls/windowscodecs/scaler.c
@@ -102,9 +102,16 @@ static ULONG WINAPI BitmapScaler_Release(IWICBitmapScaler *iface)
 static HRESULT WINAPI BitmapScaler_GetSize(IWICBitmapScaler *iface,
     UINT *puiWidth, UINT *puiHeight)
 {
-    FIXME("(%p,%p,%p): stub\n", iface, puiWidth, puiHeight);
+    BitmapScaler *This = impl_from_IWICBitmapScaler(iface);
+    TRACE("(%p,%p,%p)\n", iface, puiWidth, puiHeight);
 
-    return E_NOTIMPL;
+    if (!This->source)
+        return WINCODEC_ERR_WRONGSTATE;
+
+    *puiWidth = This->width;
+    *puiHeight = This->height;
+
+    return S_OK;
 }
 
 static HRESULT WINAPI BitmapScaler_GetPixelFormat(IWICBitmapScaler *iface,
-- 
1.7.9.5


More information about the wine-patches mailing list