The begin
Stream:=TMemoryStream. Create;
IdHTTP1. Get (SRC, stream);
List1. ItemData. Bitmap. LoadFromStream (stream).
FreeAndNil (stream);
The end;
Now use idhttp get photo, picture very much, I want to ask, as in the above loop, is after idhttp get success to the data, continue to execute the following code? Will it Get out, go into the next cycle?
How to determine idhttp has successfully finished the get?
CodePudding user response:
IdHttp is blocked, Get content after the completion of the executed next,If not out of the abnormal situation when the get executed, you can think is to perform a success, otherwise it will throw an exception, for this is likely to trigger the exception of calls, you should use exception handling,
CodePudding user response:
Exception handling method, more pictures, estimates will be very card, advice and delay processing,CodePudding user response:
So, read in the image, large memory, easy to crash,Read a image should be set up immediately after the save, and release the memory,
CodePudding user response:
Blocks, Get will continue after the completion,Idhttp. OnWork OnWorkBegin OnWorkEnd can know already finished,
As mentioned, it is very easy to get wrong, throws an exception, plus a try
CodePudding user response: