QPx_AcqGetSingleImage

QPx_AcqGetSingleImage(acqProtocol; deviceName; acquiredImage; sessionOptions):error
acqProtocol Longint Acquisition protocol ID
deviceName Text Device name
acquiredImage Text Full pathname to the acquired image file
sessionOptions Longint Acquisition options (optional)
error Longint Error result

Acquires a single image to a disk file.

Parameter acqProtocol specifies the protocol through which to acquire the image. It can be one of the acquisition protocol ID constants:

qpx_AcqTWAINProtocol 1 TWAIN identifier
qpx_AcqPictureTransferProtocol 2 Picture Transfer Protocol identifier
qpx_AcqVideoProtocol 4 Video acquisition protocol identifier

Parameter deviceName specifies the device from which to acquire the image. To get all device names for a specific protocol, use the QPx_AcqGetDeviceList command. Alternatively, the QPx_AcqSelectDevice command can be used to let the user select the acquisition protocol and device.

After successful acquisition, QPx_AcqGetSingleImage returns qpx_NoErr and parameter acquiredImage receives the full pathname to the acquired image. If the user cancels the acquisition dialog, error qpx_userCancelErr is returned.

By default, acquired images are saved in the 4D datafile folder when running under single-user 4D, and in the application folder when running under 4D Client. Call QPx_AcqSetImageFolder to change this location.

The optional parameter sessionOptions can be used to specify acquisition options. It can be a bitwise "or" combination of the following constants:

qpx_AcqHideDeviceGUI 0x00000200 Hide the device acquisition GUI (if supported).
qpx_AcqTWAINEnableADF 0x00010000 Enable the use of the Automatic Document Feeder on TWAIN scanners (if supported). This option and qpx_AcqTWAINEnableTPU are mutually exclusive.
qpx_AcqTWAINEnableTPU 0x00100000 Enable the use of the Automatic Document Feeder on TWAIN scanners (if supported). This option and qpx_AcqTWAINEnableADF are mutually exclusive.
qpx_AcqPTPDeleteAfter 0x00040000 Delete the image on the PTP digital camera after acquisition (if supported).

Note: not all protocols and devices support acquisition with the device dialog hidden:

If the qpx_AcqHideDeviceGUI option is specified and the device can not hide its dialog, this command runs the acquisition session with the device dialog visible.

Related commands

QPx_AcqGetMultipleImages Acquires multiple images to disk files.
QPx_AcqGetPicture Acquires a single image into a 4D picture variable.
QPx_AcqGetDeviceList Returns all devices that are available through a specific acquisition protocol.
QPx_AcqSelectDevice Displays the acquisition protocol and device selection dialog.
QPx_AcqSetImageFolder Specifies the location where acquired images are stored

QPix © Escape
Generated by QDoc 2.8 on Wed, Feb 17, 2010 17:45:39