diff --git a/dlls/windowscodecs/bitmap.c b/dlls/windowscodecs/bitmap.c index 0a7ecf5920d..22a48768892 100644 --- a/dlls/windowscodecs/bitmap.c +++ b/dlls/windowscodecs/bitmap.c @@ -266,9 +266,16 @@ static ULONG WINAPI BitmapImpl_Release(IWICBitmap *iface) static HRESULT WINAPI BitmapImpl_GetSize(IWICBitmap *iface, UINT *puiWidth, UINT *puiHeight) { - FIXME("(%p,%p,%p)\n", iface, puiWidth, puiHeight); + BitmapImpl *This = impl_from_IWICBitmap(iface); + TRACE("(%p,%p,%p)\n", iface, puiWidth, puiHeight); - return E_NOTIMPL; + if (!puiWidth || !puiHeight) + return E_INVALIDARG; + + *puiWidth = This->width; + *puiHeight = This->height; + + return S_OK; } static HRESULT WINAPI BitmapImpl_GetPixelFormat(IWICBitmap *iface, diff --git a/dlls/windowscodecs/tests/bitmap.c b/dlls/windowscodecs/tests/bitmap.c index fc45375e724..a0926abb984 100644 --- a/dlls/windowscodecs/tests/bitmap.c +++ b/dlls/windowscodecs/tests/bitmap.c @@ -256,12 +256,12 @@ todo_wine { ok(hr == S_OK, "IWICBitmap_GetResolution failed hr=%x\n", hr); ok(dpix == 12.0, "got %f, expected 12.0\n", dpix); ok(dpiy == 34.0, "got %f, expected 34.0\n", dpiy); +} hr = IWICBitmap_GetSize(bitmap, &width, &height); ok(hr == S_OK, "IWICBitmap_GetSize failed hr=%x\n", hr); ok(width == 3, "got %d, expected 3\n", width); ok(height == 3, "got %d, expected 3\n", height); -} IWICBitmap_Release(bitmap); }