#!/bin/sh test -f orientation.txt || { for f in IMG_*.JPG do ( echo -n "$f "; identify -verbose $f | grep -i orientation ) >>orientation.txt done } # identify -verbose IMG_5337.JPG # exif:Orientation: 1 # TopLeft = default, ok as is # RightTop, LeftBottom = should rotate test -d orig || mkdir orig for f in $( egrep LeftBottom\|RightTop orientation.txt | cut -d' ' -f1 ) do mv $f orig/${f%.JPG}.orig.JPG convert -auto-orient orig/${f%.JPG}.orig.JPG $f done # joostvb@hille:~/me...0110306-walk-Vuc_Karazic% convert -auto-orient IMG_5306.JPG IMG_5306.rot.JPG #NIET convert -auto-orient IMG_*.JPG ; want convert opties input.jpg output.jpg #jigl --link-original