# Load

> [HTML Version](load_aui_image.htm)

_Updated September 2013_

**xcall AUI, AUI\_IMAGE, IMGOP\_LOAD, handle, status, filename \{,pageno\}**

_filename _is the name of the image file (in either AMOS or native Windows format). Its extension should correspond to the image type.

_handle _will be set to an integer value which identifies this image in memory and which must be passed to other calls to indicate which image the call refers to.

Opening the image does not display it. It merely loads it into memory. Although good programming practice would suggest that you close up any open images at the end of your program, as with open files, A-Shell will automatically close them for you at the end of a program.

We have the technology to figure out the image type by looking at the image file itself, but did not see much point in exercising it due to the overhead and the questionable benefit of having images with non-standard extensions. If you see this differently, please contact us to discuss the need.

AUI\_IMAGE supports loading up to 31 images at a time. Beyond that, you will need to close some before loading more. Note however that AUI\_CONTROL also supports loading images into either buttons or static controls (see [Image Control](imagecontrol.md)), and it has no limitation on the number of images that can be loaded at one time.

**History**

2013 September, A-Shell 6.1.1362:  Added _pageno_ to specify the page number of a multi-page TIF to display. The first page is considered 1. 0 is also treated as 1. Note that in order for this feature to be used with ATE, both server and client must be on A-Shell 6.1.1362.0 or later. Also note that since each page could potentially have a different configuration, in order to retrieve information on the page (with IMGOP\_INFO), first load the page using IMGOP\_LOAD.

