From: Vincent Povirk vincent@codeweavers.com
Signed-off-by: Vincent Povirk vincent@codeweavers.com --- dlls/gdiplus/image.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index 4fd7d95a9c7..17cccf2b427 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -58,11 +58,11 @@ static const struct { &GUID_WICPixelFormat4bppIndexed, PixelFormat4bppIndexed, WICBitmapPaletteTypeFixedHalftone8 }, { &GUID_WICPixelFormat8bppIndexed, PixelFormat8bppIndexed, WICBitmapPaletteTypeFixedHalftone256 }, { &GUID_WICPixelFormat8bppGray, PixelFormat8bppIndexed, WICBitmapPaletteTypeFixedGray256 }, - { &GUID_WICPixelFormat16bppBGR555, PixelFormat16bppRGB555, WICBitmapPaletteTypeFixedHalftone256 }, - { &GUID_WICPixelFormat24bppBGR, PixelFormat24bppRGB, WICBitmapPaletteTypeFixedHalftone256 }, - { &GUID_WICPixelFormat32bppBGR, PixelFormat32bppRGB, WICBitmapPaletteTypeFixedHalftone256 }, - { &GUID_WICPixelFormat32bppBGRA, PixelFormat32bppARGB, WICBitmapPaletteTypeFixedHalftone256 }, - { &GUID_WICPixelFormat32bppPBGRA, PixelFormat32bppPARGB, WICBitmapPaletteTypeFixedHalftone256 }, + { &GUID_WICPixelFormat16bppBGR555, PixelFormat16bppRGB555, 0 }, + { &GUID_WICPixelFormat24bppBGR, PixelFormat24bppRGB, 0 }, + { &GUID_WICPixelFormat32bppBGR, PixelFormat32bppRGB, 0 }, + { &GUID_WICPixelFormat32bppBGRA, PixelFormat32bppARGB, 0 }, + { &GUID_WICPixelFormat32bppPBGRA, PixelFormat32bppPARGB, 0 }, { NULL } };
@@ -82,7 +82,7 @@ static ColorPalette *get_palette(IWICBitmapFrameDecode *frame, WICBitmapPaletteT hr = WINCODEC_ERR_PALETTEUNAVAILABLE; if (frame) hr = IWICBitmapFrameDecode_CopyPalette(frame, wic_palette); - if (hr != S_OK) + if (hr != S_OK && palette_type != 0) { TRACE("using predefined palette %#x\n", palette_type); hr = IWICPalette_InitializePredefined(wic_palette, palette_type, FALSE);