[Bug 46375] Vietcong: game save thumbnails (screenshots) have corrupted colors

wine-bugs at winehq.org wine-bugs at winehq.org
Fri Dec 28 13:40:51 CST 2018


https://bugs.winehq.org/show_bug.cgi?id=46375

Paul Gofman <gofmanp at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gofmanp at gmail.com

--- Comment #2 from Paul Gofman <gofmanp at gmail.com> ---
Created attachment 63130
  --> https://bugs.winehq.org/attachment.cgi?id=63130
test patch

The game is using user32.CopyImage() for image shrinking from screen size to
thumbnail size. This is where colors get distorted. Wine uses default stretch
blit mode (BLACKONWHITE) which distorts colored images on shrinking. According
to my tests, Windows is doing halftone filtering in this case.

I am attaching the patch which fixes this (or at least greatly improves the
look of the images) and also has some basic tests suggesting that Windows
controls stretch mode in CopyImage(). I could not find any documentation where
this behaviour is discussed.
The fix sets stretch blit mode to HALFTONE in CopyImage for colored images.
While HALFTONE stretch blit is not implemented in Wine gdi dibdrv (and so the
test still does not pass), STRETCH_DELETESCANS it falls back to looks more
appropriate for colored images than STRETCH_ANDSCANS (BLACKONWHITE).

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list