Bitmap image = new Bitmap(@"C:\Images\example.jpg");
Bitmap image = new Bitmap(800, 600);
Bitmap image = new Bitmap(@"C:\Images\example.jpg"); // Change the width of the image image = new Bitmap(image, new Size(1000, image.Height));This code loads an existing image and then modifies its width to 1000 pixels, while keeping its original height. This demonstrates how to use the Bitmap constructor to create a new Bitmap object that is a modified version of an existing image. Package/Library: System.Drawing Namespace