windowscodecs: Add support for 32-bit TGA images.

This commit is contained in:
Vincent Povirk 2010-10-20 15:04:10 -05:00 committed by Alexandre Julliard
parent 6ecb81976f
commit a64400ec98
1 changed files with 19 additions and 0 deletions

View File

@ -517,6 +517,25 @@ static HRESULT WINAPI TgaDecoder_Frame_GetPixelFormat(IWICBitmapFrameDecode *ifa
case 24: case 24:
memcpy(pPixelFormat, &GUID_WICPixelFormat24bppBGR, sizeof(GUID)); memcpy(pPixelFormat, &GUID_WICPixelFormat24bppBGR, sizeof(GUID));
break; break;
case 32:
switch (attribute_type)
{
case ATTRIBUTE_NO_ALPHA:
case ATTRIBUTE_UNDEFINED:
case ATTRIBUTE_UNDEFINED_PRESERVE:
memcpy(pPixelFormat, &GUID_WICPixelFormat32bppBGR, sizeof(GUID));
break;
case ATTRIBUTE_ALPHA:
memcpy(pPixelFormat, &GUID_WICPixelFormat32bppBGRA, sizeof(GUID));
break;
case ATTRIBUTE_PALPHA:
memcpy(pPixelFormat, &GUID_WICPixelFormat32bppPBGRA, sizeof(GUID));
break;
default:
FIXME("Unhandled 32-bit attribute type %u\n", attribute_type);
return E_NOTIMPL;
}
break;
default: default:
FIXME("Unhandled truecolor depth %u\n", This->header.depth); FIXME("Unhandled truecolor depth %u\n", This->header.depth);
return E_NOTIMPL; return E_NOTIMPL;