QPx_AcqGetPicture

QPx_AcqGetPicture(acqProtocol; acqProtocol; acqProtocol; acqProtocol):error
acqProtocol Longint Acquisition protocol ID
deviceName Text Device name
acquiredPicture Picture Acquired picture
sessionOptions Longint Acquisition options (optional)
error Longint Error result

Acquire a single image into a 4D picture variable

Parameter acqProtocol specifies the protocol through which to acquire the picture. Use one of the acquisition protocol 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 to acquire the picture from. To get all device names for a specific protocol, use the QPx_AcqGetDeviceList command. Alternatively, let the user select acquisition protocol and device using the QPx_AcqSelectDevice command.

After successful acquisition QPx_AcqGetPicture returns qpx_NoErr and parameter acquiredPicture receives the picture. If the user cancels the acquisition dialog, error qpx_userCancelErr is returned.

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_AcqGetSingleImage Acquire single image to disk file
QPx_AcqGetMultipleImages Acquire multiple images to disk files
QPx_AcqGetDeviceList Get all devices available to an acquisition protocol
QPx_AcqSelectDevice Display the device selection dialog for an acquisition protocol