blah blah blah is here! blah blah » Close

up0down
link

How do I load an image from a file, into an instance of the System.Drawing.Image class?

last answered 2 years ago

1 answers

up0down
link

Typically, you'd do something like this to load the image and then (say) display it in a picturebox:

Image img = Image.FromFile(filePath);
pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
pictureBox1.Image = img;

Feedback