gpt4 book ai didi

c# - 在windows窗体中显示透明gif文件

转载 作者:太空宇宙 更新时间:2023-11-03 11:12:03 24 4
gpt4 key购买 nike

如何在窗口窗体上显示 gif 图像,同时将其设置为透明值(例如 70%)?

最佳答案

您要求的是所谓的 alpha channel 。不幸的是,它不支持 GIF。来自 this article :

TIFF, TGA, PNG, PSD and GIF all support alpha but really only PNG and GIF are used for applications, and the web. Gif, however, uses a special type of alpha. Instead of the alpha channel in a GIF image containing degrees of transparency it only has an on/off transparency. This means that pixels within a GIF image can either be fully opaque or fully transparent. There is no in between.

可以通过编程方式绘制具有自定义不透明度的图像。看这些:

关于c# - 在windows窗体中显示透明gif文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13655743/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com