Hans Leidekker : windowscodecs: GetThumbnail should be supported for ICO frames.

Alexandre Julliard julliard at winehq.org
Thu Nov 15 15:26:31 CST 2012


Module: wine
Branch: master
Commit: 6395af1ae7b0cc5f2f1f82796502e2a605bc5a6b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=6395af1ae7b0cc5f2f1f82796502e2a605bc5a6b

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Thu Nov 15 14:10:31 2012 +0100

windowscodecs: GetThumbnail should be supported for ICO frames.

---

 dlls/windowscodecs/icoformat.c       |    4 ++--
 dlls/windowscodecs/tests/icoformat.c |    7 +++++++
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/dlls/windowscodecs/icoformat.c b/dlls/windowscodecs/icoformat.c
index 6cccc3e..4e83ec0 100644
--- a/dlls/windowscodecs/icoformat.c
+++ b/dlls/windowscodecs/icoformat.c
@@ -200,8 +200,8 @@ static HRESULT WINAPI IcoFrameDecode_GetColorContexts(IWICBitmapFrameDecode *ifa
 static HRESULT WINAPI IcoFrameDecode_GetThumbnail(IWICBitmapFrameDecode *iface,
     IWICBitmapSource **ppIThumbnail)
 {
-    TRACE("(%p,%p)\n", iface, ppIThumbnail);
-    return WINCODEC_ERR_CODECNOTHUMBNAIL;
+    FIXME("(%p,%p)\n", iface, ppIThumbnail);
+    return E_NOTIMPL;
 }
 
 static const IWICBitmapFrameDecodeVtbl IcoFrameDecode_Vtbl = {
diff --git a/dlls/windowscodecs/tests/icoformat.c b/dlls/windowscodecs/tests/icoformat.c
index 3974dfc..e9c0a48 100644
--- a/dlls/windowscodecs/tests/icoformat.c
+++ b/dlls/windowscodecs/tests/icoformat.c
@@ -134,9 +134,16 @@ static void test_bad_icondirentry_size(void)
             if (SUCCEEDED(hr))
             {
                 UINT width = 0, height = 0;
+                IWICBitmapSource *thumbnail = NULL;
+
                 hr = IWICBitmapFrameDecode_GetSize(framedecode, &width, &height);
                 ok(hr == S_OK, "GetFrameSize failed, hr=%x\n", hr);
                 ok(width == 16 && height == 16, "framesize=%ux%u\n", width, height);
+
+                hr = IWICBitmapFrameDecode_GetThumbnail(framedecode, &thumbnail);
+                todo_wine ok(hr == S_OK, "GetThumbnail failed, hr=%x\n", hr);
+
+                if (thumbnail) IWICBitmapSource_Release(thumbnail);
                 IWICBitmapFrameDecode_Release(framedecode);
             }
 




More information about the wine-cvs mailing list