[3/5] windowscodecs: Implement IWICBitmapScaler::GetResolution.

Vincent Povirk madewokherd at gmail.com
Thu Jun 28 11:05:10 CDT 2012


-------------- next part --------------
From 3cfd5992c76e9f5e1b47c8384c18aa5b1f3c5fa1 Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at codeweavers.com>
Date: Tue, 28 Feb 2012 16:32:31 -0600
Subject: [PATCH 3/6] windowscodecs: Implement
 IWICBitmapScaler::GetResolution.

---
 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 2289a9d..511968c 100644
--- a/dlls/windowscodecs/scaler.c
+++ b/dlls/windowscodecs/scaler.c
@@ -135,9 +135,16 @@ static HRESULT WINAPI BitmapScaler_GetPixelFormat(IWICBitmapScaler *iface,
 static HRESULT WINAPI BitmapScaler_GetResolution(IWICBitmapScaler *iface,
     double *pDpiX, double *pDpiY)
 {
-    FIXME("(%p,%p,%p): stub\n", iface, pDpiX, pDpiY);
+    BitmapScaler *This = impl_from_IWICBitmapScaler(iface);
+    TRACE("(%p,%p,%p)\n", iface, pDpiX, pDpiY);
 
-    return E_NOTIMPL;
+    if (!pDpiX || !pDpiY)
+        return E_INVALIDARG;
+
+    if (!This->source)
+        return WINCODEC_ERR_WRONGSTATE;
+
+    return IWICBitmapSource_GetResolution(This->source, pDpiX, pDpiY);
 }
 
 static HRESULT WINAPI BitmapScaler_CopyPalette(IWICBitmapScaler *iface,
-- 
1.7.9.5


More information about the wine-patches mailing list