Commit e6c88226 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

windowscodecs: Implement GetThumbnail in the ICO frame decoder.

parent 166a7e99
...@@ -200,8 +200,8 @@ static HRESULT WINAPI IcoFrameDecode_GetColorContexts(IWICBitmapFrameDecode *ifa ...@@ -200,8 +200,8 @@ static HRESULT WINAPI IcoFrameDecode_GetColorContexts(IWICBitmapFrameDecode *ifa
static HRESULT WINAPI IcoFrameDecode_GetThumbnail(IWICBitmapFrameDecode *iface, static HRESULT WINAPI IcoFrameDecode_GetThumbnail(IWICBitmapFrameDecode *iface,
IWICBitmapSource **ppIThumbnail) IWICBitmapSource **ppIThumbnail)
{ {
FIXME("(%p,%p)\n", iface, ppIThumbnail); TRACE("(%p,%p)\n", iface, ppIThumbnail);
return E_NOTIMPL; return IWICBitmapFrameDecode_QueryInterface(iface, &IID_IWICBitmapSource, (void **)ppIThumbnail);
} }
static const IWICBitmapFrameDecodeVtbl IcoFrameDecode_Vtbl = { static const IWICBitmapFrameDecodeVtbl IcoFrameDecode_Vtbl = {
......
...@@ -133,17 +133,24 @@ static void test_bad_icondirentry_size(void) ...@@ -133,17 +133,24 @@ static void test_bad_icondirentry_size(void)
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
{ {
UINT width = 0, height = 0; UINT width, height;
IWICBitmapSource *thumbnail = NULL; IWICBitmapSource *thumbnail;
width = height = 0;
hr = IWICBitmapFrameDecode_GetSize(framedecode, &width, &height); hr = IWICBitmapFrameDecode_GetSize(framedecode, &width, &height);
ok(hr == S_OK, "GetFrameSize failed, hr=%x\n", hr); ok(hr == S_OK, "GetFrameSize failed, hr=%x\n", hr);
ok(width == 16 && height == 16, "framesize=%ux%u\n", width, height); ok(width == 16 && height == 16, "framesize=%ux%u\n", width, height);
hr = IWICBitmapFrameDecode_GetThumbnail(framedecode, &thumbnail); hr = IWICBitmapFrameDecode_GetThumbnail(framedecode, &thumbnail);
todo_wine ok(hr == S_OK, "GetThumbnail failed, hr=%x\n", hr); ok(hr == S_OK, "GetThumbnail failed, hr=%x\n", hr);
if (hr == S_OK)
if (thumbnail) IWICBitmapSource_Release(thumbnail); {
width = height = 0;
hr = IWICBitmapSource_GetSize(thumbnail, &width, &height);
ok(hr == S_OK, "GetFrameSize failed, hr=%x\n", hr);
ok(width == 16 && height == 16, "framesize=%ux%u\n", width, height);
IWICBitmapSource_Release(thumbnail);
}
IWICBitmapFrameDecode_Release(framedecode); IWICBitmapFrameDecode_Release(framedecode);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment