Can you make an alpha transparent PNG with C#?

后端 未结 9 1744
陌清茗
陌清茗 2020-12-02 14:31

I have a multi-browser page that shows vertical text.

As an ugly hack to get text to render vertically in all browsers I\'ve created a custom page handler that retur

9条回答
  •  南方客
    南方客 (楼主)
    2020-12-02 14:58

    You should at least specify a 32bits pixel format (ex: PixelFormat.Format32bppArgb) when creating your bitmap, otherwise GDI+ cannot manage transparency.

    To tune the resulting file when saving, you can use Save with ImageCodecInfo and EncoderParameters.

提交回复
热议问题