#11031: wxMSW/wxImageList: alpha transparency broken if display depth < 32

9 views
Skip to first unread message

wxTrac

unread,
Jul 27, 2009, 8:56:56 AM7/27/09
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/11031>

#11031: wxMSW/wxImageList: alpha transparency broken if display depth < 32
--------------------------+-------------------------------------------------
Reporter: jhoenig | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: wxMSW | Version:
Keywords: transparency | Blockedby:
Patch: 1 | Blocking:
--------------------------+-------------------------------------------------
With runtime display depths less than 32bit, transparent images in a
wxImageList loose their transparency. This also affects controls that use
wxImagelist, such as wxNoteBook or wxTreeCtrl.

While this does not fix all the wxImageList bugs, it fixes the bug most
annoying to me.

See also #9050.


--
Ticket URL: <http://trac.wxwidgets.org/ticket/11031>

wxTrac

unread,
Aug 10, 2009, 4:20:20 PM8/10/09
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/11031#comment:1>

#11031: wxMSW/wxImageList: alpha transparency broken if display depth < 32

----------------------+-----------------------------------------------------
Reporter: jhoenig | Owner:
Type: defect | Status: infoneeded_new


Priority: normal | Milestone:
Component: wxMSW | Version:

Resolution: | Keywords: transparency
Blockedby: | Patch: 1
Blocking: |
----------------------+-----------------------------------------------------
Changes (by vadz):

* status: new => infoneeded_new


Comment:

Sorry, did you attach a wrong file by chance? I don't see the relationship
between the patch and the ticket topic.


--
Ticket URL: <http://trac.wxwidgets.org/ticket/11031#comment:1>

wxTrac

unread,
Aug 10, 2009, 4:34:13 PM8/10/09
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/11031#comment:2>

#11031: wxMSW/wxImageList: alpha transparency broken if display depth < 32

----------------------+-----------------------------------------------------


Reporter: jhoenig | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: wxMSW | Version:

Resolution: | Keywords: transparency
Blockedby: | Patch: 1
Blocking: |
----------------------+-----------------------------------------------------
Changes (by jhoenig):

* status: infoneeded_new => new


Comment:

Replying to [comment:1 vadz]:


> Sorry, did you attach a wrong file by chance? I don't see the
relationship between the patch and the ticket topic.

Fixed, but I do need a vacation.


--
Ticket URL: <http://trac.wxwidgets.org/ticket/11031#comment:2>

wxTrac

unread,
Aug 30, 2009, 2:22:33 PM8/30/09
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/11031#comment:3>

#11031: wxMSW/wxImageList: alpha transparency broken if display depth < 32

----------------------+-----------------------------------------------------
Reporter: jhoenig | Owner:
Type: defect | Status: confirmed

Priority: normal | Milestone:
Component: wxMSW | Version:

Resolution: | Keywords: transparency
Blockedby: 9050 | Patch: 1
Blocking: |
----------------------+-----------------------------------------------------
Changes (by vadz):

* status: new => confirmed
* blockedby: => 9050


Comment:

Thanks for the patch but after testing it myself under 2000, XP and Vista
in both 16 and 32 bpp modes (and even 256 colours under 2000 just to see
what it gives...) I see that without the patch from #9050 it still doesn't
work. So I don't see any sense in applying this as basically we don't gain
anything.

Or did I miss a configuration in which it starts working after this patch?


--
Ticket URL: <http://trac.wxwidgets.org/ticket/11031#comment:3>

wxTrac

unread,
Sep 7, 2009, 6:03:34 AM9/7/09
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/11031#comment:4>

#11031: wxMSW/wxImageList: alpha transparency broken if display depth < 32

----------------------+-----------------------------------------------------
Reporter: jhoenig | Owner:
Type: defect | Status: confirmed

Priority: normal | Milestone:
Component: wxMSW | Version:

