That does not work. Why?
find . -iname "*.jpg" -print0 | xargs -0 exiftool -Orientation=1 -n "$@"
This works with one Picture or Folder, but not recursiv.
exiftool -Orientation=1 -n "$@" *.jpg
Try this:
exiftool -n -orientation=1 -r -ext jpg "$@"
- Phil
Some pictures do not rotate automatically. Does this work with every picture? or how can I recognize that whether the picture can be rotated?
Whether or not the picture is rotated depends on
1. the initial orientation of the image
2. the software you are using and whether or not it honors the Orientation tag
- Phil
Quote from: dima on February 03, 2020, 01:56:02 PM
Some pictures do not rotate automatically. Does this work with every picture? or how can I recognize that whether the picture can be rotated?
Is this the problem:
-orientation does not rotate a photograph, it sets a flag that software can recognise to display the photo in a certain orientation. -orientation=1 will inform the software that the photo is landscape and the right way up.
1 = Horizontal (normal)
2 = Mirror horizontal
3 = Rotate 180
4 = Mirror vertical
5 = Mirror horizontal and rotate 270 CW
6 = Rotate 90 CW
7 = Mirror horizontal and rotate 90 CW
8 = Rotate 270 CW
Edit: if a photo has been physically rotated to be in portrait mode, you would also want -orientation=1.
OK, thank you for your efforts.
but why does that only work if I'm in the folder.
e.g.
cd /Moments/2004/2004-01-01
find . -iname "*.jpg" -print0 | xargs -0 exiftool -Orientation=1 -n "$@"
This is ok, but when i go to:
cd /Moments/2004/
and here
find . -iname "*.jpg" -print0 | xargs -0 exiftool -Orientation=1 -n "$@"
That does not work. Why?
You shouldn't include "$@" on the xargs command-line; xargs takes care of the arguments itself. Other than that it should work (as long as find . -iname "*.jpg" indeed lists all files you are interested in).
Thanks, that was the Solution :)