From c2451240dc273b0571173e7363acc5598a8c1c0c Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Thu, 6 Dec 2018 12:06:08 +0300 Subject: [PATCH] windowscodecs: Implement IWICBitmapEncoder::GetEncoderInfo in JPEG encoder. Signed-off-by: Dmitry Timoshkov Signed-off-by: Alexandre Julliard --- dlls/windowscodecs/jpegformat.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/dlls/windowscodecs/jpegformat.c b/dlls/windowscodecs/jpegformat.c index 451d725eb8e..a060d569f84 100644 --- a/dlls/windowscodecs/jpegformat.c +++ b/dlls/windowscodecs/jpegformat.c @@ -1392,11 +1392,22 @@ static HRESULT WINAPI JpegEncoder_GetContainerFormat(IWICBitmapEncoder *iface, G return S_OK; } -static HRESULT WINAPI JpegEncoder_GetEncoderInfo(IWICBitmapEncoder *iface, - IWICBitmapEncoderInfo **ppIEncoderInfo) +static HRESULT WINAPI JpegEncoder_GetEncoderInfo(IWICBitmapEncoder *iface, IWICBitmapEncoderInfo **info) { - FIXME("(%p,%p): stub\n", iface, ppIEncoderInfo); - return E_NOTIMPL; + IWICComponentInfo *comp_info; + HRESULT hr; + + TRACE("%p,%p\n", iface, info); + + if (!info) return E_INVALIDARG; + + hr = CreateComponentInfo(&CLSID_WICJpegEncoder, &comp_info); + if (hr == S_OK) + { + hr = IWICComponentInfo_QueryInterface(comp_info, &IID_IWICBitmapEncoderInfo, (void **)info); + IWICComponentInfo_Release(comp_info); + } + return hr; } static HRESULT WINAPI JpegEncoder_SetColorContexts(IWICBitmapEncoder *iface,