fix: 提高压缩率

This commit is contained in:
tcmofashi
2025-03-05 09:10:22 +08:00
parent f6e5a15ed2
commit dfdf25c8e4

View File

@@ -242,7 +242,7 @@ class EmojiManager:
print(f"\033[1;32m[调试信息]\033[0m 使用默认标签: neutral")
return "skip" # 默认标签
async def _compress_image(self, image_path: str, target_size: int = 4 * 1024 * 1024) -> Optional[str]:
async def _compress_image(self, image_path: str, target_size: int = 0.8 * 1024 * 1024) -> Optional[str]:
"""压缩图片并返回base64编码
Args:
image_path: 图片文件路径