python 讲图转换成字符串图
通过多线程实现多张图片同时转化成字符图
效果图如下:
用到的:
- Python pillow
from PIL import Image
import argparse
from threading import Thread
import os
ascii_char = list("$@B%8&WM#abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ/\|()1{}[]?-_+~<>i!lI;:,\"^`'. ")
#根据rgb 计算灰度值
def get_char(r,g,b,alpha =