Delphi - Populate an imagelist with icons at runtime 'destroys' transparency
Posted
by ben
on Stack Overflow
See other posts from Stack Overflow
or by ben
Published on 2010-06-16T20:21:12Z
Indexed on
2010/06/17
1:02 UTC
Read the original article
Hit count: 396
Hi again,
I've spended hours for this (simple) one and don't find a solution :/
I'm using D7 and the TImageList. The ImageList is assigned to a toolbar. When I populate the ImageList at designtime, the icons (with partial transparency) are looking fine. But I need to populate it at runtime, and when I do this the icons are looking pretty shitty - complete loose of the partial transparency.
I just tried to load the icons from a .res file - with the same result. I've tried third party image lists also without success. I have no clue what I could do :/ Thanks 2 all ;)
edit:
To be honest I dont know exactly whats going on. Alpha blending is the correkt term... Here are 2 screenies:
Icon added at designtime:
Icon added at runtime:
Your comment that alpha blending is not supported just brought the solution: I've edited the image in an editor and removed the "alpha blended" pixels - and now it looks fine. But its still strange that the icons look other when added at runtime instead of designtime. If you (or somebody else ;) can explain it, I would be happy ;) thanks for you support!
© Stack Overflow or respective owner