Mega Code Archive

 
Categories / Delphi / Graphic
 

How to convert TGraphic descendant image to Bitmap

Title: How to convert TGraphic descendant image to Bitmap procedure ConvertToBitmap(Source : TGraphic; Bitmap : TBitmap); begin if Bitmap = nil then Bitmap := TBitmap.Create else Bitmap.FreeImage; Bitmap.Width := Source.Width; Bitmap.Height := Source.Height; Bitmap.Canvas.Draw(0,0,Source); end;