Please enable JavaScript to view this site.

A-Shell Consolidated Reference

xcall AUI, AUI_IMAGE,IMGOP_SAVEAS, handle, status, fspec, comp

IMGOP_SAVEAS takes a previously loaded image—specified by handle—and saves it to the specified fspec, converting the format in accordance with the extension in the fspec and the comp options.

For example, you could use this opcode to load a 24 bit color BMP and save it as an 8 bit grayscale PNG with the "Ink Saver" transformation. In fact, the print screen utility (APRNTSCRN.SBX) now uses this technique to process changes in the image attributes, which is faster than taking a new screen picture.

See Status Codes for the possible returned status values, and IMGOP_ACQUIRE and IMGOP_CAPTURE for definitions of the comp options applicable to the supported image extensions/formats (JPG, TIF, BMP, PCX, PNG). Also see the sample program IMAGE in EXLIB:[908,32] for a complete example.

History

2011 May, A-Shell 5.1.1215:  Function added to A-Shell