【问题标题】:Convert one ascii art To a photo with python使用 python 将一个 ascii 艺术转换为照片
【发布时间】:2020-10-13 15:02:00
【问题描述】:

我想当一个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)

【问题讨论】:

标签: python ascii


【解决方案1】:

现在我想到了一些东西,我将其转换为 html,然后下载她的照片(: 并使用闪存驱动器进行操作,让用户的工作更轻松,在浏览器上更有趣

【讨论】:

    猜你喜欢
    • 2015-10-10
    • 1970-01-01
    • 2021-11-28
    • 1970-01-01
    • 1970-01-01
    • 2013-06-27
    相关资源
    最近更新 更多