ImgSource_Acquire_JSN¶
| → | sourceID | Text | The image source ID | 
| → | optionsJSON | Text | Image acquisition options | 
| ↩︎ | resultJSON | Text | The image acquisition results encoded as a JSON object | 
Run an image acquisition session and return the acquisition results encoded in JSON format.
Parameter sourceID is the ID of the image source.
The optional parameter optionsJSON is a 4D object encoded in JSON format that can used to specify options for the acquisition session. The properties of this object are listed in the following tables.
| 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. | 
| Multiple | The option’s value is a boolean, denoting whether or not to acquire multiple images in a single session. If this option is not specified, its default value is  | 
| 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  | 
| 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, orNegativeTPU. | 
| Duplex | The option’s value is a boolean. Set to  If this option is not specified, its default value is  | 
| PixelType | The option’s value is a string. Set to BW,Gray, orRGBto scan in black & white,
grayscale, or color respectively. | 
| DPISize | The option’s value is a SizeObj. Set theWidthandHeightproperties 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.
| Property name | Description | 
|---|---|
| DeleteAfter | The option’s value is a boolean. Set to  If this option is not specified, its default value is  | 
| 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  If this option is not specified, its default value is  | 
The results of a successful acquisition session are returned in resultJSON in the form of a 4D object encoded in JSON.
The resultJSON object will contain the following properties:
| Key | Description | 
|---|---|
| Images | The property’s value is an array of strings containing the full pathnames of the acquired images. | 
| Sidecars | This property is optional, and typically present in acquisitions from
digital cameras with the  When present, it is an object containing arrays of strings. For each image pathname
in the  | 
Note
The ImgSource_Acquire method in the Q2PixLib component is a
convenience wrapper for this method that accepts and returns directly
4D objects instead of a JSON serializations.
