0 users online | 0 Guests and 0 Registered

»

ID #1080

Scanned a Picture

The setup program for Imaging (tool that ships with Windows > 98) installs the Image
Scan control (OCX) and the 32-bit TWAIN DLLs.
All you have to do is to import this ActiveX control in Delphi and generate
a component wrapper:

Import the ActiveX Control "Kodak Image Scan Control"
(Select Component|Import ActiveX Control...)

Now add a TImgScan Component from the Register "ActiveX" to your form.

Change the following Properties in the Object Inspector:

FileType = 3 - BMP_Bitmap
PageOption = 4 - OverwritePages
ScanTo = 2 - FileOnly

 

procedure TForm1.Button1Click(Sender: TObject);
begin
  if imgScan1.ScannerAvailable then
  try
    imgScan1.Image := 'c:\\Scanner.bmp';
    imgScan1.OpenScanner;
    imgScan1.Zoom := 100;
    imgScan1.StartScan;
    Application.ProcessMessages;
  finally
    imgScan1.CloseScanner;
    { Show the scanned image in Image1 }
    imgScan1.Picture.LoadFromFile(Image1.Image);
  end;
end;

 

Tags: -

Related entries:

    Last update: 2010-11-19 06:01
    Author: Rolf Warnecke
    Revision: 1.0

    Print this record Send FAQ to a friend Show this as PDF file
    Rate this FAQ

    Average rating: 0 (0 Votes)

    completely useless 1 2 3 4 5 most valuable

    You can comment this FAQ

    Most popular FAQs RSS

    1. Display Resolution change
      (33 views)
    2. Scanned a Picture
      (14 views)

    Latest FAQs RSS

    1. Scanned a Picture
      (2010-11-19 06:01)
    2. Display Resolution change
      (2010-02-09 18:01)