473,322 Members | 1,347 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Saving images from the web with GetResponseStream()

I'm saving pictures on my harddrive from our webcam with GetResponseStream()
.. Everything works fine, but after approximately 1h identical images are
being saved. I checked the webpage but those pictures are still being
refreshed.

Code snippet:
req = (System.Net.HttpWebRequest) System.Net.WebRequest.Create(fullpath);
req.Credentials = System.Net.CredentialCache.DefaultCredentials;
// Return request in a response stream
res = (System.Net.HttpWebResponse) req.GetResponse();
System.IO.Stream str = res.GetResponseStream();
if(str!=null)
{
Image img = Image.FromStream(str);
img.Save(fileName, System.Drawing.Imaging.ImageFormat.Jpeg);
}
Jul 22 '05 #1
0 2869

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Umesh | last post by:
Hi, I have an Application, in which 1) need to post data to a URL(Remote Server), by using HTTPRequest. 2) get the Image data in the form of Stream in Response. 3) need to save this stream as a...
2
by: thedebugger | last post by:
Dear Friends, I am making one RSS News Reader Desktop application in c#. Where I will show the images from website. I am generating xml file on server. like http://www.zeetelevision.com/myxml.xml...
4
by: | last post by:
I cant seem to find the commmand that I can use to save an image file from a url to my local harddrive. I am looking to save a jpg from a webpage that I have screen scraped. I have a web...
5
by: Thaynann | last post by:
I have an app that (at the moment) moves through files that are on a web site, and deletes them, wat i want to do for the next stage, is to be able to download each file before i delete it. i...
0
by: Umesh | last post by:
Hi Gurus, I have an Application, in which 1) need to post data to a URL(Remote Server), by using HTTPRequest. 2) get the Image data in the form of Stream in Response. 3) need to save this...
0
by: Mattias | last post by:
I'm saving pictures on my harddrive from our webcam with GetResponseStream() .. Everything works fine, but after approximately 1h identical images are being saved. I checked the webpage but those...
1
by: M Keeton | last post by:
I currently have a picture which is stored in a "System.Drawing.Image" variable and I want to save it as a bitmap file. I have tried 2 different approaches and both give me the following error: ...
0
by: =?Utf-8?B?Sm9lIFRhdmFyZXM=?= | last post by:
I have an app that downloads a number of images from a web server and displays them. In addition to displaying the images, I also wish to "cache" them by saving them locally to disk -...
6
by: Eddie | last post by:
Hi all, I am displaying a number of reports, and giving the users an option to display them on the web or download them to Excel. If they want the Excel file, I just use the PHP header command...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.