; ; @ANO_SCRIPT_NAME image_convert ; @ANO_SCRIPT_VERSION 0.0.1 ; @ANO_SCRIPT_DESCRIPTION Simple image format converter ; ; @ANO_FLAGS_USE_PROTOS [ ] ; @ANO_FLAGS_VAR_NAME_SUBS [ ] ; @ANO_FLAGS_VAR_WARN_UNUSED [ ] ; ; Copyright (c) 2016-2026, Jani Salonen ; All rights reserved. ; ; Example to read one image in and write another out. You need to provide ; image_input.tga as an input image. ; define img_in ("image_input.tga") define img_out ("image_input.rgb") main [exit: 0] { ; Read TGA image in and write it out using RGB format. ; image_read (img_in) cmp rc (% 0) jne "do_convert" print "Failed to read input image. Abort.\n" exit do_convert: mov input_image (rc) dump input_image image_write_rgb (img_out, input_image) cmp rc (0) je "convert_ok" print "Failed to write to output image. Abort.\n" exit convert_ok: print "Image is converted succesfully.\n" }