We are using TMS Web Core 2.6.1.2.
If we assign a TBitmap object (which actually is a TGraphic) to another TBitmap object using the Assign method, we would expect that both objects contain the same data. But this is not the case. Here is a sample to reproduce this:
procedure TForm1.WebFormCreate(Sender: TObject);
var
ltInitials : string;
lxBitMap1,
lxBitMap2 : TBitmap;
begin
ltInitials := 'TMS';
lxBitMap1 := TBitmap.Create;
lxBitMap2 := TBitmap.Create;
try
lxBitMap1.SetSize(250,250);
lxBitmap1.Canvas.FillRect(Rect(0,0,lxBitMap1.Width,lxBitMap1.Height));
lxBitmap1.Canvas.Font.Color := RGB(217,217,217);
lxBitmap1.Canvas.Font.Size := 86;
lxBitmap1.Canvas.Font.Style := [fsBold];
lxBitmap1.Canvas.TextOut((lxBitmap1.Width - Round(lxBitmap1.Canvas.TextWidth(ltInitials))) div 2, (lxBitmap1.Height - Round(lxBitmap1.Canvas.TextHeight(ltInitials))) div 2 -5, ltInitials);
lxBitMap2.Assign(lxBitMap1);
WebLabel1.Caption := lxBitmap1.GetBase64Image;
WebLabel2.Caption := lxBitmap2.GetBase64Image;
finally
lxBitMap1.Free;
lxBitMap2.Free;
end;
end;