Resolution: | Keywords: transparency
Blockedby: 9050 | Patch: 1
Blocking: |
----------------------+-----------------------------------------------------

Comment(by jhoenig):

Here are my results:

- wxWidgets 2.8.9
- don't apply this patch, and don't apply the #9050 patch
- use the patched minimal sample, as in #9050, as example app
- start minimal.exe with Windows XP 16bit and 32bit

Note how the middle image displayed is completely broken in 16bit.
I will attach a 16bit and a 32bit screenshot of my results.


--
Ticket URL: <http://trac.wxwidgets.org/ticket/11031#comment:4>

wxTrac

unread,
Sep 7, 2009, 6:19:49 AM9/7/09
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/11031#comment:5>

#11031: wxMSW/wxImageList: alpha transparency broken if display depth < 32

----------------------+-----------------------------------------------------
Reporter: jhoenig | Owner:
Type: defect | Status: confirmed

Priority: normal | Milestone:
Component: wxMSW | Version:

Resolution: | Keywords: transparency
Blockedby: 9050 | Patch: 1
Blocking: |
----------------------+-----------------------------------------------------

Comment(by jhoenig):

Just wanted to add that the patch here fixes the 16bit display in a way
that it looks like the 32bit display. Of course, it will be still broken
(see #9050), but it is still way better than before.

Once more, Microsoft itself on topic:

[http://msdn.microsoft.com/en-us/library/bb761389(VS.85).aspx#icons]

Imagelists in Microsoft Windows XP and later support the use of 32-bit
anti-aliased icons and bitmaps. Color values use 24 bits, and 8 bits are
used as an alpha channel on the icons. To create an imagelist that can
handle a 32 bits-per-pixel (bpp) image, call the ImageList_Create function
passing in an ILC_COLOR32 flag.


--
Ticket URL: <http://trac.wxwidgets.org/ticket/11031#comment:5>

wxTrac

unread,
Sep 7, 2009, 6:59:55 PM9/7/09
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/11031#comment:6>

#11031: wxMSW/wxImageList: alpha transparency broken if display depth < 32

----------------------+-----------------------------------------------------
Reporter: jhoenig | Owner:
Type: defect | Status: confirmed

Priority: normal | Milestone:
Component: wxMSW | Version:

Resolution: | Keywords: transparency
Blockedby: 9050 | Patch: 1
Blocking: |
----------------------+-----------------------------------------------------

Comment(by vadz):

Ok, "better" is correct, this is the same as I see and it's indeed better
-- just still bad/broken. I guess I agree that there is no reason to not
apply this patch, it's just that it really doesn't help all that much
until we fix #9050 itself.

Anyhow, thanks for it and for testing, will apply to the trunk soon.


--
Ticket URL: <http://trac.wxwidgets.org/ticket/11031#comment:6>

wxTrac

unread,
Sep 7, 2009, 7:00:38 PM9/7/09
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/11031#comment:7>

#11031: wxMSW/wxImageList: alpha transparency broken if display depth < 32

----------------------+-----------------------------------------------------
Reporter: jhoenig | Owner:
Type: defect | Status: closed

Priority: normal | Milestone:
Component: wxMSW | Version:

Resolution: fixed | Keywords: transparency


Blockedby: 9050 | Patch: 1
Blocking: |
----------------------+-----------------------------------------------------

Changes (by VZ):

* status: confirmed => closed
* resolution: => fixed


Comment:

(In [61853]) Always use 32bpp image lists.

Using 32bpp image lists (ILC_COLOR32) is required as we need to be able to
put
32bpp bitmaps in them and results in better (albeit still broken, see
#9050)
display when the display depth is < 32.

This change was tested under Windows 2000, 2003 and Vista in 8 (Win2k-
only),
16 and 32bpp display depth modes.

Closes #11031.


--
Ticket URL: <http://trac.wxwidgets.org/ticket/11031#comment:7>

Reply all
Reply to author
Forward
0 new messages