在vb .net中绘制并保存png

时间:2010-10-01 22:31:46

标签: .net vb.net

我怎样才能创建一个最初完全透明的位图。然后我想做一些绘图,比如g.drawImage(),然后我想把它保存为png。我怎么能这样做?

由于

1 个答案:

答案 0 :(得分:3)

Dim bmp As New Bitmap(width, height)
Dim g As Graphics = Graphics.FromImage(bmp)
g.Clear(Color.Transparent)

''Perform Drawing here

bmp.Save("ZOMG AMAZING DRAWING.png", System.Drawing.Imaging.ImageFormat.Png)