You can add the -auto-orient
option to convert
to rotate the images automatically.
If you just need to get the orientation, you have to use a format specifier on identify
, e.g.:
identify -format '%[exif:orientation]' image_file.jpg
For more details, see the section on Digital Photo Orientation in the ImageMagick documentation.