[Bug 20145] DrawIconEx() doesn't draw 1 bpp monochrome Icons correctly

wine-bugs at winehq.org wine-bugs at winehq.org
Fri Nov 20 09:05:46 CST 2009


http://bugs.winehq.org/show_bug.cgi?id=20145





--- Comment #11 from Wilfried Pasquazzo <wilfried.pasquazzo at gmail.com>  2009-11-20 09:05:45 ---
Sorry for the long response times.

No, I didn't resend the patch yet, because I first wanted to search a bit more
what the actual bug for this bad drawing of the icon is, instead of just
avoiding the faulty part of the program that triggers it.

The problem is clearly related to the memcpy() between from the icons bitmap to
the DIBSection. It seems that the DIBSection requires each line of the image to
be at least 32 bit big, even if it is set to 1 bpp. The 1 bpp icon is however
only aligned to 16 bit. Therefore the DIBSection simply ignored every other
line of the icon when blitting, "thinking" those lines were just padding.

This problem therefore occurs only for small icons with very low bpp, like the
8x8 1 bpp icon used in the test program. 32-bit icons are always aligned
anyway.

I'll write a new patch that directly targets this problematic line with
memcpy().

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
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