Dmitry Timoshkov : windowscodecs: Fix reading the mask bits in CreateBitmapFromHICON.
Alexandre Julliard
julliard at winehq.org
Tue Jan 15 13:46:17 CST 2013
Module: wine
Branch: master
Commit: 0df1742307b7aafec611feddec9c049eae0d938a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0df1742307b7aafec611feddec9c049eae0d938a
Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date: Tue Jan 15 12:47:47 2013 +0800
windowscodecs: Fix reading the mask bits in CreateBitmapFromHICON.
---
dlls/windowscodecs/imgfactory.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/dlls/windowscodecs/imgfactory.c b/dlls/windowscodecs/imgfactory.c
index 8762c81..3e574d5 100644
--- a/dlls/windowscodecs/imgfactory.c
+++ b/dlls/windowscodecs/imgfactory.c
@@ -642,7 +642,7 @@ static HRESULT WINAPI ComponentFactory_CreateBitmapFromHICON(IWICComponentFactor
memset(&bi, 0, sizeof(bi));
bi.bmiHeader.biSize = sizeof(bi.bmiHeader);
bi.bmiHeader.biWidth = width;
- bi.bmiHeader.biHeight = -height;
+ bi.bmiHeader.biHeight = info.hbmColor ? -height: -height * 2;
bi.bmiHeader.biPlanes = 1;
bi.bmiHeader.biBitCount = 32;
bi.bmiHeader.biCompression = BI_RGB;
@@ -701,8 +701,6 @@ static HRESULT WINAPI ComponentFactory_CreateBitmapFromHICON(IWICComponentFactor
for (x = 0; x < width; x++, rgba++, bits++)
{
- if (!info.hbmColor) *rgba = ~*rgba;
-
if (*bits)
*rgba = 0;
else
More information about the wine-cvs
mailing list