Cameras store information about the orientation of an image in the so-called exif. Many programs automatically rotate images when displaying them. However they do not store the image after the rotation which is necessary if you want to publish your pictures in a gallery. Under linux the tool jhead does this job for you.
The command jhead -autorot *.jpg
will rotate all files ending with .jpg in the current folder if necessary (i.e. if the exif-data indicate that you should rotate the image).
Again another useulf Linux-trick, thanks!
By the way, yesterday I used «your» qiv delete picture procedure to sort out the images in a folder: really nice! 🙂
Thanks for the tip! Exactly what I was looking for.
lustig, das internet. da such ich nach exif autorotate und lande auf deiner webseite. genau das hab ich gesucht…
gruss aus bern, david
Greeeez,
and thanks for that tip. Exactly what I was looking for: losless mass jpeg transformation.
Here is my command for recursive operation:
find . -type f -iregex «.*\.jpg$» -exec jhead -autorot «{}» \;
Regards from Austria,
Rainer
thanks the suggestion, anyway I suggest to use the «-ft» for set image timestamp to the exif date/time. regards from hungary… 🙂
Thanks! I added it in the context menu of Nautilus using nautilus-actions and it works great!
Thanks for the info. Note Image Magick allows the same trick with:
mogrify -auto-orient image.jpg
Dominik, thanks.
Believe that should be:
find . -type f -iregex ‹.*\.jpg$› -exec jhead -autorot ‹{}› \;
or
find . -type f -iregex ‹.*\.jpg$› -exec jhead -ft -autorot ‹{}› \;
Single quotes didn’t work for me