473,394 Members | 1,734 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,394 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 2871

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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.