unit
Unit1;
interface
uses
Winapi
.
Windows, Winapi
.
Messages, System
.
SysUtils, System
.
Variants, System
.
Classes, Vcl
.
Graphics,
Vcl
.
Controls, Vcl
.
Forms, Vcl
.
Dialogs, IdHttp, jpeg, Vcl
.
StdCtrls, Vcl
.
ExtCtrls;
type
TForm1 =
class
(TForm)
Image1: TImage;
Button1: TButton;
procedure
Button1Click(Sender: TObject);
private
public
end
;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure
TForm1
.
Button1Click(Sender: TObject);
var
http: TIdHttp;
potok: TMemoryStream;
jpeg: TJpegImage;
i:
integer
;
begin
http := TIdHTTP
.
Create(
nil
);
ms := TMemoryStream
.
Create;
jpeg := TJpegImage
.
Create;
for
i:=
1
to
97
do
begin
try
http
.
Get(
'//тут источник картинок'
+inttostr(i)+
'.jpg'
, potok);
potok
.
Position :=
0
;
jpeg
.
LoadFromStream(ms);
jpeg
.
SaveToFile(
'c:/jpgimage/'
+inttostr(i)+
'.jpg'
);
finally
jpeg
.
Free; ms
.
Free; http
.
Free;
end
;
end
;
end
;
end
.