René Nyffenegger's collection of things on the web | |
René Nyffenegger on Oracle - Most wanted - Feedback
|
Creating a bitmap in memory with .NET | ||
using System.Drawing; using System.Drawing.Imaging; class BitmapInMem { static void Main() { Bitmap bitmap = new Bitmap(800,600,PixelFormat.Format32bppArgb); Graphics g = Graphics.FromImage(bitmap); g.DrawRectangle(new Pen(Color.Yellow,3),10,10,700,500); bitmap.Save("c:\\temp\\generated.bmp"); } } |