[8/9] gdiplus: Make sure that 1bpp bitmap images get loaded in native format. Resend.
Dmitry Timoshkov
dmitry at baikal.ru
Mon Jul 16 01:47:50 CDT 2012
---
dlls/gdiplus/image.c | 4 ++++
dlls/gdiplus/tests/image.c | 4 +---
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c
index 9bb6087..8fd8067 100644
--- a/dlls/gdiplus/image.c
+++ b/dlls/gdiplus/image.c
@@ -2963,6 +2963,8 @@ GpStatus WINGDIPAPI GdipLoadImageFromFileICM(GDIPCONST WCHAR* filename,GpImage *
}
static const WICPixelFormatGUID * const wic_pixel_formats[] = {
+ &GUID_WICPixelFormatBlackWhite,
+ &GUID_WICPixelFormat1bppIndexed,
&GUID_WICPixelFormat16bppBGR555,
&GUID_WICPixelFormat24bppBGR,
&GUID_WICPixelFormat32bppBGR,
@@ -2972,6 +2974,8 @@ static const WICPixelFormatGUID * const wic_pixel_formats[] = {
};
static const PixelFormat wic_gdip_formats[] = {
+ PixelFormat1bppIndexed,
+ PixelFormat1bppIndexed,
PixelFormat16bppRGB555,
PixelFormat24bppRGB,
PixelFormat32bppRGB,
diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c
index 249ea9a..786dbd0 100644
--- a/dlls/gdiplus/tests/image.c
+++ b/dlls/gdiplus/tests/image.c
@@ -3325,7 +3325,6 @@ static void test_tiff_palette(void)
status = GdipGetImagePixelFormat(image, &format);
expect(Ok, status);
-todo_wine
ok(format == PixelFormat1bppIndexed, "expected PixelFormat1bppIndexed, got %#x\n", format);
status = GdipGetImagePaletteSize(image, &size);
@@ -3336,13 +3335,12 @@ todo_wine
GdipDisposeImage(image);
return;
}
-todo_wine
expect(sizeof(ColorPalette) + sizeof(ARGB), size);
status = GdipGetImagePalette(image, &palette.pal, size);
expect(Ok, status);
- expect(0, palette.pal.Flags);
todo_wine
+ expect(0, palette.pal.Flags);
expect(2, palette.pal.Count);
if (palette.pal.Count == 2)
{
--
1.7.11.2
More information about the wine-patches
mailing list