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);