Apply suggestions from code review

This commit is contained in:
quqiOnfree 2025-09-02 17:44:52 +08:00 committed by GitHub
parent a37b9d14f2
commit b191e02d89
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -82,7 +82,6 @@ def create_image(background: bytes,
# 添加半透明蒙版层以增强文字可读性
overlay = Image.new('RGBA', (width, height), (0, 0, 0, 80)) # 半透明黑色蒙版
image.paste(overlay, (0, 0), overlay)
if width // 2 > height:
small_size = int(height * 0.8)
else: