Closed Rouphy closed 1 month ago
一个不用降级pillow的办法是将第327行换成
bbox = shougouDraw.textbbox((0, 0), playCountInfo, font2)
playCountInfoW = bbox[2] - bbox[0]
playCountInfoH = bbox[3] - bbox[1]
同时将第328行换成
textPos = ((shougouImgW - playCountInfoW - font2.getbbox(playCountInfo)) / 2, 5)
因为textsize()和getoffest() are both out of date. 我写了一个b40和b50改好的版本希望可以直接push
发pr好了
发pr好了
感谢鱼佬,pr发了
测试时间:2024-08-22 问题描述:获取b50的时候会报错AttributeError: 'ImageDraw' object has no attribute 'textsize' 报错的文件路径:src\libraries\maimai_best_50.py 行数:line 327 依赖包:pillow-10.4.0 备注:pillow库的官方建议是改用textbbox or textlength 附代码及报错截图