hiroi-sora / PaddleOCR-json

OCR离线图片文字识别命令行windows程序,以JSON字符串形式输出结果,方便别的程序调用。提供各种语言API。由 PaddleOCR C++ 编译。

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

python API中所使用的PIL库部分代码在最新版pillow 10.0.0中已经被删除

Oniremisce opened this issue · comments

在使用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

感谢。已更新。