windowscodecs: Use IWICImagingFactory_CreatePalette in write_source.

Instead of PaletteImpl_Create.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2021-02-02 10:53:26 +01:00 committed by Alexandre Julliard
parent 2201ca08fb
commit 1fbd58bf33
1 changed files with 9 additions and 1 deletions

View File

@ -121,9 +121,17 @@ HRESULT write_source(IWICBitmapFrameEncode *iface,
if (need_palette) if (need_palette)
{ {
IWICImagingFactory *factory;
IWICPalette *palette; IWICPalette *palette;
hr = PaletteImpl_Create(&palette); hr = create_instance(&CLSID_WICImagingFactory, &IID_IWICImagingFactory, (void**)&factory);
if (SUCCEEDED(hr))
{
hr = IWICImagingFactory_CreatePalette(factory, &palette);
IWICImagingFactory_Release(factory);
}
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
{ {
hr = IWICBitmapSource_CopyPalette(converted_source, palette); hr = IWICBitmapSource_CopyPalette(converted_source, palette);