fix: 修整所有日志与报错为中文

This commit is contained in:
DLmaster361
2025-08-30 20:30:43 +08:00
parent 389e06cf9e
commit f62740f20b
20 changed files with 363 additions and 422 deletions

View File

@@ -48,7 +48,7 @@ class ImageUtils:
@staticmethod
def compress_image_if_needed(image_path: Path, max_size_mb=2) -> Path:
"""
如果图片大于max_size_mb则压缩并覆盖原文件返回原始路径Path对象
如果图片大于max_size_mb, 则压缩并覆盖原文件, 返回原始路径Path对象
"""
RESAMPLE = Image.Resampling.LANCZOS # Pillow 9.1.0及以后
@@ -82,6 +82,6 @@ class ImageUtils:
height = int(height * 0.95)
img = img.resize((width, height), RESAMPLE)
else:
raise ValueError("仅支持JPG/JPEG和PNG格式图片的压缩")
raise ValueError("仅支持JPG/JPEG和PNG格式图片的压缩")
return image_path