如何使用图标大小快速创建一些随机图像?
我不想既不使用Image.FromFile
,也不想使用Image.FromStream
答案 0 :(得分:5)
int width = 50;
int height = 50;
using (Bitmap bitmap = new Bitmap(width, height))
{
// do something to the bitmap
// perhaps use .SetPixel to maybe apply some color
bitmap.Save("C:\\Temp\\random.bmp");
}