New AUI_IMAGE Opcode IMGOP_SAVEAS (11) may be used to convert one image type to another. Syntax:
XCALL AUI, AUI_IMAGE,IMGOP_SAVEAS, handle, status, fspec, comp
The arguments and operation are nearly identical to IMGOP_CAPTURE, except that the source of the operation is a previously loaded image specified by the handle parameter. The image is saved to the specified fspec, converting it (according to the extension of fspec) and the compression and other options in the comp parameter.
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).