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
+2 -2
View File
@@ -41,7 +41,7 @@ function processImage(inputPath, outputPath, predetect) {
try {
if (type === IMAGE_TYPES.SCREENSHOT) {
execSync(
`magick "${inputPath}" -gravity center -quality 80 "${finalOutputPath}"`,
`magick "${inputPath}" -auto-orient -gravity center -quality 80 "${finalOutputPath}"`,
{ stdio: 'inherit' }
);
} else {
@@ -51,7 +51,7 @@ function processImage(inputPath, outputPath, predetect) {
? `-gravity center -resize "${target.size}^" -extent "${target.size}"`
: `-resize "${target.size}"`;
execSync(
`magick "${inputPath}" ${resizeArgs} -quality 80 "${finalOutputPath}"`,
`magick "${inputPath}" -auto-orient ${resizeArgs} -quality 80 "${finalOutputPath}"`,
{ stdio: 'inherit' }
);
}