使用 imagemagick 来做图片处理:
for file in *.jpg *.png; do
exif=$(identify -format "%[EXIF:*]" "$file")
if [ -n "$exif" ]; then
echo "Handling $file"
echo $exif
mogrify -strip "$file"
else
# echo "Ignore $file"
:
fi
done
Exif 相关信息在我之前的文章《Linux 工具箱: exiftool》中有提到。