Remove exif but store image rotation data

Iš Žinynas.
Jump to navigation Jump to search
brew install jhead exiftool
./script <dir>
#!/bin/sh

find "$@" -type f \( -iname \*.jpg -o -iname \*.png -o -iname \*.jpeg \) -exec jhead -autorot {} \;
exiftool -r -all= -ext jpg -ext gif -ext png -ext jpeg -ext jpg_original "$@"