摘要: PIL:Python Imaging Library,是Python事实上的图像处理标准库了。最近的优秀的兼容版本名字叫Pillow,因此我们可以直接安装使用Pillow。 补充:这里虽然安装了Pillow,但我们还是使用PIL,因为Pillow不是一个单独的库,而是对PIL的更新。 操作图像 1、 阅读全文
posted @ 2020-10-14 13:29 ShineLe 阅读(44) 评论(0) 推荐(0)
摘要: 比如编程时要用到Arial字体,Arial的字体绝对路径为 C:\Windows\Fonts\Arial.ttf 注意字体文件的后缀都是ttf 阅读全文
posted @ 2020-10-14 13:11 ShineLe 阅读(1153) 评论(0) 推荐(0)
摘要: 使用PIL时,创建某个字体Font对象时出错: font=ImageFont.truetype('Arial.ttf',36) 可能原因有两个: 1、PIL无法定位到字体文件的位置。 可以通过提供绝对路径解决,比如 font=ImageFont.truetype('C:\Windows\Fonts\ 阅读全文
posted @ 2020-10-14 13:06 ShineLe 阅读(2474) 评论(0) 推荐(0)