Load

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), 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.