def cmd_magick_convert_array(): try: s = Sultan() s.convert( "le.jpg -define h:format=rgba -depth 8 -size 100x100 rgba100x100.h" ).run() except Exception as e: print(e)
def cmd_magick_convert_image(aname, astring): try: if (astring == "jpeg" or astring == "jpg" or astring == "bmp" or astring == "png"): s = Sultan() s.convert(aname + "." + astring + " " + aname + "." + astring).run() print("Converted image:" + aname + "." + astring) else: print("Unsupported Filename Extension") except Exception as e: print(e)