def display_output(arguments):
global _ASCII<EOL>if arguments['<STR_LIT>']:<EOL><INDENT>_ASCII=_ASCII_2<EOL><DEDENT>try:<EOL><INDENT>im = Image.open(arguments['<STR_LIT>'])<EOL><DEDENT>except:<EOL><INDENT>raise IOError('<STR_LIT>')<EOL><DEDENT>im = im.convert("<STR_LIT>")<EOL>aspect_ratio    = float(im.size[<NUM_LIT:0>])/im.size[<NUM_LIT:1>]<EOL>scaled_height   = _WIDTH / aspect_ratio<EOL>scaled_width    = _HEIGHT * aspect_ratio*<NUM_LIT:2><EOL>if scaled_width > _WIDTH:<EOL><INDENT>width = int(_WIDTH)<EOL>height = int(scaled_height/<NUM_LIT:2>)<EOL><DEDENT>elif scaled_height > _HEIGHT:<EOL><INDENT>width = int(scaled_width)<EOL>height = int(_HEIGHT)<EOL><DEDENT>if arguments['<STR_LIT>']:<EOL><INDENT>width = int(arguments['<STR_LIT>'])<EOL>height = int(width / aspect_ratio / <NUM_LIT:2>)<EOL><DEDENT>elif arguments['<STR_LIT>']:<EOL><INDENT>height = int(arguments['<STR_LIT>'])<EOL>width = int(height * aspect_ratio * <NUM_LIT:2>)<EOL><DEDENT>if arguments['<STR_LIT>'] and arguments['<STR_LIT>']:<EOL><INDENT>height = int(arguments['<STR_LIT>'])<EOL>width = int(arguments['<STR_LIT>'])<EOL><DEDENT>im = im.resize((width,height),resample=Image.ANTIALIAS)<EOL>enhancer = ImageEnhance.Contrast(im)<EOL>im = enhancer.enhance(float(arguments['<STR_LIT>']))<EOL>img = im.getdata()<EOL>im = im.convert('<STR_LIT:L>') <EOL>if not arguments['<STR_LIT>']:<EOL><INDENT>_ASCII = _ASCII[::-<NUM_LIT:1>]<EOL><DEDENT>bg=None;<EOL>if arguments['<STR_LIT>']=='<STR_LIT>':<EOL><INDENT>bg=rgb(<NUM_LIT:0>,<NUM_LIT:0>,<NUM_LIT:0>)<EOL>fg=rgb(<NUM_LIT:5>,<NUM_LIT:5>,<NUM_LIT:5>)<EOL><DEDENT>elif arguments['<STR_LIT>']=='<STR_LIT>':<EOL><INDENT>bg=rgb(<NUM_LIT:5>,<NUM_LIT:5>,<NUM_LIT:5>)<EOL>fg=rgb(<NUM_LIT:0>,<NUM_LIT:0>,<NUM_LIT:0>)<EOL><DEDENT>row_len=<NUM_LIT:0><EOL>if arguments['<STR_LIT>']:<EOL><INDENT>bold=True<EOL><DEDENT>else:<EOL><INDENT>bold=False<EOL><DEDENT>for count,i in enumerate(im.getdata()):<EOL><INDENT>ascii_char = _ASCII[int(((i/<NUM_LIT>))*(len((_ASCII))-<NUM_LIT:1>))]<EOL>try:<EOL><INDENT>if not arguments['<STR_LIT>']:<EOL><INDENT>raise Exception<EOL><DEDENT>color = rgb(int((img[count][<NUM_LIT:0>]/<NUM_LIT>)*<NUM_LIT:5>),int((img[count][<NUM_LIT:1>]/<NUM_LIT>)*<NUM_LIT:5>),int((img[count][<NUM_LIT:2>]/<NUM_LIT>)*<NUM_LIT:5>))<EOL>print_color(ascii_char, end='<STR_LIT>', fg=color, bg=bg, bold=bold)<EOL><DEDENT>except:<EOL><INDENT>if bg and bold:<EOL><INDENT>print_color(ascii_char, end='<STR_LIT>', fg=fg, bg=bg, bold=bold)<EOL><DEDENT>elif bold:<EOL><INDENT>print_color(ascii_char, end='<STR_LIT>', bold=bold)<EOL><DEDENT>elif bg:<EOL><INDENT>print_color(ascii_char, end='<STR_LIT>', fg=fg, bg=bg)<EOL><DEDENT>else:<EOL><INDENT>print(ascii_char, end='<STR_LIT>')<EOL><DEDENT><DEDENT>row_len+=<NUM_LIT:1><EOL>if row_len==width:<EOL><INDENT>row_len=<NUM_LIT:0><EOL>print('<STR_LIT>')<EOL><DEDENT><DEDENT>
Display the ASCII art from the image.