I just found a few photos I’d like to use on the Internet and I wanted to remove all the EXIF information from it.
EXIF information contains the camera used and some of the settings and even where you made the photo on cameras with GPS.
I didn’t want to remove it from every single photo, so I made a script for it:
#This script deletes all EXIF information from any .JPG or .jpg photo in a folder. It is needed to install ImageMagick to use the mogrify command.
#NOTE: YOUR EXIF WILL BE LOST! DO A BACKUP IF YOU NEED IT!
# This program comes with absolutely no warranty, to the extent permitted by applicable law.
echo Now locating pictures and deleting EXIF information
find ./*/ -name '*.JPG' | xargs mogrify -strip
echo step 1 of 4 done...
find ./*/ -name '*.JPG~' | xargs rm
echo step 2 of 4...
find ./*/ -name '*.jpg' | xargs mogrify -strip
echo step 3 of 4...
find ./*/ -name '*.jpg~' | xargs rm
echo step 4 of 4...
#The above lines containing 'rm' remove the .JPG~ or .jpg~ files, which you get when you close the program before finishing. Just run it again to get rid of them.
echo 'We are done! You can now use your photos on the Internet! Press any key to continue.. :)'
read -n 1
This simple script needs the program ImageMagick installed to have the mogrify command available.
Use it at your own risk.