展开全部
在窗体添加一个Image,一个IdHttp,一个Button
uses Jpeg
procedure TForm1.Button1Click(Sender: TObject);
var
imagestream:TMemoryStream;
jpg:TJpegImage;
begin
imagestream := TMemoryStream.Create();
jpg:=TJpegImage.Create;
idhttp1.Get('http://www.ggyy8.com/Files/comic/500x300/H/Naruto.jpg',imagestream);
imagestream.Position:=0;
jpg.LoadFromStream(imagestream);
image1.Picture.Assign(jpg);
end;
uses Jpeg
procedure TForm1.Button1Click(Sender: TObject);
var
imagestream:TMemoryStream;
jpg:TJpegImage;
begin
imagestream := TMemoryStream.Create();
jpg:=TJpegImage.Create;
idhttp1.Get('http://www.ggyy8.com/Files/comic/500x300/H/Naruto.jpg',imagestream);
imagestream.Position:=0;
jpg.LoadFromStream(imagestream);
image1.Picture.Assign(jpg);
end;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询