├── .gitignore ├── LICENSE ├── README.md ├── ascii_art ├── __init__.py ├── ascii.py └── picture.py ├── examples ├── cat.jpg ├── cat_scale1_html_block.html ├── cat_scale1_html_kitten.html ├── cat_scale2_block_color.png ├── cat_scale2_color_name.png ├── cat_scale2_color_numbers.png ├── cat_scale2_draw.txt ├── cat_scale2_draw_ascii.png ├── cat_scale2_full_range_color.png ├── cat_scale2_html_block.html ├── cat_scale2_html_kitten.html ├── cat_scale5_block_color.png ├── cat_scale5_color_name.png ├── cat_scale5_color_numbers.png ├── cat_scale5_draw.txt ├── cat_scale5_draw_ascii.png ├── cat_scale5_full_range_color.png ├── draw_a_cat.py ├── shades.png └── shades.py └── setup.py /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | *.pyc 3 | *.idea 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 jontonsoup4 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # What is ascii_art? 2 | `ascii_art` easily converts images into ascii artwork. `ascii_art` now supports colored ascii art as well as the ability to convert colored ascii to html. 3 | 4 | # Example script 5 | For a full example script, see [draw_a_cat.py](https://github.com/jontonsoup4/ascii_art/blob/master/examples/draw_a_cat.py). 6 | For a full list of example output, see [examples](https://github.com/jontonsoup4/ascii_art/tree/master/examples). 7 | [Working colored HTML of an ASCII kitten using the character set 'kitten'](http://htmlpreview.github.com/?https://github.com/jontonsoup4/ascii_art/blob/master/examples/cat_scale2_html_kitten.html) 8 | 9 | Reads `cat.jpg`, upscales the quality by 5, saves an ASCII rendering to `cat_scale5_draw_ascii.png`, saves a colored ASCII rendering to `cat_scale5_full_range_color.png`, and saves a text file containing the raw ASCII. 10 | ``` 11 | from ascii_art import ASCIIArt, ASCIIPicture 12 | 13 | picture = ASCIIArt('cat', 5).draw_ascii(curve=1) 14 | ASCIIPicture(picture).save('cat_scale5_draw_ascii.png') 15 | 16 | colored_picture = ASCIIArt('cat', 5).draw_color_ascii(ASCIIArt.FULL_RANGE, curve=1.5) 17 | ASCIIPicture(colored_picture).save('cat_scale5_full_range_color.png') 18 | 19 | with open('cat_scale5_draw.txt', 'w') as f: 20 | f.write(''.join(picture)) 21 | ``` 22 | 23 | ## Before 24 |  25 | ## After ASCII 26 |  27 | ## After ASCII Color 28 |  29 | 30 | # Setup 31 | `python3 setup.py install` 32 | 33 | # Dependencies 34 | `Pillow==3.0.0` 35 | 36 | -------------------------------------------------------------------------------- /ascii_art/__init__.py: -------------------------------------------------------------------------------- 1 | from .ascii import ASCIIArt 2 | from .picture import ASCIIPicture 3 | -------------------------------------------------------------------------------- /ascii_art/ascii.py: -------------------------------------------------------------------------------- 1 | from PIL import Image 2 | 3 | 4 | class ASCIIArt: 5 | GRAYSCALE = " .,:'`\";~-_|/=\<+>?)*^(!}{v[I&]wrcVisJmYejoWn%Xtzux17lCFLT3fSZ2a@y4GOKMU#APk605Ed8Qb9NhBDHRqg$p" 6 | FULL_RANGE = GRAYSCALE 7 | HALF_RANGE = GRAYSCALE[::2] 8 | QUARTER_RANGE = GRAYSCALE[::4] 9 | EIGHTH_RANGE = GRAYSCALE[::8] 10 | BLOCK = "#" 11 | 12 | def __init__(self, picture_path, scale=1): 13 | """ 14 | Converts an image to ASCII Art 15 | 16 | :param picture_path: path to ascii_picture name including extension 17 | :param scale: 1 is roughly the original grey_image size. Can be larger (3), can be smaller (1/4) 18 | """ 19 | if '.' not in picture_path: 20 | picture_path += '.jpg' 21 | self.picture_path = picture_path 22 | self.color_image = Image.open(picture_path) 23 | self.scale = 7 / scale 24 | self.width = int(self.color_image.size[0] / self.scale) 25 | self.height = int(self.color_image.size[1] / (self.scale * 1.8)) 26 | self.color_image = self.color_image.resize((self.width, self.height), Image.BILINEAR) 27 | self.grey_image = self.color_image.convert("L") 28 | self.ascii_picture = [] 29 | 30 | def draw_ascii(self, char_list=' .:-=+*#%@', high_pass=0, low_pass=0, curve=1.2): 31 | """ 32 | Draws ASCII art using the given parameters. Using an alternate char_set allows for custom ASCII. Use 33 | sort() to return the correct order if you aren't sure what the greyscale order of the character set is. 34 | 35 | :param char_list: sets the characters used in ASCII rendering 36 | :param high_pass: 1 to 100 removes darker areas 37 | :param low_pass: 1 to 100 removes lighter 38 | :param curve: defaults to linear. curve > 1 is lighter. 1 > curve > 0 is darker. curve < 0 is grey 39 | :return: list of all characters in the ASCII piece. Use .join() to display the text 40 | 41 | """ 42 | for y in range(0, self.grey_image.size[1]): 43 | for x in range(0, self.grey_image.size[0]): 44 | brightness = 255 - self.grey_image.getpixel((x, y)) 45 | if curve < 1: 46 | choice = int(brightness * (len(char_list) / 255) ** curve) 47 | else: 48 | choice = int(len(char_list) * (brightness / 255) ** curve) 49 | if choice >= len(char_list): 50 | choice = len(char_list) - 1 51 | self.ascii_picture.append(char_list[choice]) 52 | self.ascii_picture.append("\n") 53 | if low_pass > 0: 54 | low_pass = int(low_pass * len(char_list) / 100) 55 | for i in range(low_pass): 56 | self.ascii_picture = [char.replace((char_list[i]), ' ') for char in self.ascii_picture] 57 | if high_pass > 0: 58 | high_pass = int(high_pass * len(char_list) / 100) 59 | for i in range(high_pass): 60 | self.ascii_picture = [char.replace((char_list[-i]), ' ') for char in self.ascii_picture] 61 | return self.ascii_picture 62 | 63 | def draw_color_ascii(self, char_list=' .:-=+*#%@', high_pass=0, low_pass=0, curve=1.2): 64 | """ 65 | Color adaptation of draw_ascii. 66 | 67 | :param char_list: sets the characters used in ASCII rendering 68 | :param high_pass: 1 to 100 removes darker areas 69 | :param low_pass: 1 to 100 removes lighter 70 | :param curve: defaults to linear. curve > 1 is lighter. 1 > curve > 0 is darker. curve < 0 is grey 71 | :return: list of lists. list[0] contains ASCII character, list[1] contains color value 72 | 73 | """ 74 | ascii_picture = self.draw_ascii(char_list, high_pass, low_pass, curve) 75 | color_code = self.get_color_codes() 76 | ascii_color = [] 77 | count = 0 78 | for index, char in enumerate(ascii_picture): 79 | if char != '\n': 80 | ascii_color.append([char, color_code[count]]) 81 | count += 1 82 | else: 83 | ascii_color.append([char, '#000000']) 84 | return ascii_color 85 | 86 | def draw_html(self, char_list=' .:-=+*#%@', high_pass=0, low_pass=0, curve=1.2, background_color='white'): 87 | """ 88 | HTML adaptation of draw_ascii. Formats colored ASCII to HTML 89 | 90 | :param char_list: sets the characters used in ASCII rendering 91 | :param high_pass: 1 to 100 removes darker areas 92 | :param low_pass: 1 to 100 removes lighter 93 | :param curve: defaults to linear. curve > 1 is lighter. 1 > curve > 0 is darker. curve < 0 is grey 94 | :return: string of HTML formatting 95 | 96 | """ 97 | init_draw = self.draw_ascii(char_list, high_pass, low_pass, curve) 98 | ascii_picture = [char for char in init_draw if char != '\n'] 99 | num_breaks = len(init_draw) - len(ascii_picture) 100 | hex_codes = self.get_color_codes() 101 | html = ['
'.format(background_color)] 102 | for index, char in enumerate(ascii_picture): 103 | if index % (len(ascii_picture) / num_breaks) == 0 and index > 0: 104 | html.append('') 107 | return ''.join(html) 108 | 109 | def get_color_codes(self, mode='hex'): 110 | """ 111 | Gets the color value of every pixel in the transformed picture 112 | 113 | :param mode: hex or rgb 114 | :return: list of color codes in the picture 115 | 116 | """ 117 | color_codes = [] 118 | for y in range(0, self.color_image.size[1]): 119 | for x in range(0, self.color_image.size[0]): 120 | r, g, b, = self.color_image.getpixel((x, y)) 121 | if mode.lower() == 'hex': 122 | color_codes.append('#{:02x}{:02x}{:02x}'.format(r, g, b)) 123 | elif mode.lower() == 'rgb': 124 | color_codes.append((r, g, b)) 125 | else: 126 | print('Please choose hex or rgb') 127 | return color_codes 128 | 129 | @staticmethod 130 | def sort(char_list): 131 | """ 132 | Sorts a string of characters from lightest to darkest when represented in ASCII art 133 | 134 | :param char_list: string of characters 135 | :return: sorted string of characters from lightest to darkest 136 | 137 | """ 138 | output = [] 139 | for i in char_list: 140 | output.append([i, ASCIIArt.GRAYSCALE.index(i)]) 141 | output = [x for (x, y) in sorted(output, key=lambda x: x[1])] 142 | return ''.join(output) -------------------------------------------------------------------------------- /ascii_art/picture.py: -------------------------------------------------------------------------------- 1 | from PIL import Image, ImageDraw 2 | 3 | 4 | class ASCIIPicture: 5 | 6 | def __init__(self, text, background_color='white'): 7 | """ 8 | Class for saving and displaying ASCII art. Automatically checks if the text is in color. Background can be 9 | hex, rgb, or html color name. 10 | 11 | :param text: ASCII text 12 | :param background_color: color of the background. Takes standard html names 13 | 14 | """ 15 | self.text = text 16 | dummy = Image.new('RGB', (0, 0)) 17 | d = ImageDraw.Draw(dummy) 18 | text = ''.join([char[0] for char in text]) 19 | d.text((0, 0), text, fill=(255, 255, 255)) 20 | width, height = d.textsize(text) 21 | self.width = width 22 | self.height = height 23 | self.ratio = self.width / self.height 24 | self.img = Image.new('RGB', (self.width, self.height), background_color) 25 | d = ImageDraw.Draw(self.img) 26 | if type(self.text[0]) == list: 27 | text = ''.join([x[0] for x in self.text]) 28 | colors = [x[1] for x in self.text] 29 | lines = len([x for x in text if x == '\n']) 30 | if lines == 0: 31 | print('Try using draw_color_ascii instead') 32 | exit() 33 | char_in_line = int(len(text) / lines) 34 | move_y = float(self.width / (char_in_line - 1)) 35 | move_x = float(self.height / lines) 36 | char = 0 37 | for x in range(lines): 38 | for y in range(char_in_line): 39 | d.text((y * move_y, x * move_x), text[char], fill=colors[char]) 40 | char += 1 41 | else: 42 | d.text((0, 0), text, fill=(0, 0, 0)) 43 | 44 | def save(self, save_name, new_height=0): 45 | """ 46 | :param save_name: path to desired save location 47 | :param new_height: optional parameter for new y size 48 | 49 | """ 50 | if '.' not in save_name: 51 | save_name += '.png' 52 | if new_height == 0: 53 | self.img.save(save_name) 54 | else: 55 | self.height = new_height 56 | self.width = int(new_height * self.ratio) 57 | self.img = self.img.resize((self.width, self.height), Image.BILINEAR) 58 | self.img.save(save_name) 59 | 60 | def show(self, new_height=0): 61 | """ 62 | :param new_height: optional parameter for new y size 63 | 64 | """ 65 | if new_height == 0 or type(new_height) == str: 66 | self.img.show() 67 | else: 68 | self.height = new_height 69 | self.width = int(new_height * self.ratio) 70 | self.img = self.img.resize((self.width, self.height), Image.BILINEAR) 71 | self.img.show() 72 | -------------------------------------------------------------------------------- /examples/cat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jontonsoup4/ascii_art/f36e0724c8e1c94631c673e2d9803a1861ea5bed/examples/cat.jpg -------------------------------------------------------------------------------- /examples/cat_scale2_block_color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jontonsoup4/ascii_art/f36e0724c8e1c94631c673e2d9803a1861ea5bed/examples/cat_scale2_block_color.png -------------------------------------------------------------------------------- /examples/cat_scale2_color_name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jontonsoup4/ascii_art/f36e0724c8e1c94631c673e2d9803a1861ea5bed/examples/cat_scale2_color_name.png -------------------------------------------------------------------------------- /examples/cat_scale2_color_numbers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jontonsoup4/ascii_art/f36e0724c8e1c94631c673e2d9803a1861ea5bed/examples/cat_scale2_color_numbers.png -------------------------------------------------------------------------------- /examples/cat_scale2_draw.txt: -------------------------------------------------------------------------------- 1 | ................................................................................................................. 2 | ............................................................................................................... 3 | ............................................................................................................... 4 | .......................................................................................................... 5 | ................................................................................................. 6 | ............................................................................................... 7 | . ............................................................................................. 8 | . ............................................................................................. 9 | . ............................................................................................ 10 | ........................................................................................ 11 | ...................................................................................... 12 | ....................................................................................... 13 | ........................................................................................ 14 | .:-==-::. . ........:::::::....... ...................................................................... 15 | .=++*###*=:.. .........::--========--::......... ..........................::::................................... 16 | .:===+**##+=-:... ....:::------++++*******+++=-:::............................:==++*+++:................................. 17 | .:=+++++**##%#*+=:... ..:::-=++++===+**+*###**#***#*+======-:.......... .........:-++==-==++=.................................. 18 | :=++==++****#%%%#*=-::....:-=+++*###*+=+###**#########%%#*+*+**+=--:::..........:-==+==---==+***=.. ............................... 19 | .=+*+++++*****#%%@%%#**+++*****##%###+++*#%####%#####%%%#***#%%##*+++-::....::-+**+=---==+***#**-. 20 | .-+******++*****##%%@%%%####***#%##%%*+++#%#%###*###%%%%####%%%%%###***===+++***+=--=+*+****###+: 21 | .=+*****+++++***#####**####****##%%%*+++*#%%#***###%%%%***%%%@%%##**#####%%#+=-===++****#####*=. 22 | :+**##**++==+***#**+++*+****+*#%%%#***++*#%*+***#%%###**###%@@%%###**#*##*+++******####%%%%#+. 23 | .-+**##**++==++++++++++++*****%%%%#**+=++##*+#**###*#**+*#%%@@@%%#***#*##*+**##**####%%%%%#*: 24 | .-+*#*****+=-====+++++++*+*##%%%%%#*+==+******#*#****+**#%%%@@@%#*######*+***####**#%%%%#*-. 25 | :=+***#*==---===++****+*+*###%%%%%%*==+++##***##*****##%%%@@@@####%##%##**++**##%%%%%%##=. 26 | .-==+***=---=+++**********#%*%%#%%%%*+++*###*#%#***#%%%@@@@@@##%%%%%%###*****+*#%%%%%%#+: 27 | .::-+**+====+**********###%##@%**%%##*+**###%@#*##%@%%%%%@@#%%%%%%########**+*#%%%%##*- 28 | ...:-+*#*===++*******##*##%%%#%%*+*%#%%#**#%%%%##%@@%%##%%%#%%%%%##%%%%%%###*+*##%%#**=. 29 | .::-=*##*+==++*******####*#%%%%%+++#*%%%##%@@%%%%@@@%***#%%%%%%%##%%#######****#%%#*+=:. 30 | .::-=*#**+++++******###*####%%%#*===*#%@%%@@@@%%@@@%#+**%%%%%%%######*#########%@@%*+=-. 31 | .-::=+**+++++++++****###****##%@%#+==+#%@%@@@@@@@@%%#*+*#%@@%%##***##*********##%%%%*+=-. 32 | .-===++===+++++++****##%#*++*#%%@%*===*#%%@@@@@@@@%#***#%@@%%#****#######******##%%%#++=. 33 | .-=======++++++*****##%%%*++*#%@%#==+*#%%@@@@@@@@%#***#@@@%#***#%%#%####*******##%%#**+: 34 | -==--::::::................. .-==========++++++++++**##*++*%@%#=+*#%%%%@@@@@@@@%#**%@@%#*+*#####******#*******####*-. 35 | **********+++===========+++=------::.......:-=========++++=++====++++****#%%#**#%@%%%@@@@%%%%%####%%##*********+********+****##*=. 36 | *####**********+*********##*******++====--::--====---==++++==---=++*****#######%%%%#%%%@@@%%%%#*****####***++++++*+****++++*****=: 37 | #####******************###########******+=----===+=-====+++===+##%%%%%%%%%#*++***#**#%%@@%%%%#*****##%%%%%%%#*+=++*****++++*****=. 38 | #**********************#################*++=====++======++**+=#+-==*%%%%@@@#+===+*+**%%@@%%##**+++%@%%%%###**##*******++++*****=: 39 | ****++++*****####*****####**********######**+===++=+*#####%*-=*::=*%%%**#%@%*---+++**%%%%%%##*+++#@@%*#@%#*=-=#**#%######**##*+: 40 | +++=====++******************++++++++*********+++++=*#%%%%#*=-=#+--=##*+*#%@@#=--=+++#%%%%%%%#+++*%@%%#%@@%*+-=#*+*#%%%@@@%###*=. .. 41 | ++========++*************++++++++==+++++++***++++++####*++=--=#%*===++*#%@@@%+--====*##%%###*+++#@@@%###%#*+*##+=+**#%%%@%##*+: ......::::.. 42 | ++++++====++*******************++===++++++++++++=+*#****++===-+%%%####%%@@@%#+---===***######*+*%@@@@%###**#%%*==++*####%%##*-. .:::---===-::..::::... ..... 43 | ++++++++=++***+++++++*********#*++=++++++++++++++*##*++*#****+=+*#%%%%%%##*++*+-====++***#**###%%%%%@@@%%%%%#*+++**###**#%#*+--::.....:::-:::::-====+++**+====+++=--::---- 44 | ++++++++++**++++====+++**********+++****+++++**++*#*+==**##%%#**+++====----+*#**+====+++*##*#%%@@%*+********++*#######**#%#*+++++=---===+++=====+++++*****************++++ 45 | *++*****++++++=====+++****+*************++*****++==++===+*#%%%%###*++==---=*%%%*=======+*#####%@@%#++++++***##%%%#####*##%#*++====-------=======++++*******###########**** 46 | *******++++++=====++***************++==++****#*++===++++++*##%%%%###****++#%%#*++++===+**##%##%%@@%####%%%%%#%%#####***##**+=---==---==---=====+++++*****##%%%%#########** 47 | ++++++++++++++=++++**************+++=-==+*####*++++++*###*###%%%%%%%##**#######*++=++++*##%%%%%@@@@%%%%%%%%%%%%%%##*###*+++=-::--===++++===++++=+++====+++****+++++++++++= 48 | ===================+++++++++++=======-=++*#%%#*+==+++*######%%%%%%%%%%#*#***##*+++=+++**#%%%%%@@@%@%%%%%%%%@@@@@%%%%%%%*===-::.::-======-----------:::::::----:::::::::::: 49 | ----------===-------=====-----------==++*##%#*++==+++***+++++++**##**####*+**##+++++****#%%%%%@@%%%%%%@@%%%%%%%%%%%%%%*=--:::...::::::::.::::::::::....................... 50 | ------::----------------------------==+**#%%#*++==+*++=======+++++++*##%#*++++*++++****#%%%%%%%%%%%%@%%%####*#######*+=-:::::...::::...................................... 51 | --------------------------------=====+**##%%#*+++=+**+======+***+=--=++*###+--+***##%%%%%@@%%%%##%@@@%%%#****####*++=--::::::::::::::.............................:::::::: 52 | ================---======-----========+*#%%%%*++==+**+++++=====+=-::-=+++**+-:-=#%%%%%@@@@@@%#**##%%###*+++*###**+=---:::::::::::::::::::::::::::::::::::::::::::::::::--- 53 | ===+++++++++========+++===============++##%%#**+==+****+++===-----::-=+*###+==:-=*%%%%@%@@%#****##%%%%#*+++*****+====---------------==------------------------------------ 54 | +++++++++++++++++++++++++++++++++++++++**##%%#*+==++*++++++=======-:--==++++==-==+*%%@@%%%#**++***###***+++*##**+===============--===============================--------- 55 | *********+++++++++++++++++++++++++++++***#%%%#*+====++++++++++++==--::--++*++**+**##%%%%####**********++**###*+=--==++++++=++++============++++++++++==============------- 56 | *********+++++++++++++++++++++++++++++***#%%%#*+====+***##*+===-===-:::::-==++*****##%%##****++++++++++*###***+=----==++++++++++++++=================+=============------- 57 | ***********++++++++++++++++++**++==++****##%%#*+=====+***+===---==-----:::-::-=+**#######**++====+++#**#####***+==-----=++**++++++=+++=========---====================---- 58 | *************+++++**********+++++=++*****##%%%#*+==-=+++++++=++++=-=---::--:--::-=++++++++===++*+****#*######*##+=---:--==++++*+++++++++================================== 59 | +++++******************+***+++++==++++****##%%%*+=---=+*****%###*++*+++===---=--========++++**##*##**######%%%#*+=--:-----====++++++++==============+++++============-==== 60 | ********************++++****+++++=++==+****##%#*+===--=+*#*##*#*==**++*+**+======+++********##%%#@%#%%%#%#%%%#*+===-:::--------===++++++===============+++====--------:::- 61 | *****************************+++++++++++*######**++==-==***#***+=+++**+**#**+=----=+++****+*#%@%%@%##%%*#***#**+====----------------==++++==================---=====----:: 62 | ********++++*****************+===+++****##%%##**++========+++**+====**+*+**##*=----==++*****#%@%@@###%%*##***###*=====---:---------:--==++++++++===----================--- 63 | ******************#########**+=====++*##%%%#*+++========-===**+=+++=+*+***#%%#+=----==++*###%@@%@%##*##*#%##*%##*+======-----=-----------=+++++++++======--========-====== 64 | +*********################**++=====++*#%%#*+===++++++++===+*###+*#*+***%#*#%@%#+=---==++*##%%%%%##*#*%#**###******++++=++==-====---==-----==++***#****++++==============-= 65 | ####*****######%%%########**+==++****##%%#*=-=++***#**+====*###++**+***###*#%%#*=-==+++++*####***##%#@%%*###**#**#*+*++++++===++=--==++++====++*##%###*********+++++++++++ 66 | ###***########%%%###********=====****#%@@%#***###%%%##+===-=+++==+++*****##*###*+==+**++**#*+=++*##****#*#%%*######+***+++=======---==+++++++===++*##%%##***####***+++***+ 67 | ######%%%#########*****+***+----=+***#%@@%%#%@@@@@@%%%#+++===+++=+**++****######*+++++++*##+-=+++=----=+++*#**#***#**#***++======---====++*++=======+*#%%%########******** 68 | ################********##*+=---=*%%%%%@@@%%@@@@@@@@@@%*##*====+==++=+*#**######*++++++*#%#==+=::::----==++***#***#**###****+============+++===========+#%%%%%####***##### 69 | ***++*****########*+===**#*+=+++*#@@@%@@@@%@@@%%%%@@@@%####**++++=+****##*#%%###*++***+*##*==:..::-==+++++++++***###*#%##*#**++===++=====+++=============+*##%%%%%#****### 70 | +++++++++++***#####*+==+**+++*++*######%@@@@%##%%%@@@@%%%%%##*+===+*******##%####++*##**##+-....:-=++***#***++*******#%#******++==+**+=======+++++++****+++++++#%%%%####** 71 | ++++++++===+**************++++*******#%@@@%%%%%%%%%%%%%%%%%%#**=--==+*****#######*+*####%#+-....:-=+***+*###*##*****+*##***##******##**+++++++++*****###****+===*#%%%%%%%# 72 | ******##*++**##**+++******++***+++**%@@@@%##%%%%%%%%%%%##%%##*++=--==+****#####%%#*+***#%#*=:.::-=++****####***####**########*********+++*##*****#*****####**+===++*#%%%%% 73 | ***#########*********+++++*+++==+#%@@@@%%##%%%%%%%%%%%%##%####*+=-:-==+***#*###%%#***+**##*-..::-++*+++********+**#*********+++++++=+++++++*+++*++++***##%###*+++=++++*#%% 74 | ***#####***************++++===+#%@@@@%%%#%%%%%%%%%%%#%%%##*****+=--==++++**#*##%%####*****+:..:-=++**++**#*****++*************++++**+++++++++==++===++++**++*****++++++++* 75 | *****##*+++****++******++****#%@@@@%%%%%%%%%%###%%####%#**+**++++====+********#%#######**+=:.:-===++++++***#******##***#######*+++*+++++===+===+++=====+++=====+++**++++++ 76 | *#****+=++***+++*##*+*+**##%@@@@@%#%%%%%%%######%###%##*+++*++***+==-=+##*++++###*****###+-:.:-==+*++*#************#***###%#####*++******+=====+*++==--========++++***++++ 77 | ****+++****+++**##*+++*#%%@@@@@%#%%###%######**######*+++**+++*#*++=--=***+===+********##+-.::-=+*#****##****+++++++*###%%%%%#####*+*#******+===++++++=+=======++++++**+++ 78 | ++++++***++++***+===+*#%@@@@@%##%###################*++***+=+*****+=--=###+===*##*+*####*=:::--=++****+++++++++++++=+**##%%%%%%##%#***##***##+====+****+=+++==-====+++**** 79 | ***++++++++***++===*#@@@@@@%##########%%%##%%######*++***+=+*****++++=+###*++*#%@%**#%%#+--==+==++**+++++++***+*+**++**######%%%%####*+*#***##*+====++*+==+**+=--===+++++* 80 | **++++++***+*+==++*%@@@@@%######%#########%####%%#+=++*#*++***++=++====++**++**%%%#####*=-=++===++***********++++*#*++#*######%%%%#**#*+*#*+***++=----=++++++***++++=+++++ 81 | ++===+*#*+====+*#%@@@@@%####%%%%%%##%#####**#%%%#+=+****++*++**++*+===+++*+=+++##*+++++++--=-===++*#**++++++=++++***+*##**#*####%%%#***+=+++++++++=---==+*+=+++***++*+++** 82 | ++=+***++===+*#@@@@@%#######%%##%#####%%#**#%%%#+=+***+++**+++****+=-==+***+===***+**+=++=--====++*#**+++**+++++++++*#%%#**##%##%%%%##***++++++++++++======-=+======++++** 83 | *+++**+=====*%@@@@@########%%####%###%%#*####%%*++++*+=+****+=++++*=::-:--=+++*##*+**===*+======+****++=+*#*++**+++**#%%%###%##%#####*****+++++=+++#**+==----=+=--====++** 84 | #*+==++=*#*#@@@@@%##%%###%%%%##%%#*#%%#*####%#*++++**=-+***++=+===++----:--=++*%%*====++#+==--:-*#*+=====**+=+*##*#%%##%%%####*##******+++**+==++++***+=-::---===+#######* 85 | *+=++**#%@@@@@@%###%%#####%%%%%%###%%*#%###%#++***#%*==*#**++===--=*++=----+*+*#*=----=+#+==---+##+=--==+##***#@%*##%#*######*******+*******+===+++====++----====++++++**+ 86 | ++++*%@@@@@@@%###%%##%%%%%%#%%###%####%%#%%#++######*++***++*+=+=-=#**+=-==*****+-----=+*=-=+**#%**+++***#**#%@@%++*##+=++=+****#******####*++++==+++=-==--===+++++==-=+++ 87 | +**#@@@@@@@%*##%%%#%%%%%%#%%######*######%#+=*###%#*++++*#***++*--=##**==+#*+**++=----=##=-+***#%######*=+==#@@@%+-=+#*=-=++**####*++*****##**#*+=+=====--=====-=++++====+ 88 | *%@@@@@@@%*#%####%%%%%%%%%%%##%%#**####%%#+==++*##+=+*++*###*+++--=%#*#*+*##+**+**+++++%#*+=***####*#%#*==*+%@@@#*---+#+=-=*#*#####***++*#*#####****+=--====+**+****++++== 89 | @@@@@@@%##%%###%%%%%##%%%%##%%%#*#####%%#+++===+*+==+*+*****+=+=--+%**#==###*+***#****+%#*+=+**######%#**=+#%@@@#+=+=-=++=-=*######**#*++**==+#####*#*+==**++*#****#**+=+= 90 | @@@@@#*##%%##%%%%%%###%%####%%###%%###%*=++===++=+==+++++==+====-=+%==+-=*#*++*****++*=##+=-=+++#####%#**-=%%@@@%+=++=-=**=-=#####**###***#*+*###**#***+-=++++=*##*+***=== 91 | @@@@#+##%%%%%%%#%###%%###%%%##%%#%%%%%*++++=+****===+=====+=-=-=-=+#=++-++*+*+++*#*+===#*=---==+####*##**+=#@@@@@*++**===*++-=+**##**#######**##*##*++##*=-=*#*++*##***+== 92 | @@#+*#%#%%%%%%%####%%###%%%##%%###%%%++**++**#****++=---=+*=-=---*+#=+=-+##**+--+*++==+%+---=+=+######*##*=*@@@@@%*++#*=====-:-+**#*+**#***##****##**+*###+=**##*+=++=+*** 93 | %+=*%%#%%%%%%%%##%%#####%%##%####%%%*=+**+*##%*++**+====-=*+===:=%++=+==+####+::=**+*==#**+=+=-+#*#######*==@@@@@@#+++#*==+=--:=*#**===*+++*#*+++#**********+==*##*+==+*** 94 | -------------------------------------------------------------------------------- /examples/cat_scale2_draw_ascii.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jontonsoup4/ascii_art/f36e0724c8e1c94631c673e2d9803a1861ea5bed/examples/cat_scale2_draw_ascii.png -------------------------------------------------------------------------------- /examples/cat_scale2_full_range_color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jontonsoup4/ascii_art/f36e0724c8e1c94631c673e2d9803a1861ea5bed/examples/cat_scale2_full_range_color.png -------------------------------------------------------------------------------- /examples/cat_scale5_block_color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jontonsoup4/ascii_art/f36e0724c8e1c94631c673e2d9803a1861ea5bed/examples/cat_scale5_block_color.png -------------------------------------------------------------------------------- /examples/cat_scale5_color_name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jontonsoup4/ascii_art/f36e0724c8e1c94631c673e2d9803a1861ea5bed/examples/cat_scale5_color_name.png -------------------------------------------------------------------------------- /examples/cat_scale5_color_numbers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jontonsoup4/ascii_art/f36e0724c8e1c94631c673e2d9803a1861ea5bed/examples/cat_scale5_color_numbers.png -------------------------------------------------------------------------------- /examples/cat_scale5_draw.txt: -------------------------------------------------------------------------------- 1 | .................................................................................................................................................................................................................................................................................................. 2 | ............................................................................................................................................................................................................................................................................................ 3 | ............................................................................................................................................................................................................................................................................................ 4 | ...................................................................................................................................................................................................................................................................................... 5 | ...................................................................................................................................................................................................................................................................................... 6 | ...................................................................................................................................................................................................................................................................................... 7 | ........................................................................................................................................................................................................................................................................... 8 | ...................................................................................................................................................................................................................................................................................... 9 | ................................................................................................................................................................................................................................................................................. 10 | ................................................................................................................................................................................................................................................................ 11 | .......................................................................................................................................................................................................................................................... 12 | .................................................................................................................................................................................................................................................... 13 | .... ......................................................................................................................................................................................................................................... 14 | ..... ......................................................................................................................................................................................................................................... 15 | ... .......................................................................................................................................................................................................................................... 16 | .... . ......................................................................................................................................................................................................................................... 17 | ... ......................................................................................................................................................................................................................................... 18 | ... ......................................................................................................................................................................................................................................... 19 | ... ......................................................................................................................................................................................................................................... 20 | ... ......................................................................................................................................................................................................................................... 21 | .. .. ......................................................................................................................................................................................................................................... 22 | .. ............ ........................................................................................................................................................................................................................ 23 | .. ............................................................................................................................................................................................................................. 24 | . ............................................................................................................................................................................................................................. 25 | . ............................................................................................................................................................................................................................. 26 | . . ....................................................................................................................................................................................................................... 27 | .. ........................................................................................................................................................................................................................ 28 | . .. .. ............ ................................................................................................................................................................................................... 29 | . .. ... ................................................................................................................................................................................................................. 30 | . . .. .................. .. ............................................................................................................................................................................................... 31 | . . ... ................. .................................................................................................................................................................................................... 32 | . .. ................................. ........................................................................................................................................................................................... 33 | . .... ...................:......................... ...................................... ......................................................................................................................................... 34 | ..::::::::...... . .... ...........::::..::::::.:............ ....... .. .... ..... .. ... ......... ......................................................................................................................................... 35 | .:-==+***##***+=--::. ... . ..... ..........::::----::---::::::::............... . ........... ... ..... ............. .................................................................................................................................. 36 | .-*######%%%@@%%##*=-:.. ..... ...................:::::----====--==-=------::::::.......... .. ........... .. ................................................................................................................................................................ 37 | .:=+======+*##%%%@@%%#+-.. . ...... ............::..::::::----=====+++===+++=======-----:::::......... ... ....... . ...... ...... .... ...................................................::........................................................................................... 38 | :::::--===++++**#%%%@%%*-:........ ...........:...:::::::::::----===++=+*+*+=+++**+++++=+=====--:-:.::................... . ..... ..... ..... ......... ..................................::-===+++==--:::.................................................................................... 39 | ..::---===+++=+++**##%%@%*+=-:::....... .. ......:..::..::-:::-::--:----=+==++++++***#***++***++****+=++=+==--:::::::...................... ...... ............... ..............................:---=*###%%%###***+=:.................................................................................... 40 | .::-==========++++***##%%%%#**+=-:::...... ......:..::::-:---=---------==-=+**++*+++**######********#****+++++++==--:--::::::.:::::.......... ................... ........... ...............::-=+**####*+++++++++**=:.... ............................................................................... 41 | ..:--=====++++++********##%%@%%%#*+==--::...... . . .....::.::::::=--=-===+====---===+=+******++**#######******#*#************+=--==------:-----::.............. ........... ........ ...............:-++*##**==--:---====++++=:.................................................................................... 42 | ..:--==+++++++++++++*******#%@@@@@%##*++=-::........ ......::::::----=+=+++++++++======+++*#*****=+#*#%#%%##*****####*******####**++===============--:............. ........... ......... ............:::=*###*+=-:::---===+++++++=-.. .. .. ......................................................................... 43 | .:--=+++++++++++++++++*******#%@@@@@@%###*=-:::...... ... .....:::-==--=====*********+++=====++=+*###***=+#*###%%#*****####%#***####%####**+++++**++==+*++=-:::...::................. ... .............:::..::-=++****+=-::----====+++****++=:..................................................................................... 44 | .:--=+++++=====++++*****+******#%%@@@@%%%%#*+==-::::..............::::--=++====+++**######****+====+++##%%###*++**######*####%##%%%*######%%%###*+++++***++*****+==-::::::..::..............................:::-----=+***+=---::---=====++*******++=:.. .............................................................................. 45 | .:-==++++==---===+++***#*********#%@@@@@@@@%#**+===-:::::..::..:::---=++***+++***###########*+++==++*##%%####*+**#########%%%%#%%#####%%%%%%%%#***+++***+#####***+=====-:::::::.........................::--==+++****+=-::----==--===++*********++=:... ............................................................................... 46 | .:-==++++++++++++=+++***##*********#%@@@@@@@@%%%#***++===-----:-=-++++********########%####**+==++++*#*##%%%#**#*##%###%##%%%%##%###%#%%%%%%%%##**++*****%#%%####**+++=-=---==-::.....................:-==+**####**=-:::-------=+++*************++-:.... ...... ...... ...... 47 | .:-=++*****++++++++++++**********#***#%%%@@@@@@@%%%%%##***+++*++*******##*+***######%%%######*++++=+*#*#%%%##*###*#%%%%%%##%%#####*#%%%%%%%%%%#*********%%%%%%##%##***+++++++=--::::............::::::=++*##%##*+--:::-----===++*********####****+-... ................. ..... ........................... 48 | .:==++******++++++++++*********#####***##%@@@@@@@@@@%%%%%%###%######**##*+***#%%#%%%%%###%###+++==++**#%%%%#*#######%%%#####*####*%#%%%%%%%%%#**#*#+**#%%%%%%%%%%####****#**+==-=-::::::::::::-----=+###%%##+=-::::::--=+++++++++*******#####**+=:.. 49 | .:-==+********+++****+++++***#**######****#%%@@@@@@@@%%%@%%%#%%##%#####**+***#%%%%%##%##%%%##+++=+=++**%%%%####%##**#%#***#*#%####%#%%@@%%#%%###*#***#%%#%%%%%@%%%##**####**++++++--==-========++**##%###*+-:::----=+****+++++********########*+-.. 50 | .:-=+*******************++++**********###**###%%@@@%@%%%%%###%##%%###*****#**#%%###%%##%%%%*++=++=++**###%%%%%%##**###**+##%%###%%%%%@%%%#####**####%%%#%%%%@@@%########****####++************####%##*+--::----=+**##***+***********########**=:. 51 | .:-==++*************+++++==+++*********######**####%%%#*#%%##%#####%#*++*#*+*####*#%%##%%%%#++==++++**##%%#%%%%##****#*++#%%%#*#%%%%@%@%%%#*#****##%%%#%%%@@%@%%%####%##**##%%#**########%%%%%%###*+=-::--=====+++++++**********############*+-:. 52 | .:-=++*******##******++++++++++++******#########***##****###%**#####**+**#+*#%%###%#%%%%#%#+++++++++**#%%#%%%%%##**+##*+*%%##*#%%%%%%%%%%#****+*#%%%%##%@@@@@%%%%####**#**###**####*##%%%%%%#**+=--:---==++==++++++******###########%%#####*=:. 53 | ..:-=+***##**####******++**++++++++*****#########****+**+****+*#**#***+*****##%%%#%%%%%%#*#+*++*+++**+*#%##@%%%#*+++*#*+*#%###%%%%%%%%#%%#**#++*#%#%%#%%@@@@%%%%%%%###****##**####***#%%%%%*+==--======+++**+++***###############%%%%%####*+-. 54 | .:-=+****#########**+++++++====++***+***#####**#***+++++****++**+#*******++#####%%%%%%%#**+*++**+++==##**%%%%#**==***#*+*##%%%%%%##%*###**#*+*###%%#%@%@@@@%%%%%%####**###**#####**#%%##**+++===++++*********#*******#########%%%%%%%###*+-.. 55 | .:-=+++*****#######*++++++====++******++***##*++++++++*++++++****#+****+++#*#%%%%%%%%##*+*****+++===*++##%@%+**==#*+#***##%#%%#%##*###*+*****###%##%%%%@@@@@%%%%####*###*+****####********++++****###********++**###%%%%%%%%%%%%%%%%###*=:. 56 | .:-=+*****####******++++++==++++**+++++++*****+=++++++*++*++*****++**+++=*#%%%%%%@%%#%*+***#*++==+++=+##%%#+#*=+####***#%#*##%%#+###%*+*#*++#*##*#%%%@@@@@@%%%%%%%#####+******##*********++******#***##***++**##%%%%%%%%%%%%%%%%%%%##*=:. 57 | .:-=++***######****+++++++=====+*+===+===++**+==+=+++++=++=+**+*****+*#+*#%%%%%@%%%##****+**++=+*+++**#%%*+*++*#%*#***#%*###%##*#*#%#+**+++*##*#%%#%@@@%@@@@@%%%%##%%++**#####**######**+*****#########***####%%##%%%%%%%%%%%%%%%##*+-. 58 | ..:==+****#**####****++*++=======+++========+=====+++++++++++**+*****##*+%%@%%%%%#%%##*#*+*+=+==*+++#*#%%++#****#+*+*###*%##%*#***##*+*+=*+***#%#%%@@%%%%%@@@@%%%%%%*+*######***#####*+++++**####*##****###%%##***########%%######*+=:. 59 | .:-=+****###****#**##****++==-----====+=+=+++=+++++*++++++++**+++###*##*%%%@%%%%%%%%####*++==+=+===*#*%#=*###++*+*+##**###*#*#**##**+*++**+***##%@%##%%%@@@@@%%%%%*+##############****+++***##*+*#########**+++**###%%%%%%%%%%###*=:. 60 | .:-=+****####**********+++=--------========++*******+**+*+***+++*####%*#%%%%#%%%%%%%#%%%*+=+=-=-=+**+*+=+##**+++**##*##*#*****+*#*++*++*****#%%%@%#%%%@@@@@@@%%%#+############%%####******#*+**######*******##%%%%%%%%%%%%%%###*+-. 61 | .:-=++******####****+=++===--::--===========+****+**+********+++*####%#+#%%%%%%%%%%%%%%##*++=-+-=++*=+==*%###**+###**##*#**+******++++*****#%%%%%%%@@@@@@@@@@%%#+#%####%######%#%###*******+*********######%%%%%%%@%%%%%%%%###*+-.. 62 | .:-=++++*****####**++=------:---=========+=+*****+*****+++**+++*######=#%%%%%%%%%%%%%%%#**=======+*===+#%##%+*+****###%#**++**+**++*##*###%%%%%%%%%@@@@@@@@@%*+#%%##%%%%%%##%%%%#####*****+++++*****#####%%%%%%%%%%%%%%%####*+-:. 63 | ..:-====++*****####*+=-----::--===++++++=++++**********+++*#**+****#%%*+%%@@@%#%%%%%%@%%##++===+=+*+==+%%#%#**+*+*##%#%****+**+****####%%%%@@@@@@@@@@@@@@@@%*+#%%%%%##%%%##%%%#######**++++++++*******#%%%%%%%%%%%%%%%%%%###*=:. 64 | .:-======+*********+==----::-====+++++++***++++********+++*#***#**#%%#+#@@@%%%##%@%%@@@%%#*++++++++++*###%#*****##%%%%*##++**+*###%%#%%%@@@@@@@@@@@@@@@@@%+*%%%%%%%%%%#%%%%@%%%%%#**+*****+*++***+**#%%%%%%%%%@@%%%%%%%%##*+-. 65 | ..:------=+********+==-------=++==++++++**#*****++++**#****##++*#*##%%**%@@%%%##@%%%@@@@%%#**+***+++*#####%##**##%%%@%###****+*#%%%%%%@%@@@%@@@@@@@@@@@@%**%@%%####%%%%%%%%%%###***###*#***+***++++*#####%%%%@%%%%%%%%%###*=:. 66 | ..::-::--=+**###**+======--==+**+*++++***#*****#*+++**#*#*##****###%%#+#@@@%%#+####%@@@%#%******++-+###*##%%##%#%%@@##****##*#%%%%@@%%%@%%%%@@%%@@@@@@#*#@@@%##%%%%%%%%%%%%#**##%%######*****+++++***##%%%%%%%%%%%%#####*=:. 67 | ..::::::--==+***#**+=====---==++*******************+*******#####*#%%%%**%@@@%%**+##*%%@@#%*##*#*++-+*****####%#%@%@@%**+*###%%%@@@@%%%%%%%##%@%@@@@@@#*#@@%%%%%%%%%%%%%%#**#%%%%%%#######*##**++**+**##%%%%%%%%%%%#####*+-.. 68 | ...::::::-==++*****+===========+***********#**#***###******###%%##%%%%#*#@@@#%%*=*++#%@@####%#%**++******###%%%%@%%@%##**%##%@@@@@%%@%%#%%##%%@@@@@%#*#%%%%%%@%%%%##%#***#%%%%%%%%#%%#######****++++*##%%%%%%%%%%#####*+-:. 69 | .......:::-=+****###*+=====++++++*******************####****#%#%%%%#%%%%**%@@%###+++=+%%@#*##%%%%#********%%%%%#%@%%@%####%%%%@@@@@#%@%%%%#%%%%%@@@%**#%%%%%%%%%%%%##**#%%%%%%%%%%%%%%#######****+++*#%%%%%%%%%%%##****+=:. 70 | .......:::--==*######*+======++++++***+****#*****++*+***###***###%%%%%%@%#*#@@@%**#==++%%%#+##@@%%%##*****#%%%%%%%@%%@%###%%%%@@@@@%#%%%#%###%%%%@@%*#%%%%%%@@@%%%#**##%%%%%%%##%%%%%%%%%%%###***********###%%%%###****+=::. 71 | ..:::::::--==++*#%##***+=-=====+++++*****++*++*****#**#*#%%##**++#%%@@%%%%##%@@%*=**=++##%#+##@@@%%%%#***#%%@@%%%%@%%%%*#%%%%@@@@@@##%#**#####%%@@%##%%%@%%@@%%%####%%%%%%%%%%%#%%%%%%%####***+++++++++**####******+++==-:. 72 | ..::::::--=++***#####**+====+=++++*+**#**#*++*++*****#####%%#%#*++#%@@@%%%###%%%#==++++**##**#@@%@%%%%##*#%@@@@%@@%%#%#%%@%%@@@@@@@##%*=*#***#%@@%#%%%%@%%%@%############%%%%######**+++********###*###%%@%%%%##**++==--::.. 73 | ..::..::--=+**######*+++++==++=+++*******##************##*##%%%%#+*%%%%@@@%###%##+==+===+*#**#@%%@@@%%%%#%%@@@@@@@@%%%%%%@@@@@@@@@%##%+=*****#%@%#%%%@@%%%@%##%%%####%%%#%%##*++****####%#############%%@%%%%%%##**++==--:.. 74 | ..::...::--=+*######**++++++++++++*+***+**#*++***#####****+*####%#**#%%%%%@%%####+==-==-=+#*+#%#%@@@%%@%#%@@@@@@@@@%%%%%%@@@@@@@@@%##*==****##%%%%%@@%%@@%%#%%%###%%%%##*******#%%##**##%%#########*##%%@@@@@%%%#**+++==--:. 75 | .:::...::-==+*######****++++++++=+**+**+****+++**########*******##%%####%%@@@%#%#*+=====-=*++#%#@@@@@%%%%@@@@@@@@@@@%@%%@@@@@@@@%%#***=+***##%@%%%@%%%%%%%%%%##*####*++*###########**###%%###########%%%%%@@@@%%##**+++==-.. 76 | .::...::-===+**#**++++**++=+++=++++**++++*********###########*****#%%###%%@%@@%%%%*===-=:=++*#%#@@@@@@%%%@@@@@@@@@@%@@@@@@%%@@@@%%***++++**#%%%%@@@@@%%%%%%%%####***##%%%###**********#*######**####%%%%%@@@@%%%##**++==-:.. 77 | ..:-::::::--=+++****+==++++++++++=+++++*++++****#****######***####*++*######%%@@@@%@%*++=-=-==+**#%@@@@@%%@@@@@@@@@@@@%@@@@@@%%@@@@##*****+*###%@%@@%@@%%@%%%%#**##*######**+++++++++++++++++++++****####%%%%%%%%%%#**++====-:. 78 | .:=+=------=+++****+===+++++++++++++++++**+**********##*####*********+**##%%#%@@@@@@#*+++==-==-=+##%@@@@%%@@@%@@@@@@@@@@@@@@@@%%%%%#****+***##%@@@@@@@%@%%%##**###**+++***####%%####***##***************#####%%%%###**++====-:. 79 | :=+++=====+***++=======++++++++++++*+++++*++**++***###*#%%%*+**=+******###%%%%%%@@%****=--==-=+###%%%%%@@@@@@@@@@@@@@@@@@@@@%%%###***+**###%%%@@@@@@%%%%####**++++***###%%####*#######**********###*######%%%%%%###*++==+=-:. 80 | .:=++++==+++============++++++=+++**++++*++*****####%%%%%%%#*+++++++**+*##%#%@%@%%#***--==-=++*####%%%@@@@@@@@@@@@@@@@@@@@@%%%###**+++*##%%%@@@@@%%%%###*++++++*###%%%###%%#########*********###***######%%%%%%%##**+++++=:.. 81 | .-=++====-----======+++**++++++++++*****+******####%%%%%%@%#*+===+++++*###%%@@%@%###---==++**#%#%%@%%@@@@@@%@@@@@@@@@@@@@%@%#*#*+**+*##%%@@@@@%%%%##**++*++*###%%%%%%%%%%#######**##*******###****#*###%%%%%%%%##***+***=:... 82 | ..:-====--=============+++++++++************###*#######%%%%@%%#++++++***##%%%@@@@@%*+----=+**#*###%@%%%@@@@@@@@@@@@@@@@@@@@%###*******##%@@@@@@@%%##********####%%####%%%%##########******************#####%%%%%##******+-:.. 83 | ............. ..:--------==========++++===+++++**++**+++++********########%%%%*++++++**##%%@@@@@%##+=====+**###%##%@%%@@@@@@@@@@@@@@%%@@@@%##%#*******#%@@@@@@@%%###**+*****##%%%%%%#######*#######*####**************#####%%%%######*+=:.. 84 | :::----::::::.................. ..:--------===================++**++++++++++++=+++*+++***##**#%%%#**+++++**#%@@@@@%##+====+**##%%%%%#@@%@@@@@@@@@@@@%@%%@@@@%%####******#%@@@@@@@%%###*++****#%#%%%%%%%#########*********#****++**********#############*+-.. 85 | ==+++++++=====------------::::::.......................................... ..::--=======================++++**++++++*++++++==++=+++++***++*#%%#*++++++*#%%@@@@%#*===++**##%%@@@@#%@%%%@@@@@@@@@@%@@@%%@@@%%%####**#*#%@@@@@@@%##**++++**#######*******************####***+*******************#####*=:.. 86 | +**************++++++++++++====----:::::::::::-----------------=---::::::................. ..::-========================+++++++++++++++=+==++++===++++++*+++**##**++++*##%@%@@@%#*++***#%%%@@@%%%%%%%%@@@@@@@@@@%@%%%%%%@@%%%######*#%%%@@@%%%#******###***##****++***+++++****#*********************************+=:.. 87 | ******************************++++==============++++++++===+++****++===--------------:::::..................:::--=========+++============++++++++======+++===++====+++==+***+**#*****+***##%%%%%##**#*#%%%@@%%%%@%%%%%@@@@@@@%%@%%%%%%%%%%%%%######*#%##%%%%##****####****************+++**********##******+++++**********####***+=-:. 88 | *******###***********************+++++++++++++++++*********************+++++++++++++====-----:::::::::....::::---==========+=====-----===++++++++==+++++==--=-========++=++++++*#********####%%%#######%%%@@@@%%%%%%%%@@@@@@@@%@%%%%%%%@%%%%#######*##*#####***#########**+*+++***+++++++=+****++*********+++++++****+****####****+=-:. 89 | #**##########**********************++++++++*********************###******************++++===========---:::::::----=======+===--------===++++++++++==+========------======+++++++++*###########%%########%%%%@%%%%##%#@%@@@@@@%@@@@%%%%%%@%%####**#*#***#****####***#*******#**++**+++++=++*****+++*******+++++++++++++************+=-:.. 90 | #############*********************************************############******************++++++==+++++==---::::-----=========---------======++++++==++====-==------=+++++*******++++**###%#######*##**###%%#%%%###*###@%%%#%%@%@@@@%%%%%%%%%%###************#*##****#***##***+++++++++===+++++++++*********+++++===++++*******##***+=-.. 91 | ##############********************************************##############******#####***********++++++++==-----------======+++===-----======++++++++++=---:----=+=+*#%%%@%@@%%%%%%%%#*########*********######%%%##**###%%%%%%@@%@@@@%%%%%%%%%##*#********+*##*##########%%%%#%##***+++++====+++**************+++==++++**************+=-:. 92 | #############*********************************************##############################***********+*++=------------======++++==-=====--==+======++===------=*##%%%@@@@@@@@@@@@@@@@@@@@%%%###***+++++****#**####*+*#%%#%%%@@@@@%@%%%%%%#%###*****++***++*####%%%%%@@@@@@@@@@@@%%%##*+++=====++***********+++++++++++++***********+=-:.. 93 | #########**************************************************####################################*******++=====----=======++++=====---=============+++*+++=++*##%%%%%*#%#**##%%@@@@@@@@@@@@@%%##**===++++++*++*#**=+##*#%%%%@@@@@%%%%%%#%%###*******++++**#%%%@@@@@@@@%%%%%%%%%%%%%%%%##*+++==+**++********+++++++++++++***##*****+=-:. 94 | ########***************************************************##########################################**++=================+++==---------=====++==+******++++*#%#+=:.-=-:==+%%@%%%%%%@@@@@@@%%#**+=-=====++****++=*#**#%##%@@@@@@%%%%%%%%###***++++++++*#%@@@@@@%%%%%%##%###%%#%%%%%%##%###***************+++++++++++***********+=-:.. 95 | #***************************************###****************############**#############################****++++++======++++++++===--==-=-========++*****+=--=#%*: --:-+*#%%@@%%%####%@@@@@@@%#++==----==+**+*+*+*##*#%%%%@@@%%@%%%######****++++++++*#@@@@@@%#%%%%%%#***###*==+=+####*############********+++++++*******#****+=-:.. 96 | **********************************##########**************#############***#############################*******++========+**+++==++++++++++++**+***####*+-::+##- :==+*#%@%%%%%%%#+**%%%@@@@@@%*+=------=++++***+*#**%%@%%@@@%%@%%%%%####*#*++++++++*#%@@@@@%***###%@%%####*+--=:.-###***#*#########***********++*******###***+=:. 97 | ***********++++++++*************############***********#############***********#*********################*******+========+++===++**##############%%%%#+=---+%#::.:-==+**%@@%%@@%#*=+***#%@@@@@%*+=--:---==++=++++*+*#%%@%%@%%%%@%%%%%####***+++=+=+**%@@@@@%%##**#%@@@%##%*++=-==:.=%%#****#%%%%%%#########**#********######**+-:. 98 | ******+++++++++++++++**********############************#####*********************************##################**+======+++++===+**#%%%%%%%%%%%%@@%%%*=::-=*%#=-----===+#@@%@@%#*+++*##%%%@@@@%#+==-:--:-====++=++=**#%@%%%%%%%%%%%%%%###***+++++++*%@@@@@%%%%#*#%%@@@%%%#*+++==+- -#%#*+++*#%%%%%%%%%%%%%%%%%%%%##########**+=-:. 99 | ++++++++===========+++++*********#####***********************************++++++++++++++++******###############***++===+++++++===+**###%%%%%%%%@%%%%#+=::--=*%%+-------==*%@@%#**+++**#%%%%@@@@%%*==----:=+==++++++*##%%%%%%%%%%%%%%%%%%##**+++++++*#%@@@@%%%##**#%%@@@@%%%##*+==-. -#%#*++++**%%%%@@@@@@@@@@@@@%%%########**+=-:. .. 100 | ++++++===============+++++****************************************+++++++++++++++++++++++++***********************++++++++++====++**#####%######*#*+=--:--=*#@%+==------=*%%#*+===+*##%%%@@@@@@%#+=-----====+*++++*####%%#%%%%%%%%##%%###*++++++++*%%@@@@@%%###*##%%@@@@%%#*++==---*%%#*+===++*####%%%@@@@@@@@@@%%%######***+-:.. ........... 101 | +++++=================+++++++***********************************+++++++++++++++++++==+++++++++****+++*************++++**++++++++*###%%%##*********+=------=*#%@#+==-----==++++=-=+**#%%%%@@@@@@%#*=-------===+++==++***###%%%%%%%%###%###*+++++++*#@@@@@@@%%#######%%@@@%##*++====+%%%#*+====++****###%%@@@@@@@@@%%#####****+=:. ............... 102 | ++++=====================++++++********************************+++++++++++++++++========+++++++++++++++++++*******+++++++===+++**##%%#####**+++++==----::-=+#%@@%*=====--=======+*###%%@@@@@@@@@%*+=::----===+==-===+**##%%#%%%%%%###%##**++++++*#%@@@@@@@%%%####**###%%#***+++***%%%##*+==++++******##%%%%@@@@@@%%%#####*+=-:. ...............::::::::..... 103 | ++++++====================+++++********************************+++++++++++++++++++=========+++++++++++++++++++++++++++++=====+**######**##**+++======------=*%%@@%#**+======++***##%%%@@@@@@@@@@%*+=--::-====++===++*#*###%#%###%*######***+++++*#%@@@@@@@@%%%##*******#*+++***##%@@%#*+=====++++****##%%%%%%%%%%%%######*=-:. .............:::::----::::::.... ......... 104 | +++++++++++++++===========+++++**********************************************+++++++=======+++++++++++++++++++++++++++++++====+*#####*+++***+++==========--=*#%%@@@%#********#####%%@@@@@@@@@@@@%*+=-------==+==+=++*****#*#%#*##*#*#####*+++++*##%@@@@@@@@@@%%#####***#**+**##%%@@%##*+=====++++***###%%%###%%@@%%%####**=:.. ....:::::::::::::--======---:::...........::::...... ..... 105 | +++++++++++++++++========++++**************************************************+++++=========++++++++++++++++++++++++++++===+++*####***+++***+++++++======--=+#%%@@@@%%%#%%%%%%%%%@@@@@@@@@@@%%%*++=----:--==+====++*+++++*##*###########**++++*#%%@@@@@@@@@@@%%%########**##%%@@%%##*+=======++**########***##%%%%####**+-:.... ....::::----------===+++++===--:::::.::::::----::::..................... 106 | +++++++++++++++++++======++++*********+++++++++++++************************##***+++========++++++++++++++++++++++++*+++++===+***###*+=+++++*****++++++++=----=+#%%%@@@@@@@@@@@@@@@@@@@@@@@@%##*+++++=-----=++=--==+++=++******###**#######*****#%%%%%%@@@@@@@@@@@@%%%%%%%%%%@@@@%%##*+====+++++*##########****##%%%##***+=-::......... .....................:::----=========++++++*+++===-----------======--::::.......:::::::::: 107 | +++++++++++++++++++====++++********+++++++++++++++++++*********************###***++++====+++++++++++++++++++++++++*+++++++++**####**+++=++***##*###******++==-=+**#%%%%%%%%@@@@@@@%%%%%##**++==+++**+===--=*+--===+=+++***+*+**###*#**##%######%%%%%%%%%%@@@@@@@@@@@@@@@@@@@@@%%###+====+++*############**+***##%%%%##**+==---::::::..............::::::::::::::::::::::---========+++++++*******++++========++++++++===---::::::---------- 108 | +++++++++++++++++++++++++********++++++++++++++++++++++***************************+++++++++++**********+++++++++++++++++++**###%%%#**++==+*########***###****++++=+**#######**#*#***+==========+***#*+===+*=---==+==+++++++++**###*****##%%%%%%%%%%%%%%####%%%%%@@@@@@@@@%%%%%##***+==++********########*****##%%%%%##**++=======---:::::::::::::--===========----------===++++++++++++++*************+++++***********++++================= 109 | +++++++++++++++++++++++++*******+++++++++=========+++++++**************************+++++++++***********+++++++++++****+++++**#####**+====+**########%%%#####*+++=====++++++======----::-----==+***##**++++==---===++++++++==+****###**#*#%%%%%@@@@@%%%#*****+****#######%####***++==++**#############**********######***++++=++++++====-------====++++**+++++===========+++++*++++++++++**************************************+++++++++++++ 110 | +++++++++++++***+++++++++****++++++++============++++++++**++++++++++***************++++++**********++++++++++***********+++**#***++===-==+++***##%%%%%%%%%%####**+++===---------::::::::::--=*##%#######+===-===+======+==++*#***####**##%%%@@@@@@@%#**++++++++++++++++++++++++++++**#%####%#######**####******#%%###**+++++++++++++====---=============++++===========++++**++*++**+**************************########**##***********++++ 111 | +++++++++++********+++++++++++++++++=============+++++++***+++++++++++*****************************++++++++++++**++++***+++++++++**++==--==+++**###%%%%%%%%%####%%#*+===-----=-:-:::--:::::--+###%%%%#%#*+=======+===+=++++****########**##%%%@@@@@@%##*++===+++===+========+=++**###%%%%%%%#######****####***##%%%%%#**++++=++++++++===-----=====----=====+============+++++++++++**********************#####################***********++ 112 | ****++***************+++++++++++++==============+++++++***********+++**********##*********************************++++++++======+++++=========+**####%%%%%%%%%#%%##%#*##****+=+==------:-:--+*##%%%%%%#*++==+===+++=======+=++**###########%%@@@@@@@%%##*+++=++++++++++********###%%%%%%##################**###%%%%%##**+++============--------=----------==============++++++++++++++***************##############################*******+ 113 | ********************+++++++++++++==============++++++***********************************************************###****+++====---==++++=====+++***###%%%%%%@%%#####%%%%%%####****+++=----==+**#%@@%%%%#*+==+++=========--=+++*##############%%@@@@@@@@%##**********#####%%%%%%%%%##%%%%#%%%%%%###%%%#*******##%%%%%##*+++++===========---------------------==============++++++++++++*************########%%%#######################******* 114 | *******************+++++++++++++==============++++++**************************************+++++++++++***********####***+++=======-==+++========++**###%%%%@@@%%#%%######************++==+**#%%@@@%%##***=+++=++++========+++**#*#####%%######%%@@@@@@@%%###########%%%%%%%%%#%%%#%#%%%%###%#########********#####***++++=============----------------------===============++++++++++*************#####%%%%%%%%%%%%%%##################***** 115 | ******************++++++++++++++============++++++***********************#**************+++=========++***********#****++===++++=====+******+++===++***###%%%@%%%%%%%%########******##*+++*#%@@@%%%#*++++++++++===========+*+**#*####%%#######%%%%@@@@@@%%%%%##%%%%%%%%%%#%##%%###%%#################******######***++++==----------===-------======-------===++++=======+++++++++++************######%%%%%%%%%%%%%%####################***+ 116 | **********++*+++++++++++++++++++++=====+++++++++*******########*#####*####************++++==========++********####****+++++++++++=+++**######**+++******#####%%%@%%%%##%%%####***+***+*#*#%%@%%###******++=++++===++++=+*++****####%%%%%###%%%%%%@@@@@@%%%%%%%%%%%%%%%############%%%%%%%%#%%%%###******######***+++++==----::----===========++++++==========+++++++++++++++++++++++++++++*******#####%%%%########*##########**********++++ 117 | +++++++++++++++++++++++++++++++++++===+++++++++************#########****************+++++===-----===++***#########***+++++++++++++++++**##%%%%######****#####%%%%%%%%%%%%%%%%#*******##**##%%%##*###%#**+++++++==+*+++*+*++**#####%%#%%%%%%%%@@@@%%@@@@@@%%%%%%%%%%%%%%%%%%%%%####%%%%%%%%%%%###******######*++++++++===---:::::---========++++****+++======+++++++++++++++++++++===========+++++++**********++++++++++++++++++++++++++==== 118 | =====================++++++++++++++===+++++++++++****************************+++++++++++====----====++***###########**++++====+++=++**############%%%%%%%@@@@@@@@%%@@%%%%%%#####%############****##%%#*++++*++===+++++++*+*+*######%%%%%%%%%%@@@@@%%@@@@@@%%%%%%%%%%%%%%%%%%%%%%%@@%%%@@%%%###****###%%%%%#*++=++++++==---:::::::---=====+++++*****++++=======+++++================----------===========================================--- 119 | =========================++===============++++++++++++++++++++++++++++++++++++++++++++++===----====+++***###%%%%%###**++======+++++++**###%%%###%%%%%%%%@@@@@@@@@@@@@@@%%%%%%##%%%**#######***##*#%%#*++++++++===++++**+**+*###%%%%%%%%%%%%%%@@@@@%%%%@@@@%%%%%%%%%%%@@@@%%@@@%%%%@@@@@@%%%%%%%%%%%%%%@@@%%#*+===++++==--::::::::::---===++++++++++=================-=--------------:::::::::--------------------------------:::----------- 120 | ---------------====================================+++++++++++++============================--====++++***###%%%%%##***+++++++++++++++***###%%#####*###%%%##%%%%@@%%%%%@@@@%%%%%###**************#####**++++++==+=+++++**+****##%%%%%%%%%%%%@@%@@@@@%%%%@@@@%%%%%%%%%@%%%%%%%@@@@@@@@@@@@@%%%%%%%@@@@%%%@%%#*+=========--::::....:::::---==========------------------------::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 121 | ---------------------====================================================---------===============+++++***###%%%%##***++++====++++++++****####*******+*************###%%%%%#####%####***#***++***#####**+++++++++++*+++**+*+**####%%%%%%%%%%%%@@@@@@%%%%%%%%%%%%%%%%@@@@@@@%%@@@@@@@@@@@@@@@@%%%%@@@@@@@%%#*+=---------:::::.......:::::-----------::::::::::::::::::::::::::::::::::....................::::::::.:::::::::::.........:::::: 122 | -------------------------=======--==--------------============-----------------------------=====+++++***####%#####***++=======++++*********++++++++===++++++++++++*####******#########**+++++******###+++++=+=+++*********+*###%%%%%%%%%%%%%%@@@@@@%%%%%%%%%%%%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%%%%%%@@%%%#*+==----:::::::::.........::::::::::::::::......:::::::::::::::::::::.::.......................................................... 123 | ------------------------------------------------------=-------------------------------------====++++***###%%%%####**+++=======++****++++++++++==========++++++***+******++++**######%#*++++++**+***###*+=+++=++++****+*+****##%%%%%%%%%%%%%%%@@@@%%%%%%##%%%%%%%%@%%%%%%%%%%%%%%%%%%%%%%%%%%%#%%%%%%%%%#+=---::-:::::::::..........:::::::::::............................................................................................. 124 | ---------------::--::-----------------------------------------------------------------------===++++****##%%%%%%##**+++++=====++*****+++==++++=============++++++++++++++++****####%#%##**++++++++++*##*+++++++++***********###%%%%%%%%%%%%%%%@@@%%%%%%%%%%%%@@%%%%%%#############**#****##############**+=-::::::::::::::..........:::::::::............................................................................................... 125 | -------------:::::::::::--:-----------------------------------------------------------------===+++*****##%%%%%%##***++++=====++++***++====------========++++++++=========+****##%%#%@%%#**+======+++**++++++++*+*****#**#*##%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@@%@%%%%%%###*************############***++==---:::::::::::::::...::::::::::::................................................................................................. 126 | --------------:::::----------------------------------------------------------------===========+++*****###%%%%%%%#***+++++=====+++++++++==-----=====+++++*******+++++++=++**+*##%#**%@%###**+===--===+*#***+*********#####%%%%%%%%%%%%%%%%%%%%%#####%%%%%%%%@@@@%%%%%%%####**********#########******++=-----:::::::::::::::::::::::::::::::::..............................................................................................: 127 | =--------------------------------------------------------------------------------=============+++***#####%%%%%%%##**+++++++++++*******+++=============++++*******++=--------=+*++++*###%%%%#*+=-----=*###*****######%%##%%%%%@%@@@@@@%%%%%@@%%######%%@@@@@@@@@%%%%%%####*********##########****+++==--------::::::::::::::::::::::::::::::::::..........................................................................:::::::::::::::::: 128 | ==-----------=--=---------------------------------------------------------------=============++++**#####%%%%%%%%##***+++++===++***##**+++==========-====++++*****+=-::::::::--=-====++*#%%%#*+=-:-::-=*##**##%%%%@@@@%%%@@@@@@@@@@@@@@%%@@@@%#*####%%@@@@@%%%%%%#%%%#**********############**++=====----::::::::::::::::::::::::::::::::::::::::::.........:::::..........................::::::::..........::::::::::::::::::::::::::::::: 129 | ========================================------------===-----------------------=======++++=====+++**####%%%%%%%%%##***+++=====++***#***++===+++=========-===+++++++=--::::::-----==-==++****++==--::::--+**#%%%%%@%%%%%@@@@@@@@@@@@@@@@@@@@%%#***#####%%@@%%#####****+++++++++**#######*#*****++==-------::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::...........::::::::::::::::::::::::::::::::::::::::::::::::::::---- 130 | ==============++==========================----=====================-========-=========++++=====+++**##%%%%%%%%%%##**+++=======++******++++++++++++==----===========--::.:::::--+**++++++++++*+==::::::--=*#@@@%@@%%%%%%%%%%%%%@@@@@@@@@@%%#***+**############*******++++++++++*****####****++=====--------:::::::::::::::::::::::::::::--:---::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::-------------- 131 | =========++++++++++++=+=+===============================================================+=======+++**###%%%%%%%%##**++++=====+++**********+++++++==-====----====----::::::----=*##**########*++===:::::--=+#%%%%%%%%%%%%%%%%%%@@@@@@@@@%##**++++***########%%%####**++++++++**###*********+++====-----------::::::::::::::::::::---------------------------------::::::::::::::::::::::::::-----------------------::::::------------------- 132 | ========++++++++++++++++++++++======================++++========================================+++***#####%%%%%##***++++===+++************++++====++====---=-------:::::::--===+*+*##%%%%%##*++++==-:::--=+*#%%@@%%%%%%@@%%%%@@@@@%%%#**+++++**#####%%%%%%%%%%%%%#***+++=++**###********+++========---------------:-----------------------=====------------------------------------------------------------------------------------------- 133 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++=========++++++++***#####%%%%###***++++===+++************+==++*+++====-----=====----::----::-===++*******++=+++=-------=-=+*#%@%#%%%%@@%%%%@@@@%##***++++***######%%%%%#%%##%%##**+++==++**************+++===============---====----------------------======================---=============--------------=================----------------------------- 134 | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++===+++++++++++****####%%%%####***+++=====+*********++==+***++++===--===========---:::::--=-====++=++++=======------=-==+**#%@@@@@@@@@%%@%%%##*****++*++******########****##****+++===+*******###****+++=================================----------===========================================================================------------------------ 135 | ++++++++++**********+++++++++*****++++*******++++++**+++++++++++++++++++++++++++++++++++++++++++*******#####%%%%%###**+++======++++**++====++++++++=====++++++++++====-::::-----=======+++++++=====-----==+++***#%%%@@@@@@@@@%%%###******++++++*********************++++=+++***########*+++=========================================--=========================+++++++++++++============================================------------------- 136 | *************************++++++++++++++*+*****+++++**+++++++++++++++++++++++++++++++++++++++++*********####%%%%%%###**++========++++++====+++++++====+++++****+++===----:----::--====+++*+****+++===++=+++*****####%%%@@@@%%%%%#########*****++**##****#*#####***+++++++++*######%###*++===========+++++++++++====++===++++++=================================+++++++++++++++++++++======================================------------------ 137 | ***********************++++++++++++++++++++**++++++++++++++++++++++++++++++++++++++++++++++++++********###%%%%%%%%##*+++========++++===++++++*++==+++++++*****++++=--=------:::-----=+++=+**++**+*************#####%#%%%@%%%%##########***********#####*####*****+++++++*#*#%%%##*#**++==------====+++++++++++++=====+++++++++++==============================++++++++++++++++++++++++++=================================------------------ 138 | **********************++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*******###%%%%%%%%#**+++============+++******++**#****++++++++++=-=+=--=---::::::::--=+==+++++********************####%%%%#########**#*********++*****#*+****+++++=+**##*##**####**+++===-------=====+++++++++++++++==+++++++++++++++=========================+++++++++++++++++++++++++++++++++=========================------------------- 139 | *********************++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++******###%%%%%%%%#*++++=======--===++***##*+##%###***+++======--=+======--::::::::::---===++++************+******####%%%%####******************+*******++++++=++++*#%%###*##**#***++=====--------=====+++++***++++++++=+++++++++++++++++=====================++++++++============++++++++++++++=======================-------------------- 140 | *********************+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++====+++++++++******####%%%%%%##***+++====--=====+**##*+#%%%##**+++==-===--:-==-=++===-::---::::-:::::--======++************#####%%%%%%%%#%#**********++++++++++++++++=+*++=+****#%%%###**#******++====-----------=====+++*****++++++++++++++++++++++++++=============================================================================------------------ 141 | ************************++++++++++++++++++++++++++++++++++++++++++++++++++++*++++++=====++++++++********###%%%%%%%###**+===-========+**++*#####**++===---=---:----======-::----::-:-::::::---:---===++****####*#####%#######%#####*#*****++=============+++***+**#**#*#%####*********+++=====-----------====+++******+++++++++++++++++===+++++==========================--------==============================================------------- 142 | ********************************++++++++++++++++++++++++++++++++++++++++*+****+++++=====++++++**********###%%%%%%%%##*+=============++=+********++===--==--::----======-::==--::--::.::::::--:::::---==++***#*##################******+++===========+++=++=*##***##**#*#######***+*****+++====-------------====++******+++++++++++++++====++++++=======================----------================================================---------- 143 | ******************************++++++++++++++++++++++++++++********************+++++====++++************####%%%%%%%##**+++=============++*++++++++===-====-:-==--====---::-==--:----::::::::--::::::-::--=+++*******#####****#******+++=========+=+=+***=**+*####**%#*##*#######*+++*##***++===---------------===++++******++++++++++++++==+++++++++++++==================-------=====================================+++++++========------- 144 | ********************************+++++++++++++++++***********************+++++++++++===+++++************###%#%%%%%%###**+++=======---==++++++++++++==+++==-+++==+++===-::-===----=--.::::::--:::-:---::::---==++++*************+*+++====--==+++++++++*##+*#++#%##*+#%%*%#*########++**###**+===-----::::::-----===++++++++*****+++++++++++++++++++++++++==================================================================++++++==========-- 145 | ***********************************+*********************************++++++++++++=====++++**************####%%%%%%%%##**+++====----===++++++++++++=+*++==**#*=****+++-:=====-=-===::--:----:::------::::::---====+++++++++++++======----==++*++***++###*+#*=*##%#+*%%#*%#*######%%*+##%##*+===------::::-------===++++++++********+++++++++++++++++++==============================++++++++=================================+++============ 146 | +++++++++++++******************************************************+++++++++++++=====++++++++++***********##%%%%%%%%%##**++===------===++*******++*#*+=+#%%#+###*###+-=++++=-+-===:-=-:-----::---===--:-:--------=======================++*******#*+*##*+**++####*+#%%*#%#*###%%%%%**####*+==-------------------=======++++++++++**+++++++++++++++=================================++++++++++++============================================ 147 | ++++++++++++++*******************************************+++++*****++++++++++++======++++++++++++**********###%%%%%%%%#**++==--------===+****##++###*=*%@%%+#%%%####==+****=++=+++:=+=-==-=-:----====----==-===--===============+=++++++*****##**#**####+#**+*#%%#+*%%#*%%*#%%%%%@@@###***+==-----::-----:--------==========+++++++***+++++++++++====================================++++++++++++=========================-------========== 148 | ***+++++++++++++***++*********************************++++++++******+++++++++++=======++++++==+++***********##%%%%%%%%#**++-----------===+****++*##*=*%%%%**%%%%#**===**##*=*+=*#+-+*==++===-=-==============+======+++++++++*++*++*****########*%*#%%%#*##%###%%%#=%@@##@%*%%%%%%%%%#**+++===-----::--:::--------------=========++++**+++++++++++=====================================+++++++++++============---===---------------------== 149 | ***********+++***+++++++***************************+++++++++++********+++++++++=======++++=====+++**********####%%%%%##**+======-------===++*++*###=*%#%%#+#%##**+=--+****+=**=##+=*#++**+++================+++=++*++*+++****#****+*****####%#%%#%*#@@@%**#@#%%%%@@=%@@%#@@%#%%%%%%###+++======-----:::-::::-----------------=======++++++++++++++++=======================================++++++++=========---------------------::::::---- 150 | ************************+***********************+++++++++++**************++++++++++++++++======+++*****##*########%###**+==++======-=---===+++*###++#####+*#**++==--=+****=+**=*#+++#+*#***+++=========-====+++=+*******+*###*****+**+**###%%%%@%##%@@@@*+%@#%@%#%@+*@%%*#%%*#%%#####**+========-----:::::-------------------------======+++++++++++++========================================++++=========---==----------------::::::::::: 151 | ***********************************************+++++++******************+++++++++++++++++++++++++++***###############***=+*++++======---=====*###++#####++***++++=--++*+++=+*#++#=*+*+*#**#*++++=====------=====+++********##*****++****##%%@@@%%##%@@@@**%@##@%%%%*+%###*###+####****++==========----:::------------------------------======++++++++++++===============================================-----=========------------::::::::: 152 | *************************************************************************+++++++++++++++++++++++++++**###############**+****+++=======---===+*##++#####*+###**+++-==++++++=****=+=**++*#*##*+***++===--------==-=+++++++***###****++****##%%@@@%%##%@@@%+#%@*#%%%#%*=###*+*##+*##*****+++=========------::-----------------------------------==+++++++++++=========+++=================================---------==========----------::::::: 153 | *************************+++++++*****************************************+++====+++++++++++++++++++***###############*+*#***+++=======---=-=++*+=##****=*####**+==-=++++++=***#+==*#*=*#*%#+*****++==----:------===+++++***********++*#*#%%%@@@%%#%@@@@#*#%%*%%%%%%*-*#**++***=*######***+=============---:--------------------------::::::----==+++++++++++=======++++++=============--==================----=================-----------: 154 | **********************++++++++++*****************************************++=======++++++++++**+++****###############*+****+++=============-==++-+*++++==*******+==-+====+==*****=-*#*++**##+**###**+=---::-------===++++************+*###%%%@@@@%%%@@@%%*##%*%%%%%%#-*###*+***=+####%#*##**=============------------------------------:::::::---===+++++++++++++====++++++======---------=========================================--------- 155 | *****##*************+++++++++++******************************************+++=======+++++++**********#####%%%%%%####*++**+++==============--===-=+=====-++****+++---=====+==*****+-+##*=*##*+######**+==-----------===+++++************#%#%@@@@@%%%@@@%%%*%##+%%%%%%#=*%%##*+##+=###%%%#%%##+=============------:::::---------------------:::::-----=====+++++++++++++++++++======----------======-===============-=====================---- 156 | ******************++++++++++****************************#####****#*******+++=========+++++*******#####%%%%%%%%###**+++++++===================--======-=++*+++++=--=+====+==+****+=++*#==*#**##%%%%#*+==-------------=+++++++*****#**#*#%%%%@@@@%%@@@@%%#*%##+%%%####=*%%%%%*#%#+*#%%%%#%%##*+==============-----::::----------------------------------===++***++++++++++++++++=====-----------------==============-======================== 157 | ***********++++************************************############*###*****++++===========+++++****###%%%%%%%%%###***+=+++======================:----===-+*****+++=--+++====-=++***+=#*+**=+##*%%%%%%#*+++=------------===+++++***########%@@%@@@@%%@@%%%%**%#*+######*++#%%%%#*%%*+%%%%##%##**+=================---:::------==-----------------------::----==+++**+++++++++++++++++=============---------===============--------============= 158 | **+++++++++++******#####*******************########################*****+++==============++++***###%%%%%%%###***++=++=====++++++++++++++====-:---==+==*********==+***++++-=++****=###+*++*##%@@@@%%#**+==-----------====++++***######%%#%@@%@@%%@@%%%%#*###*+###%##**+#%%%%%*#%%+####**##***++===+==============----------====---------------------:::----===++++**+++++++++++++++++++++========--=-----===============---------======-==== 159 | ++++++++********######**####***********#######%%%##################****++++================+++**##%%%%%%%##***+++-======++++++++++++++++++==--====++=*######*##==*####**+-+******=#%%%****#%%@@@@%%%*#*===----------=====++++***#####%%%%@@%%@%%@%#%###+###*+######+#**%%%%%#*#%*+#**+********+==+++++=====++++===------========---------------------------===++++**********************++++++===========================-----=====------== 160 | ++++******####************##################%%%%%##################***++++================++++**###%%%%%##*+++==--====+++++++++++++++++++===-====+++=#%%#####%%+=#%#%##**=***#**#+#%@@#****##@@@@%%%##*++==-----==========+++****####%%@%%@@%#%%%%####*+###*+%%%%#**#*=######**##=**++++*******+=+**++++++++++++++====-=====++====--------=====-------------====++++****###########*************+++++===============================------= 161 | ****#########*************#############%%%%%%%%%###################***+++++=======++++++++++****##%%%%%##**++==--=====+++++++**********++=+=-====++++#%%%##%%%%==######**=**##*##**%%%%%#*+##%%%%%%##%#++==----=====++++=+++++***#####%%%#%%%*######****###**%%%%%*###=######*+*#=+**+**********==****++++++++++++++========+++++===-----========================++++***####%%%#######***************++++++++++============================ 162 | ############***********##################%%%%%####################****++++====++++++**********####%%%%%%#**+===---===+++********####****+-+=======+==########%#=-********=+*****#*+#%%#%##*+*#%%%%%##%#+*+==--=====++*+++++++++***####%%%####********#*#%%%*#@@@@#*%%#+*######++#++#********#***+=+****+++++++++==+++========+++++====--=====++++++++++============++++***###%%%%%%#####***********************++++++++++++++++++++++++++++ 163 | #########***********###############%%%%%%%%%%%#########**########*****++======++++***######**###%%%%@@%%%#**+==-===+++*******########***+-=========-=+*********=:++++++++==*******+*#######*++#%%%%####**+===-====+*****+++++++****######*+****+++**###%@@%*%@@@@#%@%%**%%%%%%#+#*+##############==******++++++++==++=========++++===-----===+++++++++++++===========++++****##%%%%%%#######************####*******++++++++++++++++*+++++** 164 | ######***********#################%%%%%%%%%%%#####********************+========++++***##*****###%%%@@@@@%%##*+=++++****#######%%%%%####**==========:==+++++++++=:=====++++=********+***#####****#%%####***+=====+++*****+++++++***#####*++==++++++*#%##@@%#*%%%%##%%%%**%%%%%@%*##+%%%%##########*=*********+++++==++==========+++===-----====+++++++++*+++++===++==+===+++++***##%%%%%%%#######********#########*******+++++++************ 165 | ***********###########################%%%%%######*****+++++++*****#**+==---=======++*********##%%%@@@@@@%%%##*+**#####%%%%%%%%%%%%%%####*+===+=====:-===+++++++=:=++++++**=*#*****#*+****#####*#########**++===+++*****+++++++***####*++=--====+++*######*++*+*++*####*+#####%%#*#+##############*=+#*******++++++=================---------=====++++++****++++++==+++========++**###%%%%%%%%####********###########*****++++++++******++++ 166 | ##################%%%%%################%#######*******++++++++*******+=------==--==++++*+++**##%%@@@@@@%%%%%#+#%%%%%%%@@@@@@@@@@%%%%%####+=+++++===--===++++++++-=++****##++**++**##++***######*#%######***+++++++***++++++++***#####*=-----==+++****++++=-======++++*+=****####+*+##**##**#######++###*******++++================-----------========+++******+++===============+++**###%%%%%%%%##########**##########***++++++++********++ 167 | ##############%%%%%%%%%%#############%#######**********++++++********+=-----------==++**++***##%%@@@@@@%%%%%#*%@@@@@@@@@@@@@@@@@%%%%%%%##*=++*+++++=-====+++****=-********+=++++**##*++**##%###########*****++++++++++++++++***###%##+=-:--=+*****++==---::-----===+++==++**####+++##***********##++####*********++================----------=========++++****+++==================+++***##%%%%%%%%########******######******************** 168 | %###########%%%%%%%%%%####################********###***********###**+=-----------=++*******###%%@@@@@@%%%%%*%@@@@@@@@@@@@@@@@@@@@@%%%%%%#+*****+++=-=====++++**+-=++++++++=-==+**###*+**##%%############**+++++++++++++++++**##%%%%*=----=+***+==---:::::::-----===++=++++**###*++###**********##*=#####**********+++++============--------===========++++++++++======================+++**#%%%%%%%%%%%%####********####****************** 169 | %#########################################******************#######**+=----------==+*#########%%%@@@@@@@%%%%*%@@@@@@@@@@@@@@@@@@@@@@@@@%%%+***#****+==========+++=-===+++===-=++**####*+**#%%###%#########*+++++++++++++++++**##%%%#+=--=+***+=-:::::::::::------=====-+++++**##*=+#####*******###*=#######************+++=============================+++++++++===================-----===+**#%%%%%%%%%%%%#####******###*########*******## 170 | #####################**********#######*************++++***#########**+==--------==+*#%%%%%%%%%%%%@@@@@@@@@@##@@@@@@@@@@@@@@@@@@@@@@@@@@@%%++#*###***+=+++=========--==++++=====**######*+*#%%###%%#*#####***+++++++++++++++***##%%%#+===+**+=-:::::::::::------------=-=+++++**##=+######**#######*=*########*******#****++=========++++===============+++++++======================------===+**#%%%%%@%%%%%%%%#######*******############## 171 | ##**************###***********#######***********+++====++***######**++===========+*#%@@@@@@@@%@@@@@@@@@@@@@#@@@@@@@@@@%%%%%%@@@@@@@@@@@@%%++%##%###**=++++===========+++++++++=+#######***#%%%%%%#######****+++++++**+++++++**##%%%*+==+++=-::....::::::-----===---==--===+++++**=+###******#######=##%########***#####***++========++++++==============++++++==========================---===++**##%%%%%%%%%%%%%%%#####*********########## 172 | *******++++++***********#####################***++===-===++***###**++====++++++++**#%%@@@@@@@@@@@@@@@@@@@@@#@@@@@@@%%%##%%%%%@@@@@@@@@@@%%#+%%##%####*+**+++++++++++=+*********+*########**#%%%%########****+++++*******++++**##%%#*+====-::......:::---======++==============+++=+**********####%#=#%#%%%%%##########****+++========++++++=============+++++++=================================+++***###%%%%%%%%%%%%%%##***++++****####### 173 | ++++**+++++++**********#*######################**+===---==+*******++===+++***+++***#%%%%%%@%%%%%%%%%@@@@@@%%@@@@@@%#####%%%%@@@@@@@@@@@@@@%*%%%#%%%###*+****+++==++++=+*********+*######*###%%%%%####%%##****++++********+++**##%#*+===-::.......:::---=++++++******++****+++=+++-=*+++++*****###%#=#%#%%%%%###***###******++++=======+++++++============++++++=====================+++++++++======+++*****###%%%%%%%%%%###***++*********## 174 | ++++++++++++++********+++++***#################***+=======+******++===+++****++++**####%%%%######%%%%%@@@@%@@@@@%%######%%%@@@@@@@@@@@@@@@%#%%%##%%%%##**##**+=====+++=+**********+*###**####%%%%#########**+++++**####******##%%#*+=--:.........:::---==++++++***##*####*****+++-+**++++******####=#####%%%##*****##*******++++=======++***+++=====================++==========+++++********++====++++++++++**#%%%%%%%%%%%####************ 175 | ++++++++++++++++++++++=====++********###########***+=====++*****+++++++++***++++*******####*****##%%%@@@@@@@@@@%%#####%%%%@%%%%%@@%@@@%%%%%%%%@%#%%%%%%#*##**++==-======+**+++***********#####%%%##########*+++++**#####*****##%#**+=-:..........::::--===++++++++**+####****###*=+**************#*=*#####%%#**+++************+++======++*****+++==================+++++++++++++++*****#####**+++++++++++====+++*#%%@@@%%%%%%%%%#######**** 176 | ++++++++++++++=+++++===---==+++**************#******++++++++***+++++++++++++++**************++**#%%@@@@@@@@@@%%%####%%%%%%%%%%%%%%%%%%%%%%%%%%%%%##%%%%%#**#*++==---=====+++++****#**+***###%##############**++++**##%###*###%%%#*+=--:...........::::-===+*****++++=**##****####=*#***************=+***#####**++++*************+++===+++*******+++===============++++*++++++++++***####%%###**********+++======+**#%%@@@@%%%%%%%%%%%%###** 177 | ++++++++++++++==++++==----===++++*********************++**********++++++++++**************++***#%@@@@@@@@@%%%%%#%%%%%%%%%%%%%%%%%%%%%%%%%%%%#%%%%%##%%%%#*****+==-----=====++***###***++**##%%##*###########*+++++*#########%%%%#*+==-:...........:::--==+++**###**=+***########*=#%%##************=+***#####**++++**######***************######**++++++++++++++++++++**+******+++***########**********+++=======++*##%%%@@@@@%%%%%%%%%%%## 178 | *******++++++++++**++=======+++************************************+++++++**************+++**#%%@@@@@@@@@%%####%%%%%%%%%%%%%%%%%%%%%%%%%%%%%##%%%%%##%%###*+**++==------====+**********++*##%%###*######%%##**+++++*########%%%##*++==-:......::::::--===++****####+****#####%%#*=#%%%#############=+##*#####*******#############################****+++****#******++*++++*****************************++++========++**##%%%%@@@@@@%%%%%%%% 179 | *****************##**+++==+++***########****+++++++***************+++++************++++++**##%@@@@@@@@@%%%####%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%**%%%%%%#######*++++===--::--===++************#%%#########%%%%%##**+++++******###%%##***+=-:....::::::---====++****###**############*=*################++################%%%###########***##*************++***#######******+++***##*************##**###*****+++=========+++***##%%%@@@@@@%%%%%% 180 | ***********##########********##########***++++++++*************++++++*********+++++++++**##%@@@@@@@@@@%%#####%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#**%%%%%%%#####***++++==-::::-=====++********##**###########%%%%##***+++++******###%####**=-:...::---:--===++++++******+*####**######+=******##########**+#####################*************++++++++++++++++++**######***********#####*********#############***++===========+++***##%%%@@@@@%%%% 181 | *********########################*#******++++++******+++++++++++++*+*******++=====+++**##%@@@@@@@@@@%%%#####%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#**%%%%%####*******+++==--:::-==+===+*******####**#####%%%%%%%%%###****+++++****####%###*+=::....:::::--=+++++++++****++***#******###++***********#####**+**##############****++++++++++++++++==+++++++++++++++***************************#****###%%%%%%%%###***+++==========+++++***###%%%@@@@@ 182 | ********########%%##############*******++++*********++++++++++++****+++++++======++*##%@@@@@@@@@@@%%%%###%%%#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%###%%%%%###*####****++==-::::--======+*******####*+*######%%%%%%###*****++++++***#######*=-:......::::--=++++**++++++++++*****+++**##++****++++****###***+******************++++++++++++++++======++++++++++++++++**+++++++*****++++++++*********##%%%%%%%%#####**+++++=====+++++++++****##%%@@@ 183 | *******#########%##############****+++**************++++++++++++***+++=========++*#%%@@@@@@@@@@%%%%%####%%#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%####%%%###***####****+==--:::---====+++++++++*******++#######%%#####**#*****++++***#####*+=::.......::---=++++*#**++++++*+++*##**+****++***+++++++********+*****************++++++++++++++++++++=++++++++++***+++++++++++++++++++++++===++++++++++*###%%%##########****++++++++++++++++++++**##%% 184 | *******##############********************************++****+++++++++=========+**#%@@@@@@@@@@@%%%####%%#####%%%%%%%%%%%%%%%%%%%%%%%%%%#%%%%##%%%%##*****####***+++=--:::---===+++++++++++*******++#######%%###########****+*****##**+-:........::--==++++*###*+++++**++*###******++**++++++++********+*******************++++++++++++++++++++++++++++*****++++++++++++++++++++======+++++++++*************####*******+++++++++++++++=++++*** 185 | ************########****++++++++***************************+++==++++=======++*#%@@@@@@@@@@@@%%%%##%%%##%%%%%%%%%%%%%%##%%%%%%%%%%%####%%%%%#%####*************++==-------===+++**+*++++*****####**#####%%%%%###########********##**=-:.......::--==++++++**##**+++***++*#######*******++++++***#####****************************+++************++++++++++++++++++======+++++=========++++++++****++++++++++++*******+++++++++++++++++++++++ 186 | ***************####***++++++++**********++****************+++==++++++====++*#%@@@@@@@@@@@%%%%%%%%%%##%%%%%%%%%%%%%######%%##%%%%######%%%%%%%##*************++++====---======++*******+++**#######*#%%%%%%%%#############*********+=-:......::---======++++****++++****+**######*********++***######**###*************######***++++**************+++====++++++++++======+++++=============++++++++============+++++++++++++++++++++++++++++ 187 | *************#####**+++===+++***##***+++++****************++++++*****+++**##%@@@@@@@@@@@%%%##%%%%%##%%%%%%%%%%%%%########%#%%%###########%%##****++******++++++++++===========++**#***************#*#%%%#############%%%##*******++=::.....::--========+++++++++++++***++***####*************###%%##**###*###############%%##**+++++++**++++++++++++=========+++++++====++++++==============++++++=======--=====++++++*****++++++++++++++++ 188 | *****##***######**++=====++**###***+++++++***#####**********++***##***##%%@@@@@@@@@@@@%%%%##%%%%###%%%%%%%%%%%%%#########%%%%%###########%##***+++++****+++++++++*++++=========++*###*******++*****###%####********###%%%###****++=-::....::--======+==+++++++++*++++***+++**##*##***********#######*******#####%%############**++==++++++++++++**++++==============+++++++*++++=====-----====+++++=============++=+++*******++++++++++++++ 189 | ***####**#*****++======++**###***+++++++++**#####**************#######%%@@@@@@@@@@@@%%###%%%%%%##%%%%%%#%%%%#############%%%######%%%%#####***++++++****++++++*****++====---===++*####***+++++++++**#######************##%%###**+==--:....::--======++++++++++***********+++****####***********#####********#####%%#####**######**++=+++*****++******++++============+++++**++++++===-------===++++===========++++++++++********+++++++++++ 190 | **####*******+++====+++***##**+++++++++++*#####**+++++*+++++**######%%@@@@@@@@@@@@%%####%%%%####%%%%%%%%%###########**###%%######%%%%%%##**++++++++****+++++******+++====----===++*####*+++++++++++**#######*************##%###*+==-::...:::---=====+*****+++**####********+**************+++++***###*******#####%%%%%###***##%%##**++++****##***********++===========++++***+++++====------==================++++++++++++***###**+++++++++ 191 | *##********++++==++**********+++++++++++*#####**+++++++++++**####%%%@@@@@@@@@@@@%%#####%%#####%%%%%%###%#########*****##########%%%%%%#**++++++++*****+++++***##***++++===----===++*##**++++++====++**#########*******+***#####*++=-:....:::---==++++*##**+++++*#####*********************+++++*****#******######%%%%%%########%%%##**+++**#####******###***++==========+++***+++++=============================++++++++++++***##**+++=++++ 192 | *******++++++++++**********++++++++++***#####****++++++++**###%%%@@@@@@@@@@@@@%%####%%%%######%%%%%#############******################*+++=++++***#**++++++*#####**+++++==-------=+*#***++++++======+***##***######********#####*+-::...:::::--==+++**###*****++*#######***###*********++++++++++++**########%%%%%%%%%%%%%####*##%%%##**+++**####********###**++==========++****+++++++=====++==================+++++++++++++++*****++====+ 193 | **+++++****+++************+++++++*****#####***++++++++++**##%%%@@@@@@@@@@@@@%%#####%%%%########%%%%############******########%%######*++==+++++**##*++=+++***###***+++++==--::::-=+********+++==--==++**#*********#***********#**=-:....:::::--==+++**###******+***####********++++++++++++++++===++**#####%%%%%%%%%%%%%%%%%######%%%##**++++*####**++++**####**++==========+++********+++++++++++==============++++++++++++++++***#**++=== 194 | ++++++++++++++*********+*++++++++*********++====++++++**##%%%@@@@@@@@@@@@@%%######%%%############%#######%%#####***##########%######*++==++*++*****++==++*************++==--::::-=+###****+++===--==++*###**++++**********##****+-::..:::::---====++++*###**************++++++=======+++++**++=====++++**######%%%%%%%%%%%%%%%#####%%%%##*++++**####**+++***#####*++==========++*****##***++++++++++++===================++++++++**###**+++ 195 | ++++++++++++++*********++++===+++*****++++==========+**#%%@@@@@@@@@@@@@@%%#####%%%%%#############%%####%%%######################%%#*+===++********++==++**************++===-----=+*#%%###*++=======++*#%%%#**++++***##########*+=-::::::-----=====+++++**#**+++**++++++++++=====+==+++++++****++====++++*******##%%%%%%%#%%%%%%%#####%%%##**+++**####***+****#####**+==========++**####***+++===+++++++++===------=----===+++++++++**####** 196 | +++***+++++++++++++++++++===+++******++++==-----==+*#%%%@@@@@@@@@@@@@@%%%#####%%%%###############%%%%%%%%####%%%%%#######%%####%%#*++==++*****#**+====+*****++*********++========+#%%%%%#**+======++*##%@@%#**+++**###%%%%%%%#*=--::-----=========++*++*****++++++===========+++++++*****++*****++==++***********#########%%%%@%%%####%%%%##**+++*####*********#####**++==========++*******++====+++++++++==---::-------==++++++++++++**### 197 | +*******+++++++++++++++==++***###****+++===---==+*#%%@@@@@@@@@@@@@@@%%#######%%%########**######%%%%%%%#####%%%%%#***##%%%#####%#*++==+++***###*++===++*****++****++++++++++++=++*###%%%%#*++==+++***#%%@@@%%#*****##%%%%%%%#*+=----=====+++======+++++****++++++++++++++++++************++**###**+==+*###**###***##########%%@@@%%#######%%##*++++*#####*******#####**++====----====++*****++===+++++****++=----------===++++++++++++++*** 198 | *###***++++++++++++++==++*######***++++====-==+*##%@@@@@@@@@@@@@@@%%########%%#########*#########%%%%#####%%%%%%#***###%#%######*++==++++**###**+===++**##**+****++++++++++++==+++****######*++++***##%%@@@@@%######%%%@%%%%#*+=---=+++++*++=====+++++****++++++**************####**+++**++**####**+==+*####################%%%@@@%%##***######*++++**####**++****###***++===--------===++***+=====++*******++========+======++******++++++ 199 | *****+++=+++++++++=+++**####******++=======++**##%%@@@@@@@@@@@@@%##########%%#####%%#############%%%######%%%%%##**######%####*++===++++**####*++==++***#***+***+++=++++++=======++++++**###***++****#%%@@@@%%%%#####%%%%%##*+=----=++++*++======++*****#**++****#*#####******##**++++++++++*#####*++=+*###*###############%%%%%%%%%%##******####*+++**####**+++***#****++++=-----------==++**+=====+++*********++++++**++=====+++*****++++ 200 | ****+====++++++++++**####*++=++**+=======++****#%@@@@@@@@@@@@@%###########%%####%%%%###%%########%##***##%%%#######%%%%%%%%%#*+====++++**###**++=+++*******+++++====+**++==========+++++*##***+++++***#%%%%%#########********+=----==++=========++*****##*****#******##*****+***++++++++*++++*####**+=++*##***######*##%%%##%###%%%%%%%#******####*++++*###**++++**#***++++++=-----------==+**++++++++++++**####*********+++=====+++++**+++ 201 | **++=====+++===++*####**+=---==++==--===+***###%@@@@@@@@@@@@%%###########%%%%#%%%%%%%%%%####%######***##%%##***##%%%%%%%%%%#*+===++*****###*+++++++****++****++====+***+==========++++++***+++=+++****#%%####**+++**++++++++++=-::-====----=====++++++**##**************++++++++++++***+**++++*###**+==+*##*****####***#%%#######%%%@%%%#******####*++=++*****++++*****+++++++=----------==+++++***++++++++**####*****+++++++++====++++++++ 202 | *++==++++=====+*#####*++=---=========++**##%%%@@@@@@@@@@@@%###########%%%%%%%%%%%%%%%%%###%%%%####**##%%##**+**#%%%%%%%%%%#*+===++***#####**++++*****+++*****+++=++***++========+++**++++*++====++*++*#####***+==++++=====++++=-----==----=====++++++++*#%%#****+++++++++++++++===++***++*+*****#**++++*####**++**###***#%%#######%%%%%%%#**********++====++***+++++***++++++++==---------==++++***++==+++=+++**********+++****++++++++**++ 203 | ++++*++=====+*######**++===========+*###%%@@@@@@@@@@@@@@%######%###%%%%%%%%%%%%%%%%%%###%%%%%#######%%%%#*+++*#%%%%%%%%%%%*+=-=++***###****+++******++++***#***++**##*+++======++++***+****+=====+====+*###**++==++*+++====+**+=---------=====+===++++**#%%#*+**++==+++++++++++====++++++++********+++*##%%%#**+++*###**##%%#####%%%%%%%%%###*****+++++====++*++++==++++++++++++===--------====+++++=====+++===+++*******++*****++++++***** 204 | +++*+==--=+**####****++==========+*##%%%@@@@@@@@@@@@@@%########%#######%%%%%%####%%##############%%%%%%#*+++*#%%%%%%%%%%%*+=-==+**###***+++++*******++++**********##**+++=--==++++++***####*++=====--==+*****++=+*****+++==+***+=-------=========++++***####*+**++==+*****++++++===+++++++++***++**++**##%%%%#**+++*######%%%####%%%%%%%@@%%####**++***++===+++++++====+++*++===+++====-----====++++=---=++++=======+++++++++****+++++***** 205 | +++==---=+*##***++++++========+**####%@@@@@@@@@@@@@%##*####%##%%######%%%%%%####%%#############%%%%%%%#****##%%#####%%%%*+====+**###***+===+++++***++*++++++**********++=----=======+**####**++++=====++*****+==+******++===+**+=----==-=========+++++***###****++==++++*****++++++**+++++++++*+++*****#%%%%%%%#**+*##%%#%%%%%####%%%%%%@@@%%###*****##*++===++++*+++===+++*+++++****++===--=========----=+**+===-------======++++++++***** 206 | ++==-==+*##**+++============+++**##%%@@@@@@@@@@@@@#***########%######%%%%%%####%##############%%%%%%%######%%######%%%%#*===+++*******+====++++********++===+****+*++**+=-::---------===++***++++++++++**###*+==+****+++==-=++*+==-===============+**+****##**+*++===+++*####*+++++***++*+++++++++*****#%%%%%%%%##***#%%%%%%%%#####%%%%%%%%%%##****+******++==++****++====+***++**###*+++=============---==++++==---::::-------===++++***** 207 | *+++++********+++++=============*#%@@@@@@@@@@@@@%***#%######%#######%%%%%%####%####%%########%%%%%%#**###%%%#####%%%%%#*+==++++++++***+===+++++*#***##*++===+**++==++***+--:::::-::::-::--=++==++++++**######*+=+****+==---=++*++=================+*******##*+++++=====++*#%#*++++++******+++++++******#%%@@%%%%%###*#%%%%#####%%##############****+********++++++++++=====+++++**###***++======---===-----==+++==----:--------=====+++*+++ 208 | **##**+==++******+==-==++++=--=*%@@@@@@@@@@@@@%#**##%###%%%%######%%%%%%########%%%%%######%%%%%%%*++**#%%%%###%%%%%%#*+++++++++++****+=-==+***#****#*++++=++*+=====+****+--:::::::::::::--====++++++*#%%%%%#*+++****+======+***+===========-----=*#*##*****++==========+*###*+===+++******+++++*########%%@@%%%%%#####%%%##**#%%%#*****##***##****++********+++++++++=======++++*####***+=====-------------=+++========++++++++++++++***** 209 | %%##*+====+++++++==-=+**#*+++*%@@@@@@@@@@@@@%#***####%%%%%#####%%%%%%%%#######%%%%%%##**####%%%%%*+++*########%%%%%%#**++**+++++*****+=---=+**#**+***+++++=+++====-=+++**+=-:::::-::--:::---==++*+++*##%%%%%#*+++++++===++=++*#**+=====-------::-=*####*****+==========+++***+====+++*******++**#%%%###*##%%%%%%%%##########***#%%#****************++++++*****+======+++++=====++**###***++===---:::::------========++**######**####**##*** 210 | ##*+++==============+*#%#**#%@@@@@@@@@@@@@%#***####%%%%%%####%%%%%#%%%%%%%###%%%%%##***##%%%%%%%#***##########%%%%#**+++**+++++**###*+----=+*##**+**+++++===++====-==+++**+=----------::----==+**+=++##%%%%#*++===----==++++*###++=====-----::::-=*%%#***++===--=======++***++====++**#####***##%%@@%##**####%%%%%%####***###***###****************+++===+**#**++==--=+++**++=++++*******++===---:::::::----===--===+**##%%%%###########*** 211 | **+++++=======+++++*#%%%%%%@@@@@@@@@@@@@%#*#####%%%%%%%#**###%%%###%%%%%%###%%%%%%#***##%%%%%%##**#%%%#######%%%##*+===+*++++**##%##*=----=+*##***#*+++++=======+=--====*#*=====-----:::----=+***+=+*##%%###+==--------=++++*##*+=====--:::::::-=+#%%#*+++=-----======++**#*+++++=++*#%%%%%####%%%%%%%#########%%%%%%###***###************++++********++=+****#**+==--==+***++++++=+++++++++++==--:::::::---====--==++*####**############** 212 | ***++====++++*****##%%@@@@@@@@@@@@@@@@%#*##%####%%%%%##**##########%%%%##%%##%%%%##**####%%%#****#%%%%##***#%%%%#++===+***++**##%%%#*=---==**##***#*+=+++======++=--=--=*##+==++===---::----=+#**+++*##%##**=----------====+*##*+======--:::---=+*%%#*+++==-----======+*####****+++**#%@@@@%#*#####%%%%#**##########%%%##***####***********+==+***#**##*++****##*++==---==++**+++===---==+++++++=---::::----==========++++++==+++++*******+ 213 | **++====+++++**##%%%@@@@@@@@@@@@@@@@@#**#%%####%%%%######%########%%####%%%#%%%%##*##%#%%%%%*++*##%%%##***#%%@%#+++++*#####*####%%%#*=--==+*###*+**+==+++==+===+=------=*##*==***===-:::--:-=*#**+++*####**+=-----==----===+*##*+=-==+========+*#%%#*++++===----=====+*#%%%%####*##**#%@@@@%*****#%%%%%#****##******#####*******###******##*+++***#######***#***++==++==---=+***++===-----==++++===-------=====+++++=========---===++++++== 214 | *+++++++**+++#%%%%@@@@@@@@@@@@@@@@@%**#%%##%%%%%%####%%%%%######%%%####%%%%%%%%####%%#%%%%##***##%%%######%%%%#+==+*####%%#######%%#+====+***#*++**+==+**++++==+==-----=*%%*++*#*===-::-----+***+++**###**+=------===---====*##+==---==+++++++*#%%%#****+=++=====++++*##%%%###%###%%%%%@@@@%*++++*#%####*+++++**++++++**##***++*####******##*+++***#########***++====+++==---=+***+++==-----====---========+++++++++++========---==++**++=- 215 | ==+***+++++*#%@@@@@@@@@@@@@@@@@@@%***#%###%%%%%##*#%%%%%%%%%%%%%%%###%%%%%%%%####%%%%%#########%%%%%%%%%%%%%%#*==+*##%##%%%%#######*+=++++****++**+==++**++++==*+=-----=*%%#++**++==-:-==+=+**++***##****+==------==----===+*##+=-----=++*****#%%%##**##****+++***#**###%%*+**#**#%@@@@@@@@%*====+*#%%##*+==--=+++====++*******+*####******#***++****#***####**+++++++*++===--==+**++**+==---===------======++++++++++++++====----==+***++= 216 | +++**+++**#%@@@@@@@@@@@@@@@@@@@#*+*#%###%%%%%#####%%%%%%%%%%%%%%##%%%%%%%###*###%##%%%#***###%%%%%%%%%%%%%%%#*+==+*#%%####%%######*++++*+++***++**++++***=+++++**=-----=*%%#*+***++----=+***#*++***##*++++==------------==+*###+=---==+********#%%#######*##########**++*#=--=+++*%@@@@@@@%#*=====+*#%%#*+=----=+++===+++*********#####**++**********##**##**#**++******++==--====+++**++==-====----=----============++**++++==--:--=++++++ 217 | +*******#%%@@@@@@@@@@@@@@@@@@#+++#####%%%%%%###%%%%%%%#%%##%%%###%%%%%%%##***#%%###%%#***###%%###%#####%%%%#+====+*########%%#####*+=+**+=++**+*##****#*+++*+***+------=*%@#******+=--=++**##*++***#**+==++=-------------=+#%%#+==--=+**********%%%#########%#####***+=-=*+-:--+#%@@@@@@@@%#*=--===++*###*+=----=+++++++*****##########**+++++***##***##******#**++*###*+++====++=====++==-==------=====--===--------=+*++++++++=----====++ 218 | **++*##%%@@@@@@@@@@@@@@@@@@#*+*######%%%%%###%%%%%%%#####%%%%###%%%%%%%##**#%%###%%%#*+*#%%%%#########%%%%#+=====+**#****##%%%###*+==+**+==++++*#######**++*+*#*=---=--=*%%#*+***#*=--=++*###*++++***++==+++==--==------==*%%%#+===--+**##****+*#%%######**######****+=:-+*=---+%@@@@@@@@@%#*+-:-=--=*##%#*=-----==++****######%#######**+++++++*******##*#######****###**+++++***==---===--=-------==++==============+**+==++++++====+==++ 219 | +==*%%%@@@@@@@@@@@@@@@@@@#++*#%%####%%%%###%%%%%%%%##%##%%%###%%%%%%%%####%%%###%%#*++*#%%%%######%%%%%%#*+=====++***++*###%%#**++==+*#*+==+***#%##%%%#***++++#+=--==--=*%%#****###+==+***#%%#*++****+==++*+++=======++==+#%%%#+++==-=+*********%%#######***#%####**++=-:=**==+*%@@@@@@@@@%***=::-=--=+#%%#+=-----==+*##########%%%%%###**++*****+++****###*#############*******##*+==---==-----=----==+++++++++++++*++***+===++++++==+++++ 220 | +*#%@@@@@@@@@@@@@@@@@@@%*++#%%%###%%%%##*#%%%%%%%#%%%%%%%###%%%%%%%%%####%%%##%%%#*=+*##%%%%######%@%%%%*+==+==++++*+==**####*+====+*##*+==+***#%#%%%#***++==**=---=---=*%%#****###*++*#####%%*++*****++++*****+++++****++#%%%#****+===++******#%%########**#%%%####*+=--=*#++*#@@@@@@@@@@#***+-:--=---+*###*=------=*#%%#***###########***+**#**++++***###**#############*+***#####*+=-::-----=+++=====+************###*###*++++++*++====+ 221 | %%@@@@@@@@@@@@@@@@@@@%#**#%%%%%%##%%#####%%%%%%%%%%%%%%%##%%%%%%%%%%####%%%%%%%%#*++*##%###%#####%%@@%%#*+++==++=++++==+*****+====+**##*+++*++*######***+===+**=-------+#%%**####%#*==+#####%%#****++*******##***+++*##*++#%%######*+==++****++#%##*#########%%%####*++++=+#**#%@@@@@@@@@@#***+=====--:-=+*##*+=-::--=+#%##**###*****###******##*++++++*******+*########*###******####*+=-:--=-=+****++++*#####********######*****+++++===- 222 | @@@@@@@@@@@@@@@@@@%##**#%%%%%%###%%###%%%%%%%%%%%###%%###%%%%%%%%%####%%%#%%%%%#***##%%#**###*###%%%%%#*++++=++==++===++****+==--=++****++**++******++**+===+#*=------=*%@%****#%%*=--=*####%%#****++*#*+**####**+++***+=+#%%####**+===+++***+*#%##**########%%%####****+--*###%@@@@@@@@@%#**++==+++==---=++***+=-::--=+*###*####**##*###*++*####*+++=++*+***+-:-=++*#####*#####*****###*++=====+****++==+*#####**#**++**###*++++++++++++== 223 | @@@@@@@@@@@@@@@@%****##%%%%%%##%%%##%%%%%%%#%%%%%%%%###%%%%%%%%######%###%%%%%#*####%%%#*##****#%%%%%#++++++++========+++++++==-==++*++++***+**+++==++*+=---+*+=-:----+#@@%*+==*#*=-::=*###%%%#***+=+*#+=+######****++*+=+#%%#****+=---==+*****####*##%######%%%####****+-:=###%%@@@@@@@@%#**++==+*+=----=-=++**+=--:--==+*#######*##**###***####**+==++*****+-:::-=+*###%##**####***####***+===+*###*++=-==*########*++++*##**+*+=-==+++++ 224 | @@@@@@@@@@@@@@#*++#%%%###%%%%%%###%%@%%%%##%%%%%%%%***%%%%%%%####*#%####%%%%####%%#%%%%%%###**#%%%%#*+=++++++====-===++=+=++++=-===++===+**++*+++===+**=---=*+==-----=+*@@#+---+*+-:::=*#*#%%##**++=+#*++*##**#**++*++**==+#%%***+=----==+***+++*####%%######%%%###****+=::-#%%#%%@@@@@@@@#*+====+**+-------=+*#*+=-:::-=+*#####%%###*+*#####%###***+=+***###++==-=+*#%%%%%%#**###########*+==-:-+******++=--++***####***+=+***##*+=--==+=+ 225 | @@@@@@@@@@@@@#=+*#%%###%%%%%#####%%%%%%%##%%#%%%%#**#%%%%%%%#####%%%##%%%%####%%%%#%%%%%%######%%#*+=====++++=======+*+====+*=--==++++++++++**=+====**=----++=-==---===*@@#=-:-+#=-::-+#*+*#*+++++==+##***##*****+=++**+=-=#%%*++==-----=++++===*#%##%%#######%%##*****=-:::+%%%%%@@@@@@@@%*+=---+*#*=-=----=++##**=--:-=**%%%###%%####****##%%#####*******#%#*****###%#######*+*###*********=--::-++=+****+=--+***##%##**+=+***#**+==--=== 226 | @@@@@@@@@@@@#-=##%##*#%%%%%####%%%%%%######%%%%#**##%%%%%%%####%%%%##%@%%#*##%%%%##%%%%%%##%%%%%#*+=--===++++===+**++*++++=++=---=+++*++=-=++==+-==+*+----=+=--==---=+-+%%#=--=*#+---=+*++**+==+*+==+*#***####***+=-=+*+=-=#%#*++==------=+=====*%%##%%##*##*#%%##*++**+=--:=%@%%@@@@@@@@@@#+==--=*#%*==----=+++*##*++=--=*#%#######%#####++##%%########*****#%#*+*######***###***##+=+++**###+=-::-===***##*+=-=***#######****#**+++=---== 227 | @@@@@@@@@@@%=-+*#####%%%%##%%%%%%%%##%%###%%%#*+*%%%%%%%##%###%%%%#%%%%%###%%%%%##%%%#%%##%%%%%#*+=+++*+++*+===+*##+******++==--=++=+*==-=====+====**=----==-:-==-:-++-+#%#===*#*+====+*++**+++**+==+**+++####****=-=+====+###*+==-------=======*%%#########**#%%##***#*++=-=#@@@@@@@@@@@@@%#*+====+###+===--+=+*##*+**=---++*******%######**#%%%#%%########**#%*++*#####**#######***++**###%##*+=:::=++#####**+===++####%###*****++++==--= 228 | @@@@@@@@@@#===+#%%%%%##%#%%@%%%%%%#%%%##%%%%***#%%%%%%#######%%%%%%%@%#**##%%%%##%%%##%%##%%%%#*==+**#*+***===+**##+++*##*+++===+=-=+=====---=+++=**=-----=--:-=-::-**==*%#=-=**==---=+*++****+**++====+++*###**+*=--=====*%%#+=---------=+=====*%%#########**#%#######*+++=-+%@@@@@@@@@@@@%%*++++===*##*=-=-===+*#+=++*=:::-=+++++*#%###****##%%##%##%###%##*####***####**###*##****+++*###%%###*=---=+*###%###*+=--=++*####*++*****++==== 229 | @@@@@@@%#====+#%%%%%##%%%%%%%%%%%%%%%###%%#++*#%%%%%%####*##%%%%%@%%%#**##%%%%%###%##%%%%%%@%#+==++****+**+=+****##*+***##***+*+--=+=--------=+++*#*=--::--=-:-----=##+=*%#+--++==---=+***#*#++**++=---==+**##*++++-===-=+#%%#=------==--=++====*%#############%#**#*##*++*+-=%@@@@@@@@@@@@@@%*+**+=-=#%#+-=======+==+===-:::-=++++***###*++=+*#%#####*###*##**####*********##**#*+**++++*####%%##*+--==+*#%#####**+=---=+****+==+******+++ 230 | @@@@@%*--=+*#%%%%%###%%%%%%%%%##%%%###%%%**###%%%%%%####*##%###%@%%%####%%%###%#####%%%%%%%%#+===++****++==*###**#%#*#**#*##***+=+*+---------===+##++-----=+--::---+%#+=+%#+-=**+=---=+####*#++##*+=-:----++***+==+==+=--+%%%*==---=-=---=++=--=#%#*#########*##*****##***++-=#@@@@@@@@@@@@@@%#+***+=+*%%*=-=+====+==+=----:::-=*##****###++==****####++*++++*####****+++***#%####++*#++++**####%%#*+=-=+***#######**+====+++===+==++****** 231 | @@@%*-:-=#%%%%%%####%@%%%%%%##%%%%%%%%%#**%%##%%#####++#######%@%%#*##%%%%##*####**%%%%%@@%%*===++*****+==+*#%###%%##***++***##*#*+=-===----=---=#***=--=-**==:::-=#@%+=+#*-:+*++=---=*#%%###**##*+=-:::::++++*++=++++=--=#%%*+==-==----==+=---=#%%***#######**########*#*+=-=*%@@@@@@@@@@@@@@%****++***%#*+======++=+=-----::--+*####*+***+==++===*##*=++++**#%%#*+++==++*##%%####*+*#**+******###***+==++--+*#######**++++====+++++****** 232 | @@#-::-+#%%%%%####%@%%%%%%%#%%%%%%%@%#**#%%#%%%#####*+#%####%%%%%#**#%%%%##*##*#**#%#%@%%%%*=-==+****#+-=**##%###%%#*+*==+*#####+==-=++==+-==-::-*#*#+==+=+++=::--+#@%*==*=--*+====--=*%#######%#*+=-:::::+++****++**+---=*%#*++*+++==+++++--=-=#%%#**#######**#########*+=---=#@@@@@@@@@@@@@@@#++*++*+=*%%#+====-=++==----::::-=***###*++*+=-====-+*#*====+++#%##*+++==++=+###**##**+*##++*#***********++=-::-+######**++++++===+********* 233 | %+--=*###%%%%#*#%%@@%%%%###%%%##%%@%**##%%%%%%%##%####%%##%%%%%###*#%%%%#####*###%%#%@%%%#*=====+***#*==*###%#*##%%*+++==+**+++=======+=+*=++=-:-+#*+==+*=-=+=:---+#@@*==+=-=#=--=+--=*#######%%#+==-::::-++**#**+*##*---=#%##**##******++=--=-=#%%##*#####****#%#######*+=--:-*@@@@@@@@@@@@@@@%++**+++==*%##====-+*#====-=-::--=++*#****+*++=-==+==***+=+=+*++*###***++=+==++**+*****+***++*#*+**++***###+=-==-+##**##*++*===+===+++++*+=* 234 | -------------------------------------------------------------------------------- /examples/cat_scale5_draw_ascii.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jontonsoup4/ascii_art/f36e0724c8e1c94631c673e2d9803a1861ea5bed/examples/cat_scale5_draw_ascii.png -------------------------------------------------------------------------------- /examples/cat_scale5_full_range_color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jontonsoup4/ascii_art/f36e0724c8e1c94631c673e2d9803a1861ea5bed/examples/cat_scale5_full_range_color.png -------------------------------------------------------------------------------- /examples/draw_a_cat.py: -------------------------------------------------------------------------------- 1 | from ascii_art.ascii_art import ASCIIArt, ASCIIPicture 2 | 3 | # ASCII drawing 4 | picture = ASCIIArt('cat', 2).draw_ascii(curve=1) 5 | ASCIIPicture(picture).save('cat_scale2_draw_ascii.png') 6 | with open('cat_scale2_draw.txt', 'w') as f: 7 | f.write(''.join(picture)) 8 | 9 | picture = ASCIIArt('cat', 5).draw_ascii(curve=1) 10 | ASCIIPicture(picture).save('cat_scale5_draw_ascii.png') 11 | with open('cat_scale5_draw.txt', 'w') as f: 12 | f.write(''.join(picture)) 13 | 14 | # Colored ASCII drawing using sorted custom character sets on a black background 15 | colored_picture = ASCIIArt('cat', 2).draw_color_ascii(ASCIIArt.sort('09215')) 16 | ASCIIPicture(colored_picture, 'black').save('cat_scale2_color_numbers') 17 | 18 | colored_picture = ASCIIArt('cat', 5).draw_color_ascii(ASCIIArt.sort('09215')) 19 | ASCIIPicture(colored_picture, 'black').save('cat_scale5_color_numbers') 20 | 21 | colored_picture = ASCIIArt('cat', 2).draw_color_ascii(ASCIIArt.sort('jontonsoup4')) 22 | ASCIIPicture(colored_picture, 'black').save('cat_scale2_color_name') 23 | 24 | colored_picture = ASCIIArt('cat', 5).draw_color_ascii(ASCIIArt.sort('jontonsoup4')) 25 | ASCIIPicture(colored_picture, 'black').save('cat_scale5_color_name') 26 | 27 | # ASCII to HTML using 'kitten' as a character set on a black background 28 | html = ASCIIArt('cat', 1).draw_html(ASCIIArt.sort('kitten'), background_color='black') 29 | with open('cat_scale1_html_kitten.html', 'w') as f: 30 | f.write(''.join(html)) 31 | 32 | html = ASCIIArt('cat', 2).draw_html(ASCIIArt.sort('kitten'), background_color='black') 33 | with open('cat_scale2_html_kitten.html', 'w') as f: 34 | f.write(''.join(html)) 35 | 36 | # ASCII to HTML using only '#' on a black background 37 | html = ASCIIArt('cat', 1).draw_html(ASCIIArt.BLOCK, background_color='black') 38 | with open('cat_scale1_html_block.html', 'w') as f: 39 | f.write(''.join(html)) 40 | 41 | html = ASCIIArt('cat', 2).draw_html(ASCIIArt.BLOCK, background_color='black') 42 | with open('cat_scale2_html_block.html', 'w') as f: 43 | f.write(''.join(html)) 44 | 45 | # Colored ASCII with only '#' on a black background 46 | colored_picture = ASCIIArt('cat', 2).draw_color_ascii(ASCIIArt.BLOCK, curve=1.5) 47 | ASCIIPicture(colored_picture, 'black').save('cat_scale2_block_color.png') 48 | 49 | colored_picture = ASCIIArt('cat', 5).draw_color_ascii(ASCIIArt.BLOCK, curve=1.5) 50 | ASCIIPicture(colored_picture, 'black').save('cat_scale5_block_color.png') 51 | 52 | # Colored ASCII with full grayscale 53 | colored_picture = ASCIIArt('cat', 2).draw_color_ascii(ASCIIArt.FULL_RANGE, curve=1.5) 54 | ASCIIPicture(colored_picture).save('cat_scale2_full_range_color.png') 55 | 56 | colored_picture = ASCIIArt('cat', 5).draw_color_ascii(ASCIIArt.FULL_RANGE, curve=1.5) 57 | ASCIIPicture(colored_picture).save('cat_scale5_full_range_color.png') 58 | -------------------------------------------------------------------------------- /examples/shades.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jontonsoup4/ascii_art/f36e0724c8e1c94631c673e2d9803a1861ea5bed/examples/shades.png -------------------------------------------------------------------------------- /examples/shades.py: -------------------------------------------------------------------------------- 1 | from ascii_art import ASCIIArt, ASCIIPicture 2 | from PIL import Image, ImageDraw 3 | from collections import OrderedDict 4 | 5 | raw = '''abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*()-_=+[]{}\|;:'",./<>?`~''' 6 | text = "" 7 | for i in raw: 8 | text += (i * 50 + '\n')*25 9 | ASCIIPicture(text).save('shades.png', 94) 10 | raw = list(raw) 11 | im = Image.open('shades.png', 'r') 12 | shades = [] 13 | for y in range(im.size[1]): 14 | shades.append(255 - im.getpixel((0, y))[0]) 15 | print(''.join([x for (y, x) in sorted(zip(shades, raw))])) -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from distutils.core import setup 2 | 3 | if __name__ == "__main__": 4 | setup(name='ascii_art', 5 | version='0.2.0', 6 | description='Image to ASCII art generator', 7 | author='Jonathan Reed', 8 | author_email='jontonsoup4@gmail.com', 9 | url='https://github.com/jontonsoup4/ascii_art', 10 | install_requires=['Pillow>=3.0.0'], 11 | packages=['ascii_art'], 12 | package_dir={'ascii_art': 'ascii_art'}, 13 | ) 14 | --------------------------------------------------------------------------------
') 105 | html.append('{1}'.format(hex_codes[index], char)) 106 | html.append('