Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TIWImage
#4
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):

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;
Reply


Messages In This Thread
RE: TIWImage - by Alexandre Machado - 05-27-2022, 01:55 AM
RE: TIWImage - by Alexandre Machado - 05-27-2022, 09:40 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)