TTMSFMSBitmap BitmapContainer

Cannot find how to switch from using Bitmap to BitmapContainer

When I use TTMSFMSBitmap.Bitmap.LoadFromFile() or TTMSFMSBitmap.Bitmap.LoadFromStream(), then I want to set the image using the BitmapContainer, it never shows the image in the BitmapContainer. Works correctly if I did not use a LoadFrom...

I know I must clear the Bitmap before the image in the BitmapContainer is used but how do I do this?

Can you try to assign a nil?

I have tried :

TMSFMXBitmap1.Bitmap := Nil; 
This removes the image but leaves a white box where the iimage used to be
and
TMSFMXBitmap1.Bitmap.Clear(claNull);
This removes the image completely
and
TMSFMXBitmap1.Bitmap.Free;
TMSFMXBitmap1.Bitmap := TBitmap.Create;
and a lot more obscure stuff for hours...

But in all cases, I cannot use the BitmapContainer to show an image once it has been loaded in the bitmap using LoadFromFile or LoadFromStream.

Can you try with


  TMSFMXBitmap1.Bitmap.Assign(nil);
  TMSFMXBitmap1.Bitmap.SetSize(0, 0);

?
Kind Regards,
Pieter

That code work's.


Thank you