Updated May 2016; see History
xcall AUI, AUI_IMAGE, opcode, handle, status {,parameters...}
(Windows only) AUI_IMAGE allows you manage and manipulate images: scan, capture from screen, read from disk, display, convert, etc. Formats supported are BMP, PCX, JPG, TIF, PNG and one-page TIF files using JPG compression. The imaging operations require the use of external graphics library modules vic32.dll and victw32.dll, which are included with the A-Shell installation package and reside in the \bin folder.
Parameters
Unlike most subroutines, the parameters for AUI_IMAGE vary with the opcode. Here are the parameters that apply to all opcodes:
opcode (Num) [in]
Symbol |
Value |
Function |
IMGOP_LOAD |
1 |
Load image file from disk |
IMGOP_CLOSE |
2 |
Close image |
IMGOP_DISPLAY |
3 |
Display image |
IMGOP_LOADDISP |
4 |
Open and Display image |
IMGOP_INFO |
5 |
Retrieve Information about an image |
IMGOP_HIDE |
6 |
|
IMGOP_ACQUIRE |
7 |
Scan and save image (TWAIN Acquire) |
IMGOP_SELECTSRC |
8 |
|
IMGOP_TWERR |
9 |
Get TWAIN Error code |
IMGOP_CAPTURE |
10 |
|
IMGOP_SAVEAS |
11 |
Convert image |
IMGOP_PAGEINFO |
12 |
Count Pages in multi-page TIF file |
handle (Num) [in/out]
The Load operation returns this value to identify the image in subsequent calls. It must be passed to the other operations.
status (F,6) [out]
is returned from every call, with 0 indicating success. It should be mapped as a floating point, since it can be negative or positive. Possible values of status are given in the following Status Codes table.
All of the other parameters are documented with they opcodes where they are used. Click on the links in the table above for specific opcodes and functions.
History
2018 August, A-Shell 6.5.1644: TIF files using JPG compression are now supported provided they are single page.
2016 May A-Shell 6.3.1512: Source code reorganization: symbols related to AUI_IMAGE have now been separated out of ashell.def.
into ashinc:image.def and augmented. Programs using them should now ++include ASHINC:ashell.def and ++include:image.def.
AUI_IMAGE scanning enhancement: the IMGSF_HIDEUI option in the scanflags parameter now works in single-page scanning mode. Previously single page scans (pages=1) always displayed the scanner's user interface regardless of the scanflags.