python API中所使用的PIL库部分代码在最新版pillow 10.0.0中已经被删除
Oniremisce opened this issue · comments
Oniremisce commented
在使用pip默认安装的“pillow10.0.0”模块下,PPOCR_visualize.py中77行“w, h = ttf.getsize(text)”报错,恢复到“pillow 9.2”正常。
原因为pillow已经在新版本中删除了FreeTypeFont.getsize()方法,变更为新的方法FreeTypeFont.getbbox()。
具体见文档:https://pillow.readthedocs.io/en/stable/releasenotes/9.2.0.html
hiroi-sora commented
感谢。已更新。