Commit 0313f887 authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

gdiplus: Disable alpha channel support for BMP images.

parent 91e0ee26
...@@ -1509,7 +1509,20 @@ static GpStatus decode_image_icon(IStream* stream, REFCLSID clsid, GpImage **ima ...@@ -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) 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) static GpStatus decode_image_jpeg(IStream* stream, REFCLSID clsid, GpImage **image)
......
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