Get details of exif rotation information from -auto-orient (e.g. using :info)

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
hyanwong
Posts: 5
Joined: 2013-07-02T14:06:45-07:00
Authentication code: 6789

Get details of exif rotation information from -auto-orient (e.g. using :info)

Post by hyanwong »

Is there a list anywhere of the details output by the :info flag? I'm particularly interested in whether I can obtain details of what rotation (if any) ImageMagick does when converting an image with the -auto-orient option. Thanks
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Get details of exif rotation information from -auto-orient (e.g. using :info)

Post by fmw42 »

The rotation value should be in the -verbose info:, in the EXIF section. But it shows as a number which represents the orientation. You can google on that and find what that number represents and the code below the table shows the kind or reorientation (angle or flip or transpose, etc)

For example:

Code: Select all

identify -verbose P1050001.JPG
exif:Orientation: 1

see
http://sylvana.net/jpegcrop/exif_orientation.html

P.S. The orientation can be obtained using IM string formats. see http://www.imagemagick.org/script/escape.php

Code: Select all

convert P1050001.JPG -format "%[orientation]" info:
TopLeft

1 or TopLeft means no change was needed
hyanwong
Posts: 5
Joined: 2013-07-02T14:06:45-07:00
Authentication code: 6789

Re: Get details of exif rotation information from -auto-orient (e.g. using :info)

Post by hyanwong »

That's really useful. Thanks!
Post Reply