From 8bb4c10e2b689c56dfb2ce60c731b08be3247948 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Sat, 24 Apr 2010 09:39:23 -0500 Subject: [PATCH 2/2] gdiplus: Handle more cases in GdipCreateBitmapFromGdiDib. --- dlls/gdiplus/image.c | 6 ++++++ dlls/gdiplus/tests/image.c | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index b0ba8ce..56b79e1 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -1242,9 +1242,15 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromGdiDib(GDIPCONST BITMAPINFO* info, case 8: format = PixelFormat8bppIndexed; break; + case 16: + format = PixelFormat16bppRGB555; + break; case 24: format = PixelFormat24bppRGB; break; + case 32: + format = PixelFormat32bppRGB; + break; default: FIXME("don't know how to handle %d bpp\n", info->bmiHeader.biBitCount); *bitmap = NULL; diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index cf2a6e1..09ba8f0 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -188,8 +188,8 @@ static void test_FromGdiDib(void) expect(InvalidParameter, stat); stat = GdipCreateBitmapFromGdiDib(bmi, buff, &bm); - todo_wine expect(Ok, stat); - todo_wine ok(NULL != bm, "Expected bitmap to be initialized\n"); + expect(Ok, stat); + ok(NULL != bm, "Expected bitmap to be initialized\n"); if (stat == Ok) { stat = GdipGetImagePixelFormat((GpImage*)bm, &format); @@ -214,8 +214,8 @@ static void test_FromGdiDib(void) bmi->bmiHeader.biBitCount = 16; stat = GdipCreateBitmapFromGdiDib(bmi, buff, &bm); - todo_wine expect(Ok, stat); - todo_wine ok(NULL != bm, "Expected bitmap to be initialized\n"); + expect(Ok, stat); + ok(NULL != bm, "Expected bitmap to be initialized\n"); if (stat == Ok) { stat = GdipGetImagePixelFormat((GpImage*)bm, &format); -- 1.6.3.3