Batch lossless rotate JPEG in OSX

3

1

I want to losslessly rotate all JPEGs that have been shot in portrait mode and remove the rotate flag, so iPhoto doesn't stops rotating them. Any easy way to do that?

ibz

Posted 2010-10-14T19:55:45.547

Reputation: 459

Answers

3

Found it:

jhead -autorot <filename> does it. To rotate all the files in a directory, just do jhead -autorot *.

You must have both jhead and jpegtran installed. jhead can be found here (OSX binary available). jpegtran can be found here (download the source and compile it using ./configure && sudo make all install).

ibz

Posted 2010-10-14T19:55:45.547

Reputation: 459

To clarify, running jhead -autorot * will rotate only the files in portrait mode (which is usually what is needed). – laurent – 2014-05-07T01:01:48.223

2

You can also use exiftran installed though homebrew, which by default will rotate the image and then remove the exif rotation data (set it to 1).

brew install exiftran
exiftran -ai *.jpg

Whatcould

Posted 2010-10-14T19:55:45.547

Reputation: 121