Re: PATCH: olepictures black & white
Marcus Meissner <marcus(a)jet.franken.de> writes:
Somehow the loaded JPEGs are now black & white in the IPicture implementation.
Exchanging CreateCompatibleDC(0) by CreateDCA("DISPLAY",0,0,0); makes them colored again.
But I am not sure whether the problem itself was a bug on my side, or on the WINE side...
Maybe a bit of both... I think the patch below should fix the GDI part; but is there any reason you don't use GetDC(0) instead of CreateCompatibleDC? It would avoid creating a new DC every time. Index: objects/dib.c =================================================================== RCS file: /opt/cvs-commit/wine/objects/dib.c,v retrieving revision 1.60 diff -u -r1.60 dib.c --- objects/dib.c 2001/08/17 00:07:42 1.60 +++ objects/dib.c 2001/08/19 19:27:42 @@ -875,7 +875,9 @@ /* Now create the bitmap */ - if (fColor) handle = CreateCompatibleBitmap( hdc, width, height ); + if (fColor) + handle = CreateBitmap( width, height, GetDeviceCaps( hdc, PLANES ), + GetDeviceCaps( hdc, BITSPIXEL ), NULL ); else handle = CreateBitmap( width, height, 1, 1, NULL ); if (!handle) return 0; -- Alexandre Julliard julliard(a)winehq.com
participants (1)
-
Alexandre Julliard