int width = 100;
int height = 100;
Bitmap bitmap = new Bitmap(width, height);
//bitmap里面要有图片,自定义,我就不贴了
//前一段为保存路径加文件名,后一段为保存格式,我这里保存为bmp格式,也可以为.jpeg或者.png之类的
bitmap.Save(@"D:\bmp\test.bmp", System.Drawing.Imaging.ImageFormat.Bmp);
或者
int width = 100;
int height = 100;
Bitmap bitmap = new Bitmap(width, height);
//bitmap里面要有图片,自定义,我就不贴了
//前一段为保存路径加文件名,后一段为保存格式,我这里保存为bmp格式,也可以为.jpeg或者.png之类的
string path = "D:\\bmp\\test.bmp";
bitmap.Save(path, System.Drawing.Imaging.ImageFormat.Bmp);