From 9737d1e78b2cbfd7190759b565fe4016ff4e0563 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A5=87=E8=B6=A3=E4=BF=9D=E7=BD=97?= Date: Sat, 4 Nov 2023 21:17:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20iPhone=20=E5=9B=BE=E7=89=87=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E8=BD=AC=E6=8D=A2=20jpg?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 图片可能是其他人发送的,需要按照片处理 --- iphone-photo-format.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iphone-photo-format.sh b/iphone-photo-format.sh index 2ab440a..fd6d962 100644 --- a/iphone-photo-format.sh +++ b/iphone-photo-format.sh @@ -24,7 +24,7 @@ for file in *.{HEIC,heic,PNG,png,JPG}; do new_filename=${new_filename/.PNG/.jpg} new_filename=${new_filename/.JPG/.jpg} - if [[ "${filename##*.}" == "png" || "${filename##*.}" == "PNG" || "${filename##*.}" == "jpg" || "${filename##*.}" == "JPG" ]]; then + if [[ "${filename##*.}" == "png" || "${filename##*.}" == "PNG" ]]; then # 使用 ImageMagick 直接处理 PNG 图片 magick "$file" -gravity center -quality 80 output/$new_filename else