windowscodecs: Implement GetPixelFormat for the JPEG decoder.
This commit is contained in:
parent
5ef3b51756
commit
0ab6e9853c
|
@ -399,8 +399,13 @@ static HRESULT WINAPI JpegDecoder_Frame_GetSize(IWICBitmapFrameDecode *iface,
|
||||||
static HRESULT WINAPI JpegDecoder_Frame_GetPixelFormat(IWICBitmapFrameDecode *iface,
|
static HRESULT WINAPI JpegDecoder_Frame_GetPixelFormat(IWICBitmapFrameDecode *iface,
|
||||||
WICPixelFormatGUID *pPixelFormat)
|
WICPixelFormatGUID *pPixelFormat)
|
||||||
{
|
{
|
||||||
FIXME("(%p,%p)\n", iface, pPixelFormat);
|
JpegDecoder *This = decoder_from_frame(iface);
|
||||||
return E_NOTIMPL;
|
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,
|
static HRESULT WINAPI JpegDecoder_Frame_GetResolution(IWICBitmapFrameDecode *iface,
|
||||||
|
|
Loading…
Reference in New Issue