hiroi-sora / PaddleOCR-json

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

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

Closed Oniremisce closed 8 months ago

Oniremisce commented 1 year ago

在使用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 11 months ago

感谢。已更新。