TheLetti wrote:
> How can I do that? I have the thumbnail already in a
> System.Drawing.Image object, but I have no clue how to add this white
> border, or even how to create the empty 80 x 80 white picture first,
> where I want to draw my thumbnail into. I looked already for the
> classes Bitmap, DrawImage, Graphics (all in namespace System.Drawing),
> but couldn't find any appropriate method.
Try that...
// create a new bitmap
Bitmap bmp = new Bitmap(200, 200);
// get a Graphics object for drawing on the bitmap
Graphics g = Graphics.FromImage(bmp);
// draw on it
g.FillRectangle(Brushes.White, 0, 0, bmp.Width, bmp.Height);
g.FillEllipse(Brushes.Red, 0, 0, bmp.Width, bmp.Height);
// save it, or put it in a picturebox,...
bmp.Save(@"C:\MyImage.bmp", ImageFormat.Bmp);
|