Detailed Descriptions > AUI > Image
Load

xcall AUI, AUI_IMAGE, IMGOP_LOAD, handle, status, filename

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.

You can open and hold in memory up to 31 images at a time. This might be useful in some kind of “thumbnail” display application, but keep in mind that the memory requirement for each opened image, regardless of whether or how large it is displayed, is based on the actual image size on disk.