Resizing a Picture or an Image

The following code illustrates the simple way to resize an image
 

var originalbmp = new Bitmap(Bitmap.FromFile("../../originalImage.png")); // Load a image to resize

var resizedbmp = new Bitmap(originalbmp , originalbmp .Width * 5, originalbmp .Height * 5); //  Resize the image into 5 times to its actual size
resizedbmp.Save("../../ResizedImage.png", ImageFormat.Png); // Save the image

Now the saved image is 5 times bigger in size than the original image

Ebook Download
View all
Learn
View all