开发者

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");
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