mirror of https://github.com/Mai-with-u/MaiBot.git
fix: 提高压缩率
parent
f6e5a15ed2
commit
dfdf25c8e4
|
|
@ -242,7 +242,7 @@ class EmojiManager:
|
||||||
print(f"\033[1;32m[调试信息]\033[0m 使用默认标签: neutral")
|
print(f"\033[1;32m[调试信息]\033[0m 使用默认标签: neutral")
|
||||||
return "skip" # 默认标签
|
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编码
|
"""压缩图片并返回base64编码
|
||||||
Args:
|
Args:
|
||||||
image_path: 图片文件路径
|
image_path: 图片文件路径
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue