http://bugs.winehq.org/show_bug.cgi?id=12230
Summary: Palringo: Alpha images aren't displayed correctly Product: Wine Version: 0.9.52. Platform: PC URL: http://www.palringo.com OS/Version: Linux Status: UNCONFIRMED Severity: trivial Priority: P2 Component: winex11.drv AssignedTo: wine-bugs@winehq.org ReportedBy: andrew@palringo.com CC: stefan@codeweavers.com
Created an attachment (id=11663) --> (http://bugs.winehq.org/attachment.cgi?id=11663) Simple patch to display images correctly
Previous to the patch
http://source.winehq.org/git/wine.git/?a=commitdiff;h=ccab10bd46d129e469b36a...
the alpha bitmaps appeared correctly, however, since then they now show as black/white images. It appears that the alpha mask being applied to the image is being used as the image.
The error reported to the console is
err:x11drv:X11DRV_CreateBitmap Trying to make bitmap with planes=1, bpp=24
The screenshots for the Palringo application show how the images look without the patch ( http://appdb.winehq.org/objectManager.php?sClass=version&iId=10970 )
http://bugs.winehq.org/show_bug.cgi?id=12230
Lei Zhang thestig@google.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download
http://bugs.winehq.org/show_bug.cgi?id=12230
--- Comment #1 from Andrew Smith andrew@palringo.com 2008-04-03 08:47:07 --- Any follow up on this? Or the attached patch?
http://bugs.winehq.org/show_bug.cgi?id=12230
Stefan Dösinger stefandoesinger@gmx.at changed:
What |Removed |Added ---------------------------------------------------------------------------- CC|stefan@codeweavers.com |stefandoesinger@gmx.at
http://bugs.winehq.org/show_bug.cgi?id=12230
--- Comment #2 from Stefan Dösinger stefandoesinger@gmx.at 2008-04-10 03:41:08 --- The stefan@codeweavers.com account is disabled because I still use my pre-CW bugzilla account.
The patch does not look correct, the bit depth has to match exactly. I suspect that somewhere else in the code an incorrect depth gets assigned.
http://bugs.winehq.org/show_bug.cgi?id=12230
--- Comment #3 from Andrew Smith andrew@palringo.com 2008-04-10 03:49:54 --- Ah, sorry about that.
Did you mean in the WINE code? Or the Palringo client code? Either way is there anything I can do to track the problem down and help fix this?
http://bugs.winehq.org/show_bug.cgi?id=12230
--- Comment #4 from Stefan Dösinger stefandoesinger@gmx.at 2008-04-10 04:29:43 --- In the wine code.
You can track down where bitmap.bmBitsPixel comes from
http://bugs.winehq.org/show_bug.cgi?id=12230
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |andrude27@verizon.net
--- Comment #5 from Austin English austinenglish@gmail.com 2008-04-20 02:10:26 --- *** Bug 12636 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=12230
--- Comment #6 from Andrew Smith andrew@palringo.com 2008-04-22 04:48:13 --- Created an attachment (id=12385) --> (http://bugs.winehq.org/attachment.cgi?id=12385) Cut of log when creating images
I've cut a bit of log from WINEDEBUG=+bitmap,x11drv. On line 178 the image is initially created (as 24bpp) then a second mask image is created at 1bpp, these are then passed to CreateIconIndirect to create the final icon that should be displayed.
It seems that WINE doesn't like this though since it's created at 24bpp. This shouldn't be a problem though, since in Windows the image still display correctly (as it does in WINE if the check isn't as strict).
If there's anything else I can check let me know (I'm not even sure if this is at all useful, but I hope it is :) )
http://bugs.winehq.org/show_bug.cgi?id=12230
--- Comment #7 from Andrew Smith andrew@palringo.com 2008-04-25 06:13:59 --- I've had a little look further and found that CreateIconIndirect creates a 24bpp icon (getting it's depth from bmpXor), I was wondering if this shouldn't be set to the screen depth?
Changing it though results in a corrupted image, so perhaps upscaling the 24bpp image that's created? Alas, I'm not sure how to do this. Any pointers?
http://bugs.winehq.org/show_bug.cgi?id=12230
--- Comment #8 from Andrew Smith andrew@palringo.com 2008-05-13 09:12:37 --- Created an attachment (id=13012) --> (http://bugs.winehq.org/attachment.cgi?id=13012) Icon creation unit test
This is a simple unit test of the DrawIconEx function. It should produce 2 blue boxes, however, with WINE git it gives a blue box on the left and a black box on the right.
http://bugs.winehq.org/show_bug.cgi?id=12230
Andrew Smith andrew@palringo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #11663|0 |1 is obsolete| |
--- Comment #9 from Andrew Smith andrew@palringo.com 2008-05-13 09:20:23 --- Created an attachment (id=13013) --> (http://bugs.winehq.org/attachment.cgi?id=13013) Fix for display bpp test
Some X11 drivers support a depth of 24bpp while the actual bpp of the screen is 32.
Instead of assuming the depth of the screen should be the same as the pixmap being created, we query the X11 driver beforehand, and check the bpp of the pixmap is compatible with the current display.
With this the test, previously attached, produces the expected result.
http://bugs.winehq.org/show_bug.cgi?id=12230
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch, testcase
http://bugs.winehq.org/show_bug.cgi?id=12230
--- Comment #10 from Alexandre Julliard julliard@winehq.org 2008-05-13 14:21:27 --- The patch is not correct, the icon code needs to be fixed to only create screen-compatible bitmaps.
http://bugs.winehq.org/show_bug.cgi?id=12230
--- Comment #11 from Alexandre Julliard julliard@winehq.org 2008-05-20 14:37:41 --- Created an attachment (id=13204) --> (http://bugs.winehq.org/attachment.cgi?id=13204) Use screen depth bitmaps for icons.
Please give this a try.
http://bugs.winehq.org/show_bug.cgi?id=12230
--- Comment #12 from Andrew Smith andrew@palringo.com 2008-05-21 03:17:35 --- http://bugs.winehq.org/attachment.cgi?id=13204 - testing that now against git head and it works beautifully. All the icons were display correctly and no error messages displayed :)
Can this be committed to 1.0.0? or is the diff to big/dangerous?
Thanks :)
http://bugs.winehq.org/show_bug.cgi?id=12230
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #13 from Alexandre Julliard julliard@winehq.org 2008-05-21 05:22:59 --- It's a bit dangerous but since this is a regression I committed it anyway. We'll see what happens...
http://bugs.winehq.org/show_bug.cgi?id=12230
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #14 from Alexandre Julliard julliard@winehq.org 2008-05-23 10:38:09 --- Closing bugs fixed in 1.0-rc2.