开发者

How to create a blank png image in vb.net

开发者 https://www.devze.com 2023-03-14 01:21 出处:网络
This seems so trivial, yet I cannot find where or how to do this. i need to be able to create o开发者_开发问答n the fly blank png in a WPF project. Size of the png does not matter, I just need to be

This seems so trivial, yet I cannot find where or how to do this.

i need to be able to create o开发者_开发问答n the fly blank png in a WPF project. Size of the png does not matter, I just need to be able to create one and save it on a specifiy path by pressing a button.

For some reason, I can't find it anywhere.


You can create a Bitmap object and manipulate it as you need. The Bitmap object has a Save method that let's you specify what file format to save it as, one choice being Png.

http://msdn.microsoft.com/en-us/library/system.drawing.bitmap.aspx


try:

bm.Save(filename, Imaging.ImageFormat.Png);
0

精彩评论

暂无评论...
验证码 换一张
取 消