ImgSource_AcquireImage

Acquire a single image from an image source.
ImgSource_AcquireImage(sourceID{; options}) ➔ imagePath
sourceID Text The image source ID.
options Object Acquisition options.
imagePath Text The full pathname of the acquired image.

Acquire a single image from an image source and return its full pathname.

Parameter sourceID is the ID of the image source.

The optional parameter options is a 4D object that can used to specify options for the acquisition session:

General Acquisition Options
Property name Description
Directory

The option’s value is a string containing the full pathname of the destination directory. The pathname must be in POSIX format.

If this option is not specified, it defaults to the system temporary directory.

GUIVisible

The option’s value is a boolean, denoting whether to display or not the source’s acquisition GUI. Effective only on sources that support hiding their GUI.

If this option is not specified, its default value is True.

TWAIN Acquisition Options
Property name Description
FunctionalUnit The option’s value is a string denoting the scanner’s functional unit to be used. Can be one of: Flatbed, ADF, PositiveTPU, or NegativeTPU.
Duplex

The option’s value is a boolean. Set to True to enable duplex scanning.

If this option is not specified, its default value is False.

PixelType The option’s value is a string. Set to BW, Gray, or RGB to scan in black & white, grayscale, or color respectively.
DPISize The option’s value is a SizeObj. Set the Width and Height properties to the desired scanning resolution

Note

For the above TWAIN options to be effective, the scanner driver must support setting the corresponding TWAIN capabilities. Compliant drivers usually support these options when the GUI is hidden (GUIVisible option set to False). There may be drivers that support these options in their GUI, but that’s a rare case.

Digital Camera Acquisition Options (IC/WIA protocols)
Property name Description
DeleteAfter

The option’s value is a boolean. Set to True to remove the images from the camera after downloading successfully.

If this option is not specified, its default value is False.

SystemGUI

The option’s value is a boolean, denoting whether to use the system UI, if available, rather than the vendor-supplied UI. Effective only on WIA sources.

If this option is not specified, its default value is False.

The full pathname of the acquired image is returned in imagePath. If the user cancels the acquisition session, or if there is an error, imagePath is set to an empty string.