how to quickly create dummy image directly in .NET code
How to quickly create some random image with the icon size?
I don't want to use neither Image.开发者_C百科FromFile
, nor Image.FromStream
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");
}
精彩评论