Lv.1
呃,我是挂的爸爸
签名:我吃si了
在 我想要电脑代码 中回复
from PIL import Image, ImageDraw import matplotlib.pyplot as ink a, b = (60, 60)
IMG = Image.open("bcm.jpg").convert('L').resize((a, b)) ink.rcParams['image.cmap'] = 'gray'
#Asn = '''@B%8&WM#*o''' Asn = '''$@B%8&WM#*oahkbdpqwmZO0QLCJUYXzcvunxrjft/\|()1{}[]?-_+~<>i!lI;:,\"^`'. ''' txt = '' for y in range(b): for x inrange(a): posb = (x, y) g = IMG.getpixel(posb) infh = int(g/256*10) txt += Asn[infh] + " " txt += '\n' img_nd = Image.new('RGB',(a*12,b*15),'white') des = ImageDraw.Draw(img_nd) des.text((0,0),txt,fill='black') img_nd.resize((a*12,b*12)).save("好啊.jpg")
2019-08-24T21:45:44 点赞:1