unit Facharbeit;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls;
type
TForm1 =
class(TForm)
Open: TOpenDialog;
bBildladen: TButton;
Image1: TImage;
bPixelauslesen: TButton;
efPixel: TEdit;
procedure bBildladenClick(Sender: TObject);
procedure bPixelauslesenClick(Sender: TObject);
private
{ Private-Deklarationen }
DasBitmap:TBitmap;
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.bBildladenClick(Sender: TObject);
begin
//TForm1 OnCreate;
begin
DasBitmap := TBitmap.Create;
end;
if Open.Execute
then
begin
if Open.Execute
then begin
DasBitmap.LoadFromFile(Open.FileName);
Image1.Picture.Bitmap.Assign(DasBitmap)
end;
end;
//TForm1 OnDestroy;
begin
DasBitmap.Free;
end;
end;
procedure TForm1.bPixelauslesenClick(Sender: TObject);
begin
efPixel.text:=(DasBitmap.ScanLine[]);
end;
end.