gdiplus: Make get_palette() usable for generating predefined palettes.
This commit is contained in:
parent
f165e2725f
commit
0b40df2990
|
@ -76,7 +76,9 @@ static ColorPalette *get_palette(IWICBitmapFrameDecode *frame, WICBitmapPaletteT
|
|||
hr = IWICImagingFactory_CreatePalette(factory, &wic_palette);
|
||||
if (hr == S_OK)
|
||||
{
|
||||
hr = IWICBitmapFrameDecode_CopyPalette(frame, wic_palette);
|
||||
hr = WINCODEC_ERR_PALETTEUNAVAILABLE;
|
||||
if (frame)
|
||||
hr = IWICBitmapFrameDecode_CopyPalette(frame, wic_palette);
|
||||
if (hr != S_OK)
|
||||
{
|
||||
TRACE("using predefined palette %#x\n", palette_type);
|
||||
|
|
Loading…
Reference in New Issue