I put together this Delphi XE5 Firemonkey Frame object called AsyncImageLoader which implements a threaded HTTP image loader with a progress bar. If you want to load up a TListBox with an RSS feed you have to create an TImage and download each image manually which will block the GUI of your app. AsyncImageLoader shows one way to solve this problem. The code should work cross platform on Android, IOS, Windows, and IOS. Once you tell AsyncImageLoader to load an image it will display a progress bar until the image has been downloaded and loaded. Instagram uses a similar progress bar style within their app when they load images into your feed.
Another feature of AsyncImageLoader is that it can either pool the HTTP request components and re-use them the next time you load an image with the Frame or it can create the HTTP request components on each request (by setting Pooled to False). If you are only ever going to load an image once you can probably save memory by turning off pooling. Lastly you can load up the URL property of the Frame with the URL that you want to load and then use your own queuing system to load the images (with the Get procedure) when the images become visible (or one at a time). The threading is based on anonymous threads so there is also a new thread created and terminated for each image request.
There are other solutions out there for asynchronous image loading but I haven’t seen any that implement a progress bar. If you don’t need the progress bar and just want a threaded image loading queue check out TImageLoader.
To use AsyncImageLoader you should include the uAsyncImageLoader into your project, select Frames from the component palette, and choose AsyncImageLoader from the popup box.
Threaded Progress Bar Image Loader For Delphi XE5 Firemonkey On Android And IOS by Delphi XE5 XE6 XE7 XE8 10 Seattle Berlin Firemonkey, Delphi Android, Delphi IOS is licensed under a Creative Commons Attribution 4.0 International License.