Solved

Download JPG from url

Posted on 2008-11-01
5
232 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

743 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now