delphi从内存流加载图片

时间:2014-12-20 18:14:53   收藏:0   阅读:360
function Tform1.GetCodeImg;
var url:string;
response:TMemoryStream;
jpg:TJPEGImage;
begin
   url:='https://kyfw.12306.cn/otn/passcodeNew/getPassCodeNew?module=login&rand=sjrand&0.3110086616057921';
   idhtp1.Get(url,response);
   jpg:=TJPEGImage.Create;
   jpg.LoadFromStream(response);
   img1.Picture.Assign(jpg);
end;

评论(0)
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!