如何在Delphi中的BitBtn上放置GIF / PNG / ...图像?

时间:2022-03-15 21:22:53

I'm using Delphi 2007. How can I put a GIF/PNG image on a BitBtn component? (Preferably, with alpha transparency supported)

我正在使用Delphi 2007.如何在BitBtn组件上放置GIF / PNG图像? (最好支持alpha透明度)

4 个解决方案

#1


6  

PngComponents pack has a component named PngBitBtn wich can display correctly PNG's with alpha transparency. They are somewhat old, but they can be installed under Delphi 2007 with a little work.

PngComponents包有一个名为PngBitBtn的组件,它可以正确显示带有alpha透明度的PNG。它们有些陈旧,但它们可以安装在Delphi 2007下,只需要一点点工作。

#2


3  

Use a graphics program like Photoshop (or something less expensive) to convert the images to bitmaps. BitBtns don't accept GIF or PNG images.

使用像Photoshop这样的图形程序(或更便宜的东西)将图像转换为位图。 BitBtns不接受GIF或PNG图像。

#3


2  

PNG support is only fully supported by Delphi 2009. There is a freeware package (licensed as MPL 1.1) named GraphicEx which will allow you to load the images at design time/runtime, but you will not get the alpha blended transparency on the button in Delphi 2007.

Delphi 2009完全支持PNG支持。有一个名为GraphicEx的免费软件包(许可为MPL 1.1),它允许您在设计时/运行时加载图像,但是您不会在按钮上获得alpha混合透明度德尔福2007。

#4


0  

PNGimage, which is included in Delphi 2009k, should do the job. If we can find it.

包含在Delphi 2009k中的PNGimage应该可以完成这项工作。如果我们能找到它。

#1


6  

PngComponents pack has a component named PngBitBtn wich can display correctly PNG's with alpha transparency. They are somewhat old, but they can be installed under Delphi 2007 with a little work.

PngComponents包有一个名为PngBitBtn的组件,它可以正确显示带有alpha透明度的PNG。它们有些陈旧,但它们可以安装在Delphi 2007下,只需要一点点工作。

#2


3  

Use a graphics program like Photoshop (or something less expensive) to convert the images to bitmaps. BitBtns don't accept GIF or PNG images.

使用像Photoshop这样的图形程序(或更便宜的东西)将图像转换为位图。 BitBtns不接受GIF或PNG图像。

#3


2  

PNG support is only fully supported by Delphi 2009. There is a freeware package (licensed as MPL 1.1) named GraphicEx which will allow you to load the images at design time/runtime, but you will not get the alpha blended transparency on the button in Delphi 2007.

Delphi 2009完全支持PNG支持。有一个名为GraphicEx的免费软件包(许可为MPL 1.1),它允许您在设计时/运行时加载图像,但是您不会在按钮上获得alpha混合透明度德尔福2007。

#4


0  

PNGimage, which is included in Delphi 2009k, should do the job. If we can find it.

包含在Delphi 2009k中的PNGimage应该可以完成这项工作。如果我们能找到它。