From 05ddbfbf30de20db7448769565dfff8f0c0cc4a8 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 file changed, 16 insertions(+), 4 deletions(-) diff --git a/dlls/windowscodecs/converter.c b/dlls/windowscodecs/converter.c index c6663d7c72..300e37c0f7 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, -- 2.32.0.93.g670b81a890