How to Resize an Bitmap Image in C# ?


This content was proof-read by Grammarly. You can Try Grammary for FREE

Below is a sample code snippet that demonstrates how to resize an Bitmap Image in C#.

How to Resize an Bitmap Image in C# ?

void ACBtn_Click(object sender, EventArgs e)
{
    Image InputImage = Image.FromFile(@"D:\Abundantcode\Rajnikanth.bmp");
    using(var resizedBmp = new Bitmap(InputImage, new Size(100, 100)))
    {
        resizedBmp.Save(@"D:\Abundantcode\Rajnikanth_New.bmp", InputImage.RawFormat);
    }
}
%d bloggers like this: