用户:
#逸一时误一世#查看:0 回复:0 评论:0 创建时间:2020-08-19T19:30:39
【作品展示】

【作品介绍】
bangjil
【作品源代码】
from PIL import Image,ImageDraw,ImageFont
import matplotlib.pyplot as plt
#打开
png = Image.open('原图-滑稽.png')
#图片转画板
draw = ImageDraw.Draw(png)
#导入字体
font = ImageFont.truetype('字体.ttf',20)
#写字
draw.text((75,185),'I am not an emoji',fill = (0,255,255),font = font)
draw.text((75,135),'我不是表情包',fill = (0,255,255),font = font)
#显示
plt.imshow(png)
plt.show()
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn