Commit d8c71dd5 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

windowscodecs: Implement IWICBitmapFrameDecode::GetColorContexts for TIFF images.

parent e002d2ea
......@@ -1105,8 +1105,34 @@ static HRESULT WINAPI TiffFrameDecode_GetMetadataQueryReader(IWICBitmapFrameDeco
static HRESULT WINAPI TiffFrameDecode_GetColorContexts(IWICBitmapFrameDecode *iface,
UINT cCount, IWICColorContext **ppIColorContexts, UINT *pcActualCount)
{
FIXME("(%p,%u,%p,%p): stub\n", iface, cCount, ppIColorContexts, pcActualCount);
return WINCODEC_ERR_UNSUPPORTEDOPERATION;
TiffFrameDecode *This = impl_from_IWICBitmapFrameDecode(iface);
const BYTE *profile;
UINT len;
HRESULT hr;
TRACE("(%p,%u,%p,%p)\n", iface, cCount, ppIColorContexts, pcActualCount);
EnterCriticalSection(&This->parent->lock);
if (pTIFFGetField(This->parent->tiff, TIFFTAG_ICCPROFILE, &len, &profile))
{
if (cCount && ppIColorContexts)
{
hr = IWICColorContext_InitializeFromMemory(*ppIColorContexts, profile, len);
if (FAILED(hr))
{
LeaveCriticalSection(&This->parent->lock);
return hr;
}
}
*pcActualCount = 1;
}
else
*pcActualCount = 0;
LeaveCriticalSection(&This->parent->lock);
return S_OK;
}
static HRESULT WINAPI TiffFrameDecode_GetThumbnail(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