diff --git a/new_studio_to_reg/tools_to_xmps.py b/new_studio_to_reg/tools_to_xmps.py index 81e83a5..5b3789a 100644 --- a/new_studio_to_reg/tools_to_xmps.py +++ b/new_studio_to_reg/tools_to_xmps.py @@ -18,7 +18,7 @@ def check_rate_xmps(pid): return False return True -def clearExifAndRotate(imagePath, rotate=180): +def clearExifAndRotate(imagePath, rotate=270): if os.path.exists(imagePath) == False: print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} {imagePath} 图片不存在') return @@ -37,7 +37,7 @@ def clearExifAndRotate(imagePath, rotate=180): with Image.open(imagePath) as img: # 使用RGB模式打开图像来丢弃可能存在的EXIF信息 img = img.convert("RGB") - img = img.rotate(180) + img = img.rotate(rotate) # 保存图像,保存时不会带有原始的任何元数据 img.save(imagePath, quality=100) # 对于JPEG,可以调整质量参数