ImageEn, unit iemio

TImageEnMIO.Acquire

TImageEnMIO.Acquire


Declaration

function Acquire(AppendAtEnd: Boolean = False) : boolean;


Description

Perform a multiple image acquisition from the SelectedAcquireSource, which may be a Twain or WIA scanner, connected camera or phone.
SelectedAcquireSource is set when the user chooses a source if you have called SelectAcquireSource or manually set a source using SetAcquireSource.
If AppendAtEnd = True, and an image is selected, then new images will be inserted after the current selection. Otherwise, they are appended after the last image.

Returns True if the acquisition succeeds.

Note:
OnAcquireBitmap occurs for each scanned bitmap (if you want to custom handle the image)
OnAfterAcquireBitmap is called after a scanned image is added
You can use OnProgress to display progress
Set ImageEnMView1.MIO.AcquireParams.Aborting to True to cancel scanning


Demo

Demo  Demos\ImageAcquisition\AllAcquire\AllAcquire.dpr
               

Examples

// Prompt the user to choose a scanner source and then acquire
if ImageEnMView1.MIO.SelectAcquireSource([ieaTwain, ieaWIA, ieaDCIM]) then
  ImageEnMView1.MIO.Acquire();

// capture from the default WIA device
if ImageEnMView1.MIO.SetAcquireSource(ieaWIA, Default_Device) then
  ImageEnMView1.MIO.Acquire();

// select the second Twain device and capture
if ImageEnMView1.MIO.SetAcquireSource(ieaTwain, 1) then
  ImageEnMView1.MIO.Acquire();

// Capture from the Twain device named, CanoScan FB620
if ImageEnMView1.MIO.SetAcquireSource(ieaTwain, 'CanoScan FB620') then
  ImageEnMView1.MIO.Acquire();

// Retrieve from the camera card listed as H:\ drive
if ImageEnMView1.MIO.SetAcquireSource(ieaDCIM, 'H') then
  ImageEnMView1.MIO.Acquire();

// Capture without a dialog
ImageEnMView1.MIO.AcquireParams.VisibleDialog := False;
ImageEnMView1.MIO.Acquire();