473,386 Members | 1,712 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,386 software developers and data experts.

retrieve a picture from a website and save to disk

Here is a simple problem, havent worked much with HTTP streams so haven't
done this yet... I want to access a picture located at
http://www.somesite.com/images/imagename.jpg then save it to a local file.
how would i do this? thanks!
Nov 21 '05 #1
5 1362
"Brian Henry" <br**********@newsgroups.nospam> schrieb:
I want to access a picture located at
http://www.somesite.com/images/imagename.jpg then save it to a local file.


Take a look at 'WebClient.DownloadFile'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #2
Brian,

In this case depending on security etc, you mostly can use
webclient.downloadfile

http://msdn.microsoft.com/library/de...dfiletopic.asp

It is easier to use than as you would expect reading the sample on this link
above

Dim myWebClient As New WebClient()
myWebClient.downloadfile _(
"http://www.somesite.com/images/imagename.jpg","C:\myimage.jpg")

That is all

I hope this helps?

Cor


"Brian Henry" <br**********@newsgroups.nospam>
Here is a simple problem, havent worked much with HTTP streams so haven't
done this yet... I want to access a picture located at
http://www.somesite.com/images/imagename.jpg then save it to a local file.
how would i do this? thanks!

Nov 21 '05 #3
"Brian Henry" <br**********@newsgroups.nospam> schrieb:
I want to access a picture located at
http://www.somesite.com/images/imagename.jpg then save it to a local file.


Take a look at 'WebClient.DownloadFile'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #4
that actually is amazingly simple thanks!

"Cor Ligthert" <no************@planet.nl> wrote in message
news:e%******************@TK2MSFTNGP12.phx.gbl...
Brian,

In this case depending on security etc, you mostly can use
webclient.downloadfile

http://msdn.microsoft.com/library/de...dfiletopic.asp

It is easier to use than as you would expect reading the sample on this
link above

Dim myWebClient As New WebClient()
myWebClient.downloadfile _(
"http://www.somesite.com/images/imagename.jpg","C:\myimage.jpg")

That is all

I hope this helps?

Cor


"Brian Henry" <br**********@newsgroups.nospam>
Here is a simple problem, havent worked much with HTTP streams so haven't
done this yet... I want to access a picture located at
http://www.somesite.com/images/imagename.jpg then save it to a local
file. how would i do this? thanks!


Nov 21 '05 #5
that actually is amazingly simple thanks!

"Cor Ligthert" <no************@planet.nl> wrote in message
news:e%******************@TK2MSFTNGP12.phx.gbl...
Brian,

In this case depending on security etc, you mostly can use
webclient.downloadfile

http://msdn.microsoft.com/library/de...dfiletopic.asp

It is easier to use than as you would expect reading the sample on this
link above

Dim myWebClient As New WebClient()
myWebClient.downloadfile _(
"http://www.somesite.com/images/imagename.jpg","C:\myimage.jpg")

That is all

I hope this helps?

Cor


"Brian Henry" <br**********@newsgroups.nospam>
Here is a simple problem, havent worked much with HTTP streams so haven't
done this yet... I want to access a picture located at
http://www.somesite.com/images/imagename.jpg then save it to a local
file. how would i do this? thanks!


Nov 21 '05 #6

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

Similar topics

2
by: S. Stilwell | last post by:
I'm trying to write a small program that will go to a particular web site and download an image file on a schedule. I just need to know how to save the file to disk from a website. Any help would...
7
by: Giulio Cespuglio | last post by:
Hi there, I would like to save to disk a picture contained in a webpage. Unfortunately the image is dynamic, so the url is actually a query which looks like ...
3
by: | last post by:
I have an interactive mapping website where there is a main map image. For the map image, I over-rode the default right click menu to provide a popup menu for mapping tools. Now my client has asked...
48
by: Edwin Quijada | last post by:
Hi !! Everybody I am developing app using Delphi and I have a question: I have to save pictures into my database. Each picture has 20 o 30k aprox. What is the way more optimus? That 's table will...
5
by: Steve | last post by:
Hi Can anyone tell me if it is possible to save a picture stored in an OLE objects on a form (bound object frame / unbound object frame) to a file. I have seen a command SavePicture Picture as...
1
by: Brian Henry | last post by:
Here is a simple problem, havent worked much with HTTP streams so haven't done this yet... I want to access a picture located at http://www.somesite.com/images/imagename.jpg then save it to a local...
2
by: 1388-2/HB | last post by:
I've got a small sockets application where I communicate with a web server via async sockets method. Using the ASCIIEncoding Class, I convert strings to byte arrays (and vice versa) in...
0
by: Hexman | last post by:
Hello All, Its a bit more complicated than the subject line implies. A website that I use for information allows me to click on a link and their .PDF displays in IE's browser window.. Since...
2
by: alpana yadav | last post by:
hello everybody i want to know how to save picture in access through vb.net and after saving we have to delete the picture from hard disk and then read picture from database(access) thanks...
1
by: ahujasatna | last post by:
Hi all!! i am working on C#, ASP.Net with Sql server2000 and i am facing a problem, my Question is: "How to insert and retrieve images to/from Sqlserver2000 Database" I created a table...
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:
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.