Delphi 6 support for toolbar and menu icons with alpha channel transparency

纵饮孤独 提交于 2019-12-11 11:49:19

问题


We have a legacy application developed in Delphi 6 (yes, I know this is an ancient IDE now), which we are trying to update to look more modern. We have added in a Manifest and now have it using version 6 Windows controls and taking on the Windows Visual Theme (all good).

However, when trying to replace the old 4 bit toolbar and menu icons with True Colour with Alpha Channel (32 bit) transparency we have hit a problem. It appears that Delphi 6 only supports transparency based on the bottom left pixel colour (http://delphi.about.com/od/delphitips2007/qt/timage_transp.htm) and does not support more modern alpha-blended transparency. This is causing an issue, as all the graphics we have had created are in this format and do not look good when added to the toolbar due to anti-aliasing creating a fringe effect (in the background colour on which they were created, transparent becomes white in this case) around them.

I have been scouring the internet for hours trying to confirm whether or not Delphi 6 does or can be made to support these image formats, but, as Delphi 6 is so old now, I am only finding references to Delphi 7 and above.

Can anyone confirm whether what we are trying to achieve is possible or if there are any workarounds for this apparent limitation? Please note that upgrading to a newer version of Delphi is not an option for this particular project due to limited budget and time.

来源:https://stackoverflow.com/questions/33291064/delphi-6-support-for-toolbar-and-menu-icons-with-alpha-channel-transparency

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!