windowscodecs: Implement IWICBitmap::GetSize.
This commit is contained in:
parent
f26402cad7
commit
a62bd245a4
|
@ -266,9 +266,16 @@ static ULONG WINAPI BitmapImpl_Release(IWICBitmap *iface)
|
||||||
static HRESULT WINAPI BitmapImpl_GetSize(IWICBitmap *iface,
|
static HRESULT WINAPI BitmapImpl_GetSize(IWICBitmap *iface,
|
||||||
UINT *puiWidth, UINT *puiHeight)
|
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,
|
static HRESULT WINAPI BitmapImpl_GetPixelFormat(IWICBitmap *iface,
|
||||||
|
|
|
@ -256,12 +256,12 @@ todo_wine {
|
||||||
ok(hr == S_OK, "IWICBitmap_GetResolution failed hr=%x\n", hr);
|
ok(hr == S_OK, "IWICBitmap_GetResolution failed hr=%x\n", hr);
|
||||||
ok(dpix == 12.0, "got %f, expected 12.0\n", dpix);
|
ok(dpix == 12.0, "got %f, expected 12.0\n", dpix);
|
||||||
ok(dpiy == 34.0, "got %f, expected 34.0\n", dpiy);
|
ok(dpiy == 34.0, "got %f, expected 34.0\n", dpiy);
|
||||||
|
}
|
||||||
|
|
||||||
hr = IWICBitmap_GetSize(bitmap, &width, &height);
|
hr = IWICBitmap_GetSize(bitmap, &width, &height);
|
||||||
ok(hr == S_OK, "IWICBitmap_GetSize failed hr=%x\n", hr);
|
ok(hr == S_OK, "IWICBitmap_GetSize failed hr=%x\n", hr);
|
||||||
ok(width == 3, "got %d, expected 3\n", width);
|
ok(width == 3, "got %d, expected 3\n", width);
|
||||||
ok(height == 3, "got %d, expected 3\n", height);
|
ok(height == 3, "got %d, expected 3\n", height);
|
||||||
}
|
|
||||||
|
|
||||||
IWICBitmap_Release(bitmap);
|
IWICBitmap_Release(bitmap);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue