On Sat, 2009-05-02 at 22:56 +0200, Roderick Colenbrander wrote: > On Sat, May 2, 2009 at 8:57 PM, Joel Holdsworth > <[email protected]> wrote: > > On Sat, 2009-05-02 at 20:38 +0200, Roderick Colenbrander wrote: > >> On Sat, May 2, 2009 at 6:55 PM, Joel Holdsworth > >> <[email protected]> wrote: > >> > Hi All, > >> > > >> > I've hit a bit of a wall with alpha blended icons. CreateIcon is working > >> > fine for icon creation, but ExtractIcon and LoadIconFromResource etc. > >> > are all proving more of a problem. All of these use various GDI DIB > >> > functions to coerce the icon bitmap to the correct colour depth and > >> > size. The problem is that preserving the alpha channel through these DIB > >> > functions seems to be impossible because they go via X11, so until the > >> > dib engine is merged (after hell freezes over) I'm not sure I can go > >> > much further. > >> > > >> > Joel > >> > > >> > > >> > > >> > > >> > > >> > >> If you say X11 might be problematic note that more and more display > >> drivers are offering visuals with alpha, so 32-bit ones instead of > >> 24-bit. You could force the selection of such a visual in winex11.drv > >> for testing. > >> > >> Roderick > > > > Is that right? I simply assumed it would screw it up. If the problem can > > be solved with fixes to user32 or gdi32, then I can probably find the > > solution. If it involves work on winex11, then I'm not really the right > > guy for the job. > > > > > > > > Why again did you need this specific alphablend method? The icon can't > be converted to use some basic color keying for transparency or so?
The reason is that the outlines will look aliased, and there will be no drop-shadows - without alpha the Tango icons won't look better than the current set. Also, I figured that icon rendering should be fixed for the sake of wine as a whole - which I think it should. It seems like a good little task for a wine beginner, and indeed I've made a lot of progress - I'm just a bit stuck. The culprit is a transfer through StretchDIBits in user32 which strips the alpha channel. I can't see a way round it - using StretchBlt doesn't help, and neither does GdiTransparentBlt. Another insentive: I suspect fixing this would also fix bug #201 which is now over 8 years old!
