473,802 Members | 2,438 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1379
"Brian Henry" <br**********@n ewsgroups.nospa m> 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.Down loadFile'.

--
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.downl oadfile

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.dow nloadfile _(
"http://www.somesite.co m/images/imagename.jpg", "C:\myimage.jpg ")

That is all

I hope this helps?

Cor


"Brian Henry" <br**********@n ewsgroups.nospa m>
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**********@n ewsgroups.nospa m> 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.Down loadFile'.

--
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%******** **********@TK2M SFTNGP12.phx.gb l...
Brian,

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

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.dow nloadfile _(
"http://www.somesite.co m/images/imagename.jpg", "C:\myimage.jpg ")

That is all

I hope this helps?

Cor


"Brian Henry" <br**********@n ewsgroups.nospa m>
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%******** **********@TK2M SFTNGP12.phx.gb l...
Brian,

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

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.dow nloadfile _(
"http://www.somesite.co m/images/imagename.jpg", "C:\myimage.jpg ")

That is all

I hope this helps?

Cor


"Brian Henry" <br**********@n ewsgroups.nospa m>
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
2972
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 be greatly appreciated. Steve
7
4691
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 http://adfarm.mediaplex.com/ad/bn/2397-11787-1843-5?mpt=1068644406357385 rather than the standard
3
10743
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 me to have the option to save the image. I guess I should have seen this coming. On the browser default right click menu there is a "Save Picture As..." option. Does anyone know how I can get that option back, or use another way of saving the...
48
11927
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 have 500000 records around. Somebody said the best way to do that was encoder the picture to field bytea but I dont know about this. Another way is save the path to the picture file but I dont like so much because I need to write to disk by OS...
5
7477
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 LPPictureDist, Filename, but can not get it to work. Steve
1
261
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 file. how would i do this? thanks!
2
2102
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 conjunction with beginSend and beginReceive (and their corresponding callbacks). So long as the web server and I just deal in text, life is easy. Now there's an image I want to request and then display in my app, it's a dynamic PNG image that's...
0
1485
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 this data has a life-span of about a week (replaced by a newer updated one on a daily basis) and if I happen to miss a day viewing and recording the info I want, its gone forever. To solve this problem, I wrote a small app to retrieve their index...
2
6899
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 in advance
1
13273
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 in database there are only two Columns:
0
9699
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9562
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10535
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10303
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10282
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9111
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6838
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5494
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2966
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.