def run_convert_command(args):
 if (not isinstance(args, list)):
  raise TypeError('args must be a list')
 convert_command = _get_convert_command()
 if (os.path.splitext(os.path.basename(convert_command))[0] == 'magick'):
  args.insert(0, convert_command)
  args.insert(1, 'convert')
 else:
  args.insert(0, convert_command)
 execute_command(args, shell=(sublime.platform() == 'windows'))

def run_convert_command ( args ) : if ( not isinstance ( args , list ) ) : raise TypeError ( 'args must be a list' ) convert_command = _get_convert_command ( ) if ( os . path . splitext ( os . path . basename ( convert_command ) ) [ 0 ] == 'magick' ) : args . insert ( 0 , convert_command ) args . insert ( 1 , 'convert' ) else : args . insert ( 0 , convert_command ) execute_command ( args , shell = ( sublime . platform ( ) == 'windows' ) )
executes imagemagick convert or magick command as appropriate with the given args .