Commit 0ab6e985 authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

windowscodecs: Implement GetPixelFormat for the JPEG decoder.

parent 5ef3b517
......@@ -399,8 +399,13 @@ static HRESULT WINAPI JpegDecoder_Frame_GetSize(IWICBitmapFrameDecode *iface,
static HRESULT WINAPI JpegDecoder_Frame_GetPixelFormat(IWICBitmapFrameDecode *iface,
WICPixelFormatGUID *pPixelFormat)
{
FIXME("(%p,%p)\n", iface, pPixelFormat);
return E_NOTIMPL;
JpegDecoder *This = decoder_from_frame(iface);
TRACE("(%p,%p)\n", iface, pPixelFormat);
if (This->cinfo.out_color_space == JCS_RGB)
memcpy(pPixelFormat, &GUID_WICPixelFormat24bppBGR, sizeof(GUID));
else /* This->cinfo.out_color_space == JCS_GRAYSCALE */
memcpy(pPixelFormat, &GUID_WICPixelFormat8bppGray, sizeof(GUID));
return S_OK;
}
static HRESULT WINAPI JpegDecoder_Frame_GetResolution(IWICBitmapFrameDecode *iface,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment