by Follow up to my previous question about update listview
inside thread here
i start to think in different way to get my previous question solved , because of download process takes too long and takes much bandwidth i want to download GIFimage
then save it on disk then use it later inside my application
this is current download thread code
procedure TDownloadImage.Execute;
var
aMs: TMemoryStream;
aIdHttp: TIdHttp;
begin
FGif := TGifImage.Create;
try
aMs := TMemoryStream.Create;
try
aIdHttp := TIdHttp.Create(nil);
try
aIdHttp.Request.UserAgent := 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0';
aIdHttp.Get(FURL, aMs); // here is the client FURL
finally
aIdHttp.Free;
end;
aMs.Position := 0;
FGif.LoadFromStream(aMs);
FGif.Transparent := True;
finally
aMs.Free;
end;
if Assigned(FOnImageReady) then
Synchronize(DoImageReady);
end;
finally
FGif.Free;
end;
end;
i want to save image of FURL on computer client then if this image requested to be download again abort download process and load it from client computer how possibly i can do that ?