X
xchen.d
Unregistered / Unconfirmed
GUEST, unregistred user!
我的代码如下:我把stream保存为图片文件时可以,但直接访问stream(loadfromstream)却不行
var
spic: TMemoryStream;
x: TIdHTTP;
begin
spic := TMemoryStream.Create;
x := TIdHTTP.Create(nil);
x.Get('http://www.hftoy.com/tphoto/zlb/HF19638.jpg', spic);
x.Free;
Image1.Picture.Graphic.LoadFromStream(spic);
spic.Free;
end;
var
spic: TMemoryStream;
x: TIdHTTP;
begin
spic := TMemoryStream.Create;
x := TIdHTTP.Create(nil);
x.Get('http://www.hftoy.com/tphoto/zlb/HF19638.jpg', spic);
x.Free;
Image1.Picture.Graphic.LoadFromStream(spic);
spic.Free;
end;