ASP.NET download remote image from remote server via http
Posted on 2011-02-26
I'm trying to download an image from a remote website via http. What I've got so far is
WebRequest wr = WebRequest.Create(src);
Image img = Image.FromStream(wr.GetResponse().GetResponseStream());
I got this code from an example I found on online. But the Image class doesn't seem to have a From Stream method.
How do I convert the response stream into an image that I can save to my web server?