Load From Url TBitmap Helper Class For Delphi XE6 Firemonkey On Android And IOS

  

Developer Humphrey. Kim Hyun – Soo has a demo up which shows how to subclass TBitmap and add a LoadFromUrl function in Delphi XE6 Firemonkey. There are two different versions of the example with one implementing anonymous threads and the other just doing straight HTTP downloads. A helper class is created using this syntax: TBitmapHelper = class helper for TBitmap. The subclass has two main functions LoadFromUrl and LoadThumbnailFromUrl. Once you include the helper unit under the implementation section of your unit you can start using the functions from it as if they were part of the original class. For example, you can start taking your normal TImage control and do TImage.Bitmap.LoadFromUrl(). There is a blog post in Korean (use Chrome translate) with the one example and then there is source code on Github with the second anonymous threaded version of the example.
Head over and check out the full blog post on subclassing TBitmap with a LoadFromUrl function.
Head over to Github and check out the anonymous thread FMX.Devgear.HelperClass and demo for using the TBitmap LoadFromUrl subclass.

Comments are closed.