windowscodecs: Implement GetPixelFormat for the JPEG decoder.

This commit is contained in:
Vincent Povirk 2009-08-24 12:29:02 -05:00 committed by Alexandre Julliard
parent 5ef3b51756
commit 0ab6e9853c

View File

@ -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,