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

gdiplus: Make sure that 1bpp bitmap images get loaded in native format.

parent 81cbf29e
......@@ -2908,6 +2908,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,
......@@ -2917,6 +2919,8 @@ static const WICPixelFormatGUID * const wic_pixel_formats[] = {
};
static const PixelFormat wic_gdip_formats[] = {
PixelFormat1bppIndexed,
PixelFormat1bppIndexed,
PixelFormat16bppRGB555,
PixelFormat24bppRGB,
PixelFormat32bppRGB,
......
......@@ -3326,7 +3326,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);
......@@ -3337,13 +3336,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)
{
......
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