dotfiles/home/default/scripts/remove-exif

31 lines
721 B
Plaintext
Raw Normal View History

#!/usr/bin/env sh
# rename .JPG -> .jpg
count=`ls -1 *.JPG 2>/dev/null | wc -l`
if [ $count != 0 ]; then
rename JPG jpg *.JPG
fi
# remove exif except orientation from .jpg
count=`ls -1 *.jpg 2>/dev/null | wc -l`
if [ $count != 0 ]; then
for i in *.jpg; do
2024-05-23 11:30:18 -04:00
/usr/bin/vendor_perl/exiftool -all= -overwrite_original -tagsfromfile @ -Orientation "$i"
done
fi
# rename .PNG -> .png
count=`ls -1 *.PNG 2>/dev/null | wc -l`
if [ $count != 0 ]; then
rename PNG png *.PNG
fi
# remove exif except orientation from .png
count=`ls -1 *.png 2>/dev/null | wc -l`
if [ $count != 0 ]; then
for i in *.png; do
2024-05-23 11:30:18 -04:00
/usr/bin/vendor_perl/exiftool -all= -overwrite_original -tagsfromfile @ -Orientation "$i"
done
fi