gdiplus: Disable alpha channel support for BMP images.

This commit is contained in:
Vincent Povirk 2009-09-04 10:23:30 -05:00 committed by Alexandre Julliard
parent 91e0ee260b
commit 0313f88794
1 changed files with 14 additions and 1 deletions

View File

@ -1509,7 +1509,20 @@ static GpStatus decode_image_icon(IStream* stream, REFCLSID clsid, GpImage **ima
static GpStatus decode_image_bmp(IStream* stream, REFCLSID clsid, GpImage **image)
{
return decode_image_wic(stream, &CLSID_WICBmpDecoder, image);
GpStatus status;
GpBitmap* bitmap;
status = decode_image_wic(stream, &CLSID_WICBmpDecoder, image);
bitmap = (GpBitmap*)*image;
if (status == Ok && bitmap->format == PixelFormat32bppARGB)
{
/* WIC supports bmp files with alpha, but gdiplus does not */
bitmap->format = PixelFormat32bppRGB;
}
return status;
}
static GpStatus decode_image_jpeg(IStream* stream, REFCLSID clsid, GpImage **image)