var TempWidth: longint; begin Image1.AutoSize := false; Image1.Stretch := true; if ((Image1.Picture.Width * ClientHeight) div Image1.Picture.Height) > ClientWidth then begin Image1.Width := ClientWidth; Image1.Height := (Image1.Picture.Height * ClientWidth) div Image1.Picture.Width; end else begin Image1.Height := ClientHeight; Image1.Width := (Image1.Picture.Width * ClientHeight) div Image1.Picture.Height; end;