UICollectionViewTemplateButton assign blobfield

Hi,

using TTMSFMXNativeUICollectionViewTemplateButton I want to assign dynamically a blob from a SQLite-Field (Type Varbinary).

How do I convert BlobField to UIImage without loosing performance?

procedure TFCatalogue.DetailViewCollectionApplyItemValue(Sender...);
var
  MyUIImage: UIImage;

begin

  SQLiteQry.RecNo := ARow + 1;


  if AControl.Name = DetailViewCollection_ImageArtikel.Name then begin

    MyUIImage := SQLiteQry.FieldByName(VarBinaryFieldName) <- how do I get UIImage from Blobfield?

    AsButton(AControl).Button.SetImage(MyUIImage, UIControlState(0));

  end;

end;

Thanks in Advance!

Dietrich

Hi,


Unfortunately there is performance loss converting from TBitmap to UIImage. You can take a look at the helper methods inside the FMX.Helpers.iOS unit. It contains BitmapToUIImage function.