1
votes

I have PNG icons for my Delphi XE3 application toolbar that, when added to a TActionToolbar via a TImageList, the alpha channel renders darker than it should, causing the icons to look bad. I think the issue has to do with the TImageList and not something specifically with the TActionToolbar.

Photoshop mockup:

Photoshop mockup

Actual look after importing to TActionToolbar (alpha is darker blue for the folder fill):

Actual

Here are my Delphi Object Inspector settings for the TImageList (no, the issue is not the BlendColor property):

TImageList Object Inspector

Is there a way to get Delphi/Windows/whoever the culprit is to render the alpha channel properly? An option is to make the icons all bitmaps, but I'd rather not go through the headache of editing bitmaps with a transparent color because, well, I'd rather not revert to the days of the dinosaurs... TIA.

1
Set the TImageList.ColorDepth to cd32bit.Ken White
@KenWhite It's set to cd32Bit (the screenshot I posted).spurgeon
Sorry. The proxy I'm behind doesn't let the images through, so I thought your screenshot most likely was of the image itself. :-)Ken White

1 Answers

0
votes

The best way I found to deal with this is to paint the background color of your Delphi toolbar (or whatever UI element) underneath every pixel that contains transparency in Photoshop before saving the PNG image. This way, the toolbar icons are totally opaque except for the 100% transparent pixels, so there is no alpha blending that takes place--and hence no ugliness.

Use RRUZ's code here to make the disabled toolbar icons look better.