[PATCH 3/3] windowscodecs: Use source palette if it wasn't specified earlier for PNG frame
Dmitry Timoshkov
dmitry at baikal.ru
Fri Jan 27 00:05:16 CST 2017
Nikolay Sivov <nsivov at codeweavers.com> wrote:
> @@ -1765,6 +1765,18 @@ static HRESULT WINAPI PngFrameEncode_WriteSource(IWICBitmapFrameEncode *iface,
>
> if (SUCCEEDED(hr))
> {
> + if (This->colors == 0)
> + {
> + IWICPalette *palette;
> +
> + if (SUCCEEDED(PaletteImpl_Create(&palette)))
> + {
> + if (SUCCEEDED(IWICBitmapSource_CopyPalette(pIBitmapSource, palette)))
> + IWICBitmapFrameEncode_SetPalette(iface, palette);
> + IWICPalette_Release(palette);
> + }
> + }
> +
> hr = write_source(iface, pIBitmapSource, prc,
> This->format->guid, This->format->bpp, This->width, This->height);
> }
What is this for? It looks like a workaround for a WIC converter bug.
I'd like to see a test case for this behaviour.
--
Dmitry.
More information about the wine-devel
mailing list