delphi TBitmap是否支持alpha通道
我听人们说事实并非如此。
但是,我创建了一个 TBitmap 并清除了整个区域,
For I := 1 to bmp.Width do
For J := 0 to bmp.Height do
bmp.canvas.Pixels[I,J]:= $00000000;
然后我将抗锯齿文本绘制到位图上并将其保存到文件中。在 gimp 中打开它后,它会显示透明度信息。
有人对此有明确的答案吗?如果它确实有效,那么有关它如何工作的更多信息?我尝试过使用最后一个字节,但当我在 gimp 中打开它时,我没有得到预期的结果。
I'm hearing people say that it is not.
However, I created a TBitmap and cleared the entire area by
For I := 1 to bmp.Width do
For J := 0 to bmp.Height do
bmp.canvas.Pixels[I,J]:= $00000000;
Then I drew anti-aliased text onto the bitmap and saved it to file. Upon opening it in gimp it shows the transparency information.
Does anyone have a definitive answer on this and if it does work then more information on how it works? I've tried playing around with the last byte and I'm not getting the expected results when i open it in gimp.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
可以,但是你必须设置
It does, but you have to set
Delphi TBitmap 只是 Windows BITMAP 对象的包装器。所以,是的,它确实支持 Alpha 通道,但显然您必须适当地设置 PixelFormat 属性。
The Delphi TBitmap is just a wrapper around the Windows BITMAP object. So, yes it does support alpha channels, but clearly you must set the PixelFormat property appropriately.