I have a bitmap and a mask (a bitmap also). I would like to draw the bitmap on the mask (like on the picture below)

How to do this on Delphi with Firemonkey ?
I have a bitmap and a mask (a bitmap also). I would like to draw the bitmap on the mask (like on the picture below)

How to do this on Delphi with Firemonkey ?
Result image - star with transparent background. Use white color in your mask to show the visible part of image.
Checked in Delphi Berlin and Windows.
procedure TForm1.Button1Click(Sender: TObject);
var
ImageRes: TResourceStream;
Result: TBitmap;
tmpMS : TMemoryStream;
begin
ImageRes := TResourceStream.Create(HInstance, 'IMAGE', RT_RCDATA);
try
Image1.Bitmap.CreateFromStream(ImageRes);
Image2.Bitmap.LoadFromFile('c:\temp\MaskedBitmap\Images\Mask.png');
Result := TBitmap.Create;
Result.CreateFromBitmapAndMask(Image1.Bitmap, Image2.Bitmap);
// applying alpha channel to Bitmap - workaround. If you can improve write here how
tmpMS := TMemoryStream.Create;
Result.SaveToStream(tmpMS);
Result.LoadFromStream(tmpMS);
tmpMS.Free;
Image3.Bitmap.Assign(Result);
finally
ImageRes.Free;
Result.Free;
end;
end;