How to get image from Webbrowser page

P

Paul S

Hi

How can I programmatically save an image from a page locally?

The same as right-click the image and select 'Save as'

Tanks Paul S
 
S

siccolo

Hi

How can I programmatically save an image from a page locally?

The same as right-click the image and select 'Save as'

Tanks Paul S

do you mean something like this: ?

System.Net.HttpWebRequest httpRequest = (HttpWebRequest)
System.Net.WebRequest.Create(imageURL);
System.Net.HttpWebResponse httpResponse =
(HttpWebResponse) httpRequest.GetResponse();
System.IO.Stream httpResponseStream =
httpResponse.GetResponseStream();

System.Drawing.Image imageIn =
System.Drawing.Image.FromStream(httpResponseStream);

httpResponseStream.Close();
httpResponse.Close();


more at http://www.siccolo.com/articles.asp
 
P

Paul S

Hi Siccolo

I think this is close, but it looks as if you see the url to only contain
the image. The image is contained in a page. I know both name of the image
and the structure of the page. It does not change - only the image - it's a
weather report and for scurity reason this is the only way I can get the
image.

Thanks for the effort
Paul S
 
P

Paul S

Sorry Mark
What would the proper forum be then ?

Paul S
Mark Rae said:
"Patrice" <http://www.chez.com/scribe/> wrote in message

[top-posting corrected]
"Paul S" <[email protected]> a écrit dans le message de
groupe de discussion :
(e-mail address removed)...

Not familiar with the web browser control but yes, you shouldn't have
those limitations that applies to a stand alone browser as you are working
from your own application.

If that's the case, then I misinterpreted the OP and believed that he was
referring to a browser-based app since he posted in the ASP.NET newsgroup...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,273
Latest member
DamonShoem

Latest Threads

Top