//load an image Image img = Image.FromFile("image.jpg"); //use the image //dispose the image img.Dispose();
//create a new bitmap image Bitmap bmp = new Bitmap(500, 500); //use the image //dispose the image bmp.Dispose();In this example, we create a new bitmap image with dimensions of 500 x 500 using the `Bitmap` class. We then use the image and dispose of it when we are done using it. In summary, the System Image Dispose method is used to free up resources when using images in our C# code. It is a part of the System.Drawing package library.