unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Image1: TImage;
    Label1: TLabel;
    Label2: TLabel;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
  //jeśli AutoSize=false, to bitmapa ma rozmiary oryginalne, a TImage swoje
  with Image1 do
  begin
    Canvas.Pen.Color := clWhite;
    Canvas.Lineto(Width, Height);  //rysowanie przekątnej
    //wymiary komponentu TImage
    Label1.Caption:=Inttostr(Width)+', '+Inttostr(Height);
    //oryginalne wymiary obrazu bmp
    Label2.Caption:=Inttostr(Picture.Bitmap.Width)+','+Inttostr(Picture.Bitmap.Height);
  end;
end;

end.
