Resizing a Bitmap image (C#)
This example shows how you can resize a Bitmap image.
private static Bitmap ResizeBitmap(Bitmap sourceBMP, int width, int height )
{
Bitmap result = new Bitmap(width, height);
using (Graphics g = Graphics.FromImage(result))
g.DrawImage(sourceBMP, 0, 0, width, height);
return result;
}
{
Bitmap result = new Bitmap(width, height);
using (Graphics g = Graphics.FromImage(result))
g.DrawImage(sourceBMP, 0, 0, width, height);
return result;
}
