From: Daniel Lehman dlehman25@gmail.com
--- dlls/oleaut32/tests/olepicture.c | 42 +++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 14 deletions(-)
diff --git a/dlls/oleaut32/tests/olepicture.c b/dlls/oleaut32/tests/olepicture.c index 58d5577631c..d37e95c6401 100644 --- a/dlls/oleaut32/tests/olepicture.c +++ b/dlls/oleaut32/tests/olepicture.c @@ -210,7 +210,7 @@ typedef struct NoStatStreamImpl static IStream* NoStatStream_Construct(HGLOBAL hGlobal);
static void -test_pic_with_stream(LPSTREAM stream, unsigned int imgsize) +test_pic_with_stream(LPSTREAM stream, unsigned int imgsize, int bpp, BOOL todo) { IPicture* pic = NULL; HRESULT hres; @@ -247,8 +247,22 @@ test_pic_with_stream(LPSTREAM stream, unsigned int imgsize) if (handle) { BITMAP bmp; + DIBSECTION dib; + GetObjectA(UlongToHandle(handle), sizeof(BITMAP), &bmp); ok(bmp.bmBits != 0, "not a dib\n"); + todo_wine_if(todo) + ok(bmp.bmBitsPixel == bpp, "expected %d, got %d\n", bpp, bmp.bmBitsPixel); + + GetObjectA(UlongToHandle(handle), sizeof(DIBSECTION), &dib); + ok(dib.dsBm.bmBits != 0, "not a dib\n"); + todo_wine_if(todo) { + ok(dib.dsBm.bmBitsPixel == bpp, "expected %d, got %d\n", bpp, dib.dsBm.bmBitsPixel); + ok(dib.dsBmih.biBitCount == bpp, "expected %d, got %d\n", bpp, dib.dsBmih.biBitCount); + } + ok(dib.dsBmih.biCompression == BI_RGB, "expected %d, got %ld\n", BI_RGB, dib.dsBmih.biCompression); + todo_wine_if(dib.dsBmih.biClrUsed != dib.dsBmih.biClrImportant) + ok(dib.dsBmih.biClrUsed == dib.dsBmih.biClrImportant, "expected %ld, got %ld\n", dib.dsBmih.biClrUsed, dib.dsBmih.biClrImportant); }
width = 0; @@ -282,7 +296,7 @@ test_pic_with_stream(LPSTREAM stream, unsigned int imgsize) }
static void -test_pic(const unsigned char *imgdata, unsigned int imgsize) +test_pic(const unsigned char *imgdata, unsigned int imgsize, int bpp, BOOL todo) { LPSTREAM stream; HGLOBAL hglob; @@ -305,14 +319,14 @@ test_pic(const unsigned char *imgdata, unsigned int imgsize) memset(&seekto,0,sizeof(seekto)); hres = IStream_Seek(stream, seekto, STREAM_SEEK_CUR, &newpos1); ok (hres == S_OK, "istream seek failed? doubt it... hres 0x%08lx\n", hres); - test_pic_with_stream(stream, imgsize); - + test_pic_with_stream(stream, imgsize, bpp, todo); + IStream_Release(stream);
/* again with Non Statable and Non Seekable stream */ stream = NoStatStream_Construct(hglob); hglob = 0; /* Non-statable impl always deletes on release */ - test_pic_with_stream(stream, 0); + test_pic_with_stream(stream, 0, bpp, todo);
IStream_Release(stream); for (i = 1; i <= 8; i++) { @@ -336,14 +350,14 @@ test_pic(const unsigned char *imgdata, unsigned int imgsize) memset(&seekto,0,sizeof(seekto)); hres = IStream_Seek(stream, seekto, STREAM_SEEK_CUR, &newpos1); ok (hres == S_OK, "istream seek failed? doubt it... hres 0x%08lx\n", hres); - test_pic_with_stream(stream, imgsize); - + test_pic_with_stream(stream, imgsize, bpp, todo); + IStream_Release(stream);
/* again with Non Statable and Non Seekable stream */ stream = NoStatStream_Construct(hglob); hglob = 0; /* Non-statable impl always deletes on release */ - test_pic_with_stream(stream, 0); + test_pic_with_stream(stream, 0, bpp, todo);
IStream_Release(stream); } @@ -1702,13 +1716,13 @@ START_TEST(olepicture) }
/* Test regular 1x1 pixel images of gif, jpg, bmp type */ - test_pic(gifimage, sizeof(gifimage)); - test_pic(jpgimage, sizeof(jpgimage)); - test_pic(bmpimage, sizeof(bmpimage)); - test_pic(bmpimage_rle8, sizeof(bmpimage_rle8)); - test_pic(gif4pixel, sizeof(gif4pixel)); + test_pic(gifimage, sizeof(gifimage), 1, TRUE); + test_pic(jpgimage, sizeof(jpgimage), 24, TRUE); + test_pic(bmpimage, sizeof(bmpimage), 1, TRUE); + test_pic(bmpimage_rle8, sizeof(bmpimage_rle8), 4, TRUE); + test_pic(gif4pixel, sizeof(gif4pixel), 4, TRUE); /* FIXME: No PNG support in Windows... */ - if (0) test_pic(pngimage, sizeof(pngimage)); + if (0) test_pic(pngimage, sizeof(pngimage), 32, TRUE); test_empty_image(); test_empty_image_2(); if (pOleLoadPictureEx)
From: Daniel Lehman dlehman25@gmail.com
--- dlls/oleaut32/tests/olepicture.c | 95 ++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+)
diff --git a/dlls/oleaut32/tests/olepicture.c b/dlls/oleaut32/tests/olepicture.c index d37e95c6401..1d83047c463 100644 --- a/dlls/oleaut32/tests/olepicture.c +++ b/dlls/oleaut32/tests/olepicture.c @@ -115,6 +115,98 @@ static const unsigned char bmpimage_rle8[] = { 0x00,0x00 };
+/* 1x1 pixel 4-bit bmp */ +static const unsigned char bmpimage4[122] = { +0x42,0x4d,0x7a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0x28,0x00, +0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x04,0x00,0x00,0x00, +0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x80, +0x00,0x00,0x00,0x80,0x80,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x80,0x00,0x80,0x80, +0x00,0x00,0x80,0x80,0x80,0x00,0xc0,0xc0,0xc0,0x00,0x00,0x00,0xff,0x00,0x00,0xff, +0x00,0x00,0x00,0xff,0xff,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0xff,0x00,0xff,0xff, +0x00,0x00,0xff,0xff,0xff,0x00,0xf0,0x00,0x00,0x00, +}; + +/* 1x1 pixel 8-bit bmp */ +static const unsigned char bmpimage8[1082] = { +0x42,0x4d,0x3a,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x04,0x00,0x00,0x28,0x00, +0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x08,0x00,0x00,0x00, +0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x80, +0x00,0x00,0x00,0x80,0x80,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x80,0x00,0x80,0x80, +0x00,0x00,0xc0,0xc0,0xc0,0x00,0xc0,0xdc,0xc0,0x00,0xf0,0xca,0xa6,0x00,0x00,0x20, +0x40,0x00,0x00,0x20,0x60,0x00,0x00,0x20,0x80,0x00,0x00,0x20,0xa0,0x00,0x00,0x20, +0xc0,0x00,0x00,0x20,0xe0,0x00,0x00,0x40,0x00,0x00,0x00,0x40,0x20,0x00,0x00,0x40, +0x40,0x00,0x00,0x40,0x60,0x00,0x00,0x40,0x80,0x00,0x00,0x40,0xa0,0x00,0x00,0x40, +0xc0,0x00,0x00,0x40,0xe0,0x00,0x00,0x60,0x00,0x00,0x00,0x60,0x20,0x00,0x00,0x60, +0x40,0x00,0x00,0x60,0x60,0x00,0x00,0x60,0x80,0x00,0x00,0x60,0xa0,0x00,0x00,0x60, +0xc0,0x00,0x00,0x60,0xe0,0x00,0x00,0x80,0x00,0x00,0x00,0x80,0x20,0x00,0x00,0x80, +0x40,0x00,0x00,0x80,0x60,0x00,0x00,0x80,0x80,0x00,0x00,0x80,0xa0,0x00,0x00,0x80, +0xc0,0x00,0x00,0x80,0xe0,0x00,0x00,0xa0,0x00,0x00,0x00,0xa0,0x20,0x00,0x00,0xa0, +0x40,0x00,0x00,0xa0,0x60,0x00,0x00,0xa0,0x80,0x00,0x00,0xa0,0xa0,0x00,0x00,0xa0, +0xc0,0x00,0x00,0xa0,0xe0,0x00,0x00,0xc0,0x00,0x00,0x00,0xc0,0x20,0x00,0x00,0xc0, +0x40,0x00,0x00,0xc0,0x60,0x00,0x00,0xc0,0x80,0x00,0x00,0xc0,0xa0,0x00,0x00,0xc0, +0xc0,0x00,0x00,0xc0,0xe0,0x00,0x00,0xe0,0x00,0x00,0x00,0xe0,0x20,0x00,0x00,0xe0, +0x40,0x00,0x00,0xe0,0x60,0x00,0x00,0xe0,0x80,0x00,0x00,0xe0,0xa0,0x00,0x00,0xe0, +0xc0,0x00,0x00,0xe0,0xe0,0x00,0x40,0x00,0x00,0x00,0x40,0x00,0x20,0x00,0x40,0x00, +0x40,0x00,0x40,0x00,0x60,0x00,0x40,0x00,0x80,0x00,0x40,0x00,0xa0,0x00,0x40,0x00, +0xc0,0x00,0x40,0x00,0xe0,0x00,0x40,0x20,0x00,0x00,0x40,0x20,0x20,0x00,0x40,0x20, +0x40,0x00,0x40,0x20,0x60,0x00,0x40,0x20,0x80,0x00,0x40,0x20,0xa0,0x00,0x40,0x20, +0xc0,0x00,0x40,0x20,0xe0,0x00,0x40,0x40,0x00,0x00,0x40,0x40,0x20,0x00,0x40,0x40, +0x40,0x00,0x40,0x40,0x60,0x00,0x40,0x40,0x80,0x00,0x40,0x40,0xa0,0x00,0x40,0x40, +0xc0,0x00,0x40,0x40,0xe0,0x00,0x40,0x60,0x00,0x00,0x40,0x60,0x20,0x00,0x40,0x60, +0x40,0x00,0x40,0x60,0x60,0x00,0x40,0x60,0x80,0x00,0x40,0x60,0xa0,0x00,0x40,0x60, +0xc0,0x00,0x40,0x60,0xe0,0x00,0x40,0x80,0x00,0x00,0x40,0x80,0x20,0x00,0x40,0x80, +0x40,0x00,0x40,0x80,0x60,0x00,0x40,0x80,0x80,0x00,0x40,0x80,0xa0,0x00,0x40,0x80, +0xc0,0x00,0x40,0x80,0xe0,0x00,0x40,0xa0,0x00,0x00,0x40,0xa0,0x20,0x00,0x40,0xa0, +0x40,0x00,0x40,0xa0,0x60,0x00,0x40,0xa0,0x80,0x00,0x40,0xa0,0xa0,0x00,0x40,0xa0, +0xc0,0x00,0x40,0xa0,0xe0,0x00,0x40,0xc0,0x00,0x00,0x40,0xc0,0x20,0x00,0x40,0xc0, +0x40,0x00,0x40,0xc0,0x60,0x00,0x40,0xc0,0x80,0x00,0x40,0xc0,0xa0,0x00,0x40,0xc0, +0xc0,0x00,0x40,0xc0,0xe0,0x00,0x40,0xe0,0x00,0x00,0x40,0xe0,0x20,0x00,0x40,0xe0, +0x40,0x00,0x40,0xe0,0x60,0x00,0x40,0xe0,0x80,0x00,0x40,0xe0,0xa0,0x00,0x40,0xe0, +0xc0,0x00,0x40,0xe0,0xe0,0x00,0x80,0x00,0x00,0x00,0x80,0x00,0x20,0x00,0x80,0x00, +0x40,0x00,0x80,0x00,0x60,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0xa0,0x00,0x80,0x00, +0xc0,0x00,0x80,0x00,0xe0,0x00,0x80,0x20,0x00,0x00,0x80,0x20,0x20,0x00,0x80,0x20, +0x40,0x00,0x80,0x20,0x60,0x00,0x80,0x20,0x80,0x00,0x80,0x20,0xa0,0x00,0x80,0x20, +0xc0,0x00,0x80,0x20,0xe0,0x00,0x80,0x40,0x00,0x00,0x80,0x40,0x20,0x00,0x80,0x40, +0x40,0x00,0x80,0x40,0x60,0x00,0x80,0x40,0x80,0x00,0x80,0x40,0xa0,0x00,0x80,0x40, +0xc0,0x00,0x80,0x40,0xe0,0x00,0x80,0x60,0x00,0x00,0x80,0x60,0x20,0x00,0x80,0x60, +0x40,0x00,0x80,0x60,0x60,0x00,0x80,0x60,0x80,0x00,0x80,0x60,0xa0,0x00,0x80,0x60, +0xc0,0x00,0x80,0x60,0xe0,0x00,0x80,0x80,0x00,0x00,0x80,0x80,0x20,0x00,0x80,0x80, +0x40,0x00,0x80,0x80,0x60,0x00,0x80,0x80,0x80,0x00,0x80,0x80,0xa0,0x00,0x80,0x80, +0xc0,0x00,0x80,0x80,0xe0,0x00,0x80,0xa0,0x00,0x00,0x80,0xa0,0x20,0x00,0x80,0xa0, +0x40,0x00,0x80,0xa0,0x60,0x00,0x80,0xa0,0x80,0x00,0x80,0xa0,0xa0,0x00,0x80,0xa0, +0xc0,0x00,0x80,0xa0,0xe0,0x00,0x80,0xc0,0x00,0x00,0x80,0xc0,0x20,0x00,0x80,0xc0, +0x40,0x00,0x80,0xc0,0x60,0x00,0x80,0xc0,0x80,0x00,0x80,0xc0,0xa0,0x00,0x80,0xc0, +0xc0,0x00,0x80,0xc0,0xe0,0x00,0x80,0xe0,0x00,0x00,0x80,0xe0,0x20,0x00,0x80,0xe0, +0x40,0x00,0x80,0xe0,0x60,0x00,0x80,0xe0,0x80,0x00,0x80,0xe0,0xa0,0x00,0x80,0xe0, +0xc0,0x00,0x80,0xe0,0xe0,0x00,0xc0,0x00,0x00,0x00,0xc0,0x00,0x20,0x00,0xc0,0x00, +0x40,0x00,0xc0,0x00,0x60,0x00,0xc0,0x00,0x80,0x00,0xc0,0x00,0xa0,0x00,0xc0,0x00, +0xc0,0x00,0xc0,0x00,0xe0,0x00,0xc0,0x20,0x00,0x00,0xc0,0x20,0x20,0x00,0xc0,0x20, +0x40,0x00,0xc0,0x20,0x60,0x00,0xc0,0x20,0x80,0x00,0xc0,0x20,0xa0,0x00,0xc0,0x20, +0xc0,0x00,0xc0,0x20,0xe0,0x00,0xc0,0x40,0x00,0x00,0xc0,0x40,0x20,0x00,0xc0,0x40, +0x40,0x00,0xc0,0x40,0x60,0x00,0xc0,0x40,0x80,0x00,0xc0,0x40,0xa0,0x00,0xc0,0x40, +0xc0,0x00,0xc0,0x40,0xe0,0x00,0xc0,0x60,0x00,0x00,0xc0,0x60,0x20,0x00,0xc0,0x60, +0x40,0x00,0xc0,0x60,0x60,0x00,0xc0,0x60,0x80,0x00,0xc0,0x60,0xa0,0x00,0xc0,0x60, +0xc0,0x00,0xc0,0x60,0xe0,0x00,0xc0,0x80,0x00,0x00,0xc0,0x80,0x20,0x00,0xc0,0x80, +0x40,0x00,0xc0,0x80,0x60,0x00,0xc0,0x80,0x80,0x00,0xc0,0x80,0xa0,0x00,0xc0,0x80, +0xc0,0x00,0xc0,0x80,0xe0,0x00,0xc0,0xa0,0x00,0x00,0xc0,0xa0,0x20,0x00,0xc0,0xa0, +0x40,0x00,0xc0,0xa0,0x60,0x00,0xc0,0xa0,0x80,0x00,0xc0,0xa0,0xa0,0x00,0xc0,0xa0, +0xc0,0x00,0xc0,0xa0,0xe0,0x00,0xc0,0xc0,0x00,0x00,0xc0,0xc0,0x20,0x00,0xc0,0xc0, +0x40,0x00,0xc0,0xc0,0x60,0x00,0xc0,0xc0,0x80,0x00,0xc0,0xc0,0xa0,0x00,0xf0,0xfb, +0xff,0x00,0xa4,0xa0,0xa0,0x00,0x80,0x80,0x80,0x00,0x00,0x00,0xff,0x00,0x00,0xff, +0x00,0x00,0x00,0xff,0xff,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0xff,0x00,0xff,0xff, +0x00,0x00,0xff,0xff,0xff,0x00,0xff,0x00,0x00,0x00, +}; + +/* 1x1 pixel 24-bit bmp */ +static const unsigned char bmpimage24[58] = { +0x42,0x4d,0x3a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x36,0x00,0x00,0x00,0x28,0x00, +0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x18,0x00,0x00,0x00, +0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0x00, +}; + /* 2x2 pixel gif */ static const unsigned char gif4pixel[42] = { 0x47,0x49,0x46,0x38,0x37,0x61,0x02,0x00,0x02,0x00,0xa1,0x00,0x00,0x00,0x00,0x00, @@ -1720,6 +1812,9 @@ START_TEST(olepicture) test_pic(jpgimage, sizeof(jpgimage), 24, TRUE); test_pic(bmpimage, sizeof(bmpimage), 1, TRUE); test_pic(bmpimage_rle8, sizeof(bmpimage_rle8), 4, TRUE); + test_pic(bmpimage4, sizeof(bmpimage4), 4, TRUE); + test_pic(bmpimage8, sizeof(bmpimage8), 8, TRUE); + test_pic(bmpimage24, sizeof(bmpimage24), 24, TRUE); test_pic(gif4pixel, sizeof(gif4pixel), 4, TRUE); /* FIXME: No PNG support in Windows... */ if (0) test_pic(pngimage, sizeof(pngimage), 32, TRUE);
From: Daniel Lehman dlehman25@gmail.com
--- dlls/oleaut32/olepicture.c | 69 +++++++++++++++++++++++++------- dlls/oleaut32/tests/olepicture.c | 10 ++--- 2 files changed, 60 insertions(+), 19 deletions(-)
diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c index d7059382a3d..caea1281d4d 100644 --- a/dlls/oleaut32/olepicture.c +++ b/dlls/oleaut32/olepicture.c @@ -100,6 +100,21 @@ typedef struct
#include "poppack.h"
+typedef struct +{ + const WICPixelFormatGUID *guid; + UINT bpp; +} WICFORMAT; + +const WICFORMAT wicformats[] = +{ + {&GUID_WICPixelFormat1bppIndexed, 1}, + {&GUID_WICPixelFormat4bppIndexed, 4}, + {&GUID_WICPixelFormat8bppIndexed, 8}, + {&GUID_WICPixelFormat24bppBGR, 24}, + {&GUID_WICPixelFormat32bppBGR, 32}, +}; + /************************************************************************* * Declaration of implementation class */ @@ -171,6 +186,11 @@ static inline OLEPictureImpl *impl_from_IConnectionPointContainer( IConnectionPo return CONTAINING_RECORD(iface, OLEPictureImpl, IConnectionPointContainer_iface); }
+static inline int get_dib_stride(int width, int bpp) +{ + return ((width * bpp + 31) >> 3) & ~3; +} + /* * Predeclare VTables. They get initialized at the end. */ @@ -987,12 +1007,31 @@ static HRESULT OLEPictureImpl_LoadWICSource(OLEPictureImpl *This, IWICBitmapSour UINT stride, buffersize; BYTE *bits, *mask = NULL; WICRect rc; + WICPixelFormatGUID guid; IWICBitmapSource *real_source; - UINT x, y; + UINT x, y, i; COLORREF white = RGB(255, 255, 255), black = RGB(0, 0, 0); BOOL has_alpha=FALSE;
- hr = WICConvertBitmapSource(&GUID_WICPixelFormat32bppBGRA, src, &real_source); + hr = IWICBitmapSource_GetPixelFormat(src, &guid); + if (FAILED(hr)) return hr; + + for (i = 0; i < ARRAY_SIZE(wicformats); i++) + { + if (IsEqualGUID(&guid, wicformats[i].guid)) + { + bih.biBitCount = wicformats[i].bpp; + break; + } + } + + if (i == ARRAY_SIZE(wicformats)) + { + memcpy(&guid, &GUID_WICPixelFormat32bppBGRA, sizeof(guid)); + bih.biBitCount = 32; + } + + hr = WICConvertBitmapSource(&guid, src, &real_source); if (FAILED(hr)) return hr;
hr = IWICBitmapSource_GetSize(real_source, &width, &height); @@ -1002,7 +1041,6 @@ static HRESULT OLEPictureImpl_LoadWICSource(OLEPictureImpl *This, IWICBitmapSour bih.biWidth = width; bih.biHeight = -height; bih.biPlanes = 1; - bih.biBitCount = 32; bih.biCompression = BI_RGB; bih.biSizeImage = 0; bih.biXPelsPerMeter = 4085; /* olepicture ignores the stored resolution */ @@ -1010,7 +1048,7 @@ static HRESULT OLEPictureImpl_LoadWICSource(OLEPictureImpl *This, IWICBitmapSour bih.biClrUsed = 0; bih.biClrImportant = 0;
- stride = 4 * width; + stride = get_dib_stride(width, bih.biBitCount); buffersize = stride * height;
mask = malloc(buffersize); @@ -1041,17 +1079,20 @@ static HRESULT OLEPictureImpl_LoadWICSource(OLEPictureImpl *This, IWICBitmapSour This->desc.picType = PICTYPE_BITMAP; OLEPictureImpl_SetBitmap(This);
- /* set transparent pixels to black, all others to white */ - for(y = 0; y < height; y++){ - for(x = 0; x < width; x++){ - DWORD *pixel = (DWORD*)(bits + stride*y + 4*x); - if((*pixel & 0x80000000) == 0) - { - has_alpha = TRUE; - *(DWORD *)(mask + stride * y + 4 * x) = black; + if (IsEqualGUID(&guid, &GUID_WICPixelFormat32bppBGRA)) + { + /* set transparent pixels to black, all others to white */ + for(y = 0; y < height; y++){ + for(x = 0; x < width; x++){ + DWORD *pixel = (DWORD*)(bits + stride*y + 4*x); + if((*pixel & 0x80000000) == 0) + { + has_alpha = TRUE; + *(DWORD *)(mask + stride * y + 4 * x) = black; + } + else + *(DWORD *)(mask + stride * y + 4 * x) = white; } - else - *(DWORD *)(mask + stride * y + 4 * x) = white; } }
diff --git a/dlls/oleaut32/tests/olepicture.c b/dlls/oleaut32/tests/olepicture.c index 1d83047c463..830687cb698 100644 --- a/dlls/oleaut32/tests/olepicture.c +++ b/dlls/oleaut32/tests/olepicture.c @@ -1809,12 +1809,12 @@ START_TEST(olepicture)
/* Test regular 1x1 pixel images of gif, jpg, bmp type */ test_pic(gifimage, sizeof(gifimage), 1, TRUE); - test_pic(jpgimage, sizeof(jpgimage), 24, TRUE); - test_pic(bmpimage, sizeof(bmpimage), 1, TRUE); + test_pic(jpgimage, sizeof(jpgimage), 24, FALSE); + test_pic(bmpimage, sizeof(bmpimage), 1, FALSE); test_pic(bmpimage_rle8, sizeof(bmpimage_rle8), 4, TRUE); - test_pic(bmpimage4, sizeof(bmpimage4), 4, TRUE); - test_pic(bmpimage8, sizeof(bmpimage8), 8, TRUE); - test_pic(bmpimage24, sizeof(bmpimage24), 24, TRUE); + test_pic(bmpimage4, sizeof(bmpimage4), 4, FALSE); + test_pic(bmpimage8, sizeof(bmpimage8), 8, FALSE); + test_pic(bmpimage24, sizeof(bmpimage24), 24, FALSE); test_pic(gif4pixel, sizeof(gif4pixel), 4, TRUE); /* FIXME: No PNG support in Windows... */ if (0) test_pic(pngimage, sizeof(pngimage), 32, TRUE);
This merge request was approved by Esme Povirk.