Code: Select all
jpegtran -copy all -rotate 90 -optimize SomePhoto.JPG > rotated/SomePhoto.JPG
Code: Select all
jpegtran -copy all -rotate 270 -optimize SomePhoto.JPG > rotated/SomePhoto.JPG
1) In loop take every single file in current directory and pass it to jpegtran with above switches (switches can be "hardcoded" in script for simplicity).
2) Change filestamp of newly created rotated JPEG file according to original file. This step 2 is not necessary, but I would greatly appreciate it.
Thank you very much in advance for your help.