将一个 ascii 艺术转换为 python 的照片

Convert one ascii art To a photo with python

我想要一个 Ascii 艺术 将我用 Python 创建的内容转换为图像输出,我不知道该怎么做, Text to Ascii art 我想变成一张照片,谢谢您的帮助和指导...

from pyfiglet import figlet_format
from termcolor import colored

def Print_art(msg, color):
    Valid_colors = ("red", "green", "yellow", "blue", "magenta", "cyan", "white")

    if color not in Valid_colors:
        color = "magenta"
    ascii_art = figlet_format(msg)
    colored_ascii = colored(ascii_art, color=color)
    print(colored_ascii)


msg = input("what would you like to print? ")
color =  input("what color? ")

Print_art(msg, color)

现在我想到了一些东西,我将它转换为 html 然后下载她的照片 (: 并使用闪存驱动器来完成,使用户的工作更轻松,并在浏览器上获得更多乐趣