From c772a2096c9a52e63da9059a2b6028c3ff8c5357 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Thu, 13 Aug 2009 12:38:02 -0500 Subject: [PATCH] windowscodecs: implement GetSize/Resolution for default format converter --- dlls/windowscodecs/converter.c | 20 ++++++++++++++++---- 1 files changed, 16 insertions(+), 4 deletions(-) diff --git a/dlls/windowscodecs/converter.c b/dlls/windowscodecs/converter.c index 7b0aead..8e3c0fc 100644 --- a/dlls/windowscodecs/converter.c +++ b/dlls/windowscodecs/converter.c @@ -157,8 +157,14 @@ static ULONG WINAPI FormatConverter_Release(IWICFormatConverter *iface) static HRESULT WINAPI FormatConverter_GetSize(IWICFormatConverter *iface, UINT *puiWidth, UINT *puiHeight) { - FIXME("(%p,%p,%p): stub\n", iface, puiWidth, puiHeight); - return E_NOTIMPL; + FormatConverter *This = (FormatConverter*)iface; + + TRACE("(%p,%p,%p)\n", iface, puiWidth, puiHeight); + + if (This->source) + return IWICBitmapSource_GetSize(This->source, puiWidth, puiHeight); + else + return WINCODEC_ERR_NOTINITIALIZED; } static HRESULT WINAPI FormatConverter_GetPixelFormat(IWICFormatConverter *iface, @@ -171,8 +177,14 @@ static HRESULT WINAPI FormatConverter_GetPixelFormat(IWICFormatConverter *iface, static HRESULT WINAPI FormatConverter_GetResolution(IWICFormatConverter *iface, double *pDpiX, double *pDpiY) { - FIXME("(%p,%p,%p): stub\n", iface, pDpiX, pDpiY); - return E_NOTIMPL; + FormatConverter *This = (FormatConverter*)iface; + + TRACE("(%p,%p,%p): stub\n", iface, pDpiX, pDpiY); + + if (This->source) + return IWICBitmapSource_GetResolution(This->source, pDpiX, pDpiY); + else + return WINCODEC_ERR_NOTINITIALIZED; } static HRESULT WINAPI FormatConverter_CopyPalette(IWICFormatConverter *iface, -- 1.5.4.3