unit Unit_savebmp;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls;
type
TForm1 =
class(TForm)
ScrollBox1: TScrollBox;
Image1: TImage;
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject;
var Action: TCloseAction);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
atempbmp : TBitmap;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
Image1.Picture.LoadFromFile('
c:\temp\out.bmp');
atempbmp.Assign( Image1.Picture.Bitmap);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Image1.Picture.Bitmap.Assign(atempbmp);
Image1.Picture.Bitmap.SaveToFile('
c:\temp\out2.bmp');
end;
procedure TForm1.FormClose(Sender: TObject;
var Action: TCloseAction);
begin
atempbmp.Free;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
atempbmp :=TBitmap.Create;
end;
end.