Last post Oct 26, 2010 10:52 AM by lifeizchocolate
Member
73 Points
1041 Posts
Oct 26, 2010 09:06 AM|Jelmer850i|LINK
How can i get a Image that exitsts on the WWW, into my project. Normally i get a image on this way:
System.Drawing.Image ImgWatermerk = System.Drawing.Image.FromFile(PNGPath);
But right now the image is remote like http://www.google.nl/google.jpg
Contributor
2380 Points
688 Posts
Oct 26, 2010 09:56 AM|vipuldonga|LINK
Hi,
For that you can refer this link
http://www.java2s.com/Code/CSharp/2D-Graphics/ImageFromStreamloadimagefromstream.htm
110 Points
43 Posts
Oct 26, 2010 10:52 AM|LifeiZChocolate|LINK
System.Net.WebRequest img = System.Net.WebRequest.Create("http://www.google.nl/google.jpg");
System.Net.WebResponse resImg = img.GetResponse();
System.Drawing.Image ImgWatermerk = System.Drawing.Image.FromStream(resImg.GetResponseStream());
image streaming
Member
73 Points
1041 Posts
Get Image from HTTP in a System.Drawing.Image
Oct 26, 2010 09:06 AM|Jelmer850i|LINK
How can i get a Image that exitsts on the WWW, into my project.
Normally i get a image on this way:
System.Drawing.Image ImgWatermerk = System.Drawing.Image.FromFile(PNGPath);
But right now the image is remote like http://www.google.nl/google.jpg
Contributor
2380 Points
688 Posts
Re: Get Image from HTTP in a System.Drawing.Image
Oct 26, 2010 09:56 AM|vipuldonga|LINK
Hi,
For that you can refer this link
http://www.java2s.com/Code/CSharp/2D-Graphics/ImageFromStreamloadimagefromstream.htm
Vipul Donga
Mark it as an answer, if it helped
if (MyAnswer)
MarkAsAnswer();
else
Repsonse.Write("correct me where i am wrong");
Member
110 Points
43 Posts
Re: Get Image from HTTP in a System.Drawing.Image
Oct 26, 2010 10:52 AM|LifeiZChocolate|LINK
System.Net.WebRequest img = System.Net.WebRequest.Create("http://www.google.nl/google.jpg");
System.Net.WebResponse resImg = img.GetResponse();
System.Drawing.Image ImgWatermerk = System.Drawing.Image.FromStream(resImg.GetResponseStream());
image streaming