Query about angle of rotation for given input tiff file

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
priyankanagare

Query about angle of rotation for given input tiff file

Post by priyankanagare »

Hi,
I am using imageMagick version 6.5.2-Q16.
Please tell me the command string to determine angle of rotation in given input tiff file.
I want to find out whether image is straight or rotated by angle 90,180 or 270 degree.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Query about angle of rotation for given input tiff file

Post by anthony »

Usually this is in the EXIF profile of the image. It specifies the camera orientation.
It is the same for TIFF and JPEG

See Im examples Photo orientation
http://www.imagemagick.org/Usage/photos/#orient
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
priyankanagare

Re: Query about angle of rotation for given input tiff file

Post by priyankanagare »

Hi,
Thanks for your reply.
I tried that but its returning a blank.

I wrote following command :
identify -format '%[exif:orientation]' D:\testing\inverted_images\Data\000001.tif
but it returns ' '

I tried this command for both .tiff and .jpg images in both cases it return blank. :(
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Query about angle of rotation for given input tiff file

Post by anthony »

is it listed in the verbose output of identify?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
priyankanagare

Re: Query about angle of rotation for given input tiff file

Post by priyankanagare »

Hi,

Yes in case of .tiff it is listed in verbose as Orientation: TopLeft.
Still identify -format '%[exif:orientation]' D:\1.tif is returning blank ' '.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Query about angle of rotation for given input tiff file

Post by anthony »

Does a verbose listing even show EXIF profile information?

If not then the TIFF probably has the infor hidden in a photoshop specific profile, which IM does not understand.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply