fix: 图片工具转换图片自动去除修复旋转字段,去除旧版脚本

This commit is contained in:
2026-09-10 14:01:26 +08:00
parent b9682de64a
commit 427c92b9ec
7 changed files with 101 additions and 234 deletions
+3 -2
View File
@@ -63,9 +63,10 @@ function recoverExif(targetFile, sourceFile, succeedDir) {
}
try {
// 使用 exiftool 复制 EXIF 信息
// 从原图拷 EXIF。后期软件(如美图)往往已把旋转烧进像素,
// 若原样带回 Orientation,看图软件会再转一次;强制 Normal 避免这个坑。
execSync(
`exiftool -overwrite_original -all= -UserComment= -tagsFromFile "${sourceFile}" "${targetFile}"`,
`exiftool -overwrite_original -all= -UserComment= -tagsFromFile "${sourceFile}" -Orientation=Normal "${targetFile}"`,
{ stdio: 'inherit' }
);