Quantcast
Channel: Convert "String" to "System.Drawing.Image" in Visual C#
Viewing all articles
Browse latest Browse all 5

Convert "String" to "System.Drawing.Image" in Visual C#

$
0
0

Perhaps this will work for you?  Not sure if I read correctly what you were trying to do.

string myFile = "image1.png"; //assuming this is a path to your image. 
            Image newImage = Image.FromFile(myFile);
            pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
            pictureBox1.Image = newImage;


~Christine


Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>