﻿# AUI\_IMAGE

_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](num.md))  \[in\] 

| **Symbol** | **Value** | **Function** |
|------|------|------|
| IMGOP\_LOAD | 1 | [Load](load_aui_image.md) image file from disk |
| IMGOP\_CLOSE | 2 | [Close](close(imgop_close).md) image |
| IMGOP\_DISPLAY | 3 | [Display](display_aui_image.md) image  |
| IMGOP\_LOADDISP | 4 | [Open and Display](openanddisplay.md) image |
| IMGOP\_INFO | 5 | [Retrieve Information](retrieveinformation.md) about an image |
| IMGOP\_HIDE | 6 | [Remove from Display](removefromdisplay.md)  |
| IMGOP\_ACQUIRE | 7 | Scan and save image (TWAIN [Acquire](acquire.md)) |
| IMGOP\_SELECTSRC | 8 | [Select Data Source](selectdatasource.md) |
| IMGOP\_TWERR | 9 | [Get TWAIN Error](gettwainerror.md) code |
| IMGOP\_CAPTURE | 10 | [Capture Screen](capture_screen.md) |
| IMGOP\_SAVEAS | 11 | [Convert](convert_aui_image.md) image |
| IMGOP\_PAGEINFO | 12 | [Count Pages](countpages.md) in multi-page TIF file |




_handle  _([Num](num.md))  \[in/out\]

The [Load](load_aui_image.md) operation returns this value to identify the image in subsequent calls.  It must be passed to the other operations.

_status  _(signed integer)  \[out\]

is returned from every call, with 0 indicating success. It should be mapped as a numeric type accepting positive or negative integers, such as F or I.. Possible values of status are given in the following [Status Codes](statuscodes_aui_image.md) 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](ashell.md) into [ashinc:image.def](https://bitbucket.org/microsabio/soslib/src/master/907016/image.def) and augmented. Programs using them should now ++include [ASHINC](ashincincludefiles.md):ashell.def and ++include:[image.def](https://bitbucket.org/microsabio/soslib/src/master/907016/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_.