I have the following code:
Image tmpimg = null;
HttpWebRequest httpWebRequest = (HttpWebRequest)HttpWebRequest.Create(url);
HttpWebResponse httpWebReponse = (HttpWebResponse)httpWebRequest.GetResponse();
Stream stream = httpWebReponse.GetResponseStream();
return Image.FromStream(stream);
On the last line when I type in Image.
, FromStream
isn't in the list. What can I do?
try this one:
More detailed out example with using and the namespaces needed.
Hopefully this saves you some time, since you can just do a quick copy and paste into your solution.
~Cheers!!
You probably need
using System.Drawing;
.btw, you also need to add reference to System.Drawing.dll, only adding using System.Drawing is not enough.