procedure TForm1.Button1Click(Sender: TObject);
var filename:string;
begin
if imgScan1.ScannerAvailable then
begin
imgScan1.OpenScanner;
imgScan1.Zoom := 100;
savepicturedialog1.Execute ;
filename:=savepicturedialog1.FileName;
imgScan1.Image := filename;
imgScan1.StartScan;
Application.ProcessMessages;
image1.Picture.LoadFromFile(filename+'.'+'bmp');
end;
end;