🐛 修复某些角色圆头像无法正常显示 (#483)

* 🐛 修复某些角色圆头像无法正常显示

* 加个判断
This commit is contained in:
forchannot 2023-11-01 17:15:27 +08:00 committed by GitHub
parent 5ae8e6f6e3
commit ae96cb809a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -417,7 +417,8 @@ class PMImage:
"""
将图片转换为圆形
"""
# self.convert('RGBA')
if self.image.mode != 'RGBA':
self.image = self.convert('RGBA')
w, h = self.size
r2 = min(w, h)
if w != h: