Module: wine Branch: master Commit: 05ddbfbf30de20db7448769565dfff8f0c0cc4a8 URL: http://source.winehq.org/git/wine.git/?a=commit;h=05ddbfbf30de20db7448769565...
Author: Vincent Povirk vincent@codeweavers.com Date: Thu Aug 13 12:38:02 2009 -0500
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 c6663d7..300e37c 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,