[PATCH] Fix for monochrome device independent bitmaps with inverted
oldium.pro at seznam.cz
Thu Nov 3 11:29:39 CST 2005
I found a problem in translating XImage into DIB created by CreateDIBSection.
All problems are in graphics/x11drv/dib.c only.
1. When update XImage->DIB (monochrome images) is made, function
X11DRV_DIB_GetImageBits_1 falls back into "notsupported" branch. The palette
of the DIB was ignored in this case. If the colors are inverted, also image
is inverted for updating DIB. Update DIB->XImage is not affected as it uses
2. Used XImage (bmpImage parameter) has RGB mask corresponding to current
visual, so it is not zero. The RGB mask was checked for zero when copying
BMP->DIB, so new static inline function X11DRV_DIB_CheckMask has been
3. Parameter colorMap was set to identity color map for every monochrome
bitmap. Changed to check if colorMap is NULL or has the same colors.
Oldrich Jedlicka <oldium.pro at seznam.cz>
* Check for inverted colors in "notsupported" branch of
* Check for non-zero RGB mask corresponding to current visual
* Fix for setting identity colorMap for every monochrome bitmap
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 7556 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20051103/231ba32f/dib.c-0001.patch
More information about the wine-patches