I work in C#, .Net 4.0, but I have a Windows Forms application.
I want to create Image object from Uri. Every link I found was about WPF applications, but I work in Windows Forms.
Image x = new Image();
//this doesn't work for me
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your code simply creates a new
Imageobject with default properties. I don’t see where you try to use aUriat all.Use
WebClient.OpenReadto get a stream from theUriandImage.FromStreamto get an image from it.