// Load the original image
Bitmap src = (Bitmap)Image.FromFile("c:\\input.png");
// Calculate new height and width based on the percentage
int percent = 250; // for example, resize to 250% of the original size
int newWidth = (int)(src.Width * percent / 100.0);
int newHeight = (int)(src.Height * percent / 100.0);
// Create new bitmap object
Bitmap target = new Bitmap(newWidth, newHeight);
// Create graphics from the new image
using (Graphics graphics = Graphics.FromImage(target))
{
// Set the quality of the resizing
graphics.CompositingQuality = CompositingQuality.HighQuality;
graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
graphics.SmoothingMode = SmoothingMode.HighQuality;
// Draw the new image
graphics.DrawImage(src, 0, 0, newWidth, newHeight);
}
// Save the resized image
target.Save("c:\\output.png");