According to MSDN, GetPreview isn't supported on any decoder except WMPhoto, and if that's true it should probably be returning WINCODEC_ERR_UNSUPPORTEDOPERATION.
And why bother with GetThumbnail if you're not going to do it properly? At least check whether a thumbnail exists in the image before returning something.
Vincent Povirk madewokherd@gmail.com wrote:
According to MSDN, GetPreview isn't supported on any decoder except WMPhoto, and if that's true it should probably be returning WINCODEC_ERR_UNSUPPORTEDOPERATION.
And why bother with GetThumbnail if you're not going to do it properly? At least check whether a thumbnail exists in the image before returning something.
That was to make WICExplorer happy. After looking at its source I've found that it doesn't always check return values of GetThumbnail and GetPreview, but checks for returned interface pointer instead. I'll send a proper patch.
Thanks.