Solved

Download JPG from url

Posted on 2008-11-01
5
234 Views
Last Modified: 2008-11-03
I would like to download a jpg from a url. How can I do this?
0
Comment
Question by:geocoins-software
5 Comments
 

Author Comment

by:geocoins-software
ID: 22856948
Please include error checking - that is, the jpg image must exist before it is downloaded

thanks
0
 
LVL 12

Expert Comment

by:TK-77
ID: 22857044
1. Right-cliick on the image
2. Click Save Picture As
3. Save to the desired directoty on your PC

TK
0
 

Expert Comment

by:gonio5
ID: 22857249
Try hitting the Print Screen button.
Then paste it in paint. (pressing Control + V). I am sure you know that, but sometimes the simpler it is the most difficult to come in mind.
Nothing else I could think of now. Sorry.
0
 

Author Comment

by:geocoins-software
ID: 22857766
Thanks all, but I need a solution by code....

I found this one and it seems to work....but i will accept any other solution that works as the answer.

DownloadFile  (SourceStr, DestStr) ;


function DownloadFile(SourceFile, DestFile: string): Boolean;
begin
  try
    Result := UrlDownloadToFile(nil, PChar(SourceFile)
      , PChar(DestFile), 0, nil) = 0;
  except
    Result := False;
  end;
end;


especially one that error checks for non-existing files

thanks
0
 
LVL 13

Accepted Solution

by:
ThievingSix earned 250 total points
ID: 22871220
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question