added 'no color' code to end of ansi color outs to avoid fucking up terminals
This commit is contained in:
parent
646e876528
commit
50c780969d
6
ascii.py
6
ascii.py
|
@ -142,7 +142,11 @@ def colorize(chars, image, code):
|
|||
new_row += prefix[code] + char_color(image.getpixel((k,j)), code)
|
||||
new_row += chars[j][k]
|
||||
chars[j] = new_row
|
||||
return "\n".join(chars)
|
||||
|
||||
chars = "\n".join(chars)
|
||||
if code == "ansi":
|
||||
chars += "\033[0m"
|
||||
return chars
|
||||
|
||||
|
||||
def image_to_ascii(image, reverse=False, colors=None):
|
||||
|
|
Loading…
Reference in New Issue
Block a user