gdiplus: Don't set a palette when loading non-indexed images.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c4ef987429
commit
ed2d0df4f7
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue