Thema: Delphi Canvas in TBitmap ???

Einzelnen Beitrag anzeigen

San

Registriert seit: 4. Jan 2005
Ort: Winningen
9 Beiträge
 
#13

Re: Canvas in TBitmap ???

  Alt 4. Jan 2005, 22:46
Code:
procedure TForm1.Speichern(Sender: TObject);
var
Bitmap: TBitmap;
begin

Bitmap:= TBitmap.Create; //erstellt eine Bitmap
Bitmap.PixelFormat:= pf32bit; //Bitmap erhält eine Bittiefe von 32 Bit (hohe Qualität)
Bitmap.Height:= PaintBox1.Height; //Höhe der Bitmap ist gleich der Höhe der Paintbox
Bitmap.Width:= Paintbox1.Width; //Breite der Bitmap ist gleich der Breite der Paintbox

PaintBox1.Canvas.Draw(0,0,Bitmap); //Bitmap wird in Paintbox gezeichnet

if savedialog1.execute then
Bitmap.SaveToFile(SaveDialog1.Filename); //Bitmap wird als Bitmap abgespeichert
end;
  Mit Zitat antworten Zitat