def makeglyphs():
for i in range(0, len(C)):
im = Image.new("RGB", (100, 110))
dr = ImageDraw.Draw(im)
font = ImageFont.truetype(os.path.join(os.path.dirname(__file__),"fonts/Impact.ttf"), 124)
dr.text((0, -25), C[i], (255, 255, 255), font=font)
fwx = firstwhitex(im)
im = Image.new("RGB", (100, 110))
dr = ImageDraw.Draw(im)
font = ImageFont.truetype(os.path.join(os.path.dirname(__file__),"fonts/Impact.ttf"), 124)
dr.text((-fwx, -26), C[i], (255, 255, 255), font=font)
cimgs.append(im)
# make threshold image
评论列表
文章目录