How do you Draw Transparent Image using System.Drawing?

前端 未结 4 1744
孤独总比滥情好
孤独总比滥情好 2020-12-17 19:02

I\'m trying to return a transparent GIF from an .aspx page for display within a web page. I am trying to get the image to have transparency, but I just keep getting Black be

4条回答
  •  庸人自扰
    2020-12-17 19:16

    Unfortunately, there is no easy way to create a transparent Gif using a Bitmap object. (See this KB article)

    You can alternatively use the PNG format that supports transparency with the code you are using.

提交回复
热议问题