05-27-2022, 09:40 PM
I think your problem is when you (don't) assign the bitmap to the picture.
The correct way to do it is via Assign() method of the picture, not setting the bitmap directly.
This simple code works correctly (I'm not using your Base64 encoded image, but the concept is exactly the same):
The correct way to do it is via Assign() method of the picture, not setting the bitmap directly.
This simple code works correctly (I'm not using your Base64 encoded image, but the concept is exactly the same):
Code:
procedure TIWForm1.IWAppFormShow(Sender: TObject);
var
mBmp : TBitMap;
begin
mBmp := TBitmap.Create;
try
mBmp.Width := 200;
mBmp.Height := 200;
mBmp.Canvas.Brush.Color := clWhite;
mBmp.Canvas.Pen.Color := clBlue;
mBmp.Canvas.Rectangle(0, 0, 200, 200);
mBmp.Canvas.MoveTo(0, 0);
mBmp.Canvas.LineTo(200, 200);
IWImage1.Picture.Assign(mBmp);
finally
FreeAndNil(mBmp);
end;
end;