possible bug -auto-orient IM 6.8.8.4 Q16 Mac OSX

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

possible bug -auto-orient IM 6.8.8.4 Q16 Mac OSX

Post by fmw42 »

I have the following image that contains exif:Orientation: 8 However, my attempts to use -auto-orient all fail on this an other similar images. The exif data is changed to orientation:1 but the image is not rotated.

http://www.fmwconcepts.com/misc_tests/a ... 100152.JPG

The command I have tried is

Code: Select all

convert SH100152.JPG -auto-orient tmp.jpg
Do I misunderstand -auto-orient or does this file have its exif data improperly represented in some way.

Can someone else verify?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: possible bug -auto-orient IM 6.8.8.4 Q16 Mac OSX

Post by magick »

Your image has a left-bottom orientation. Try gimp. When it asks you to automatically rotate it returns the same image orientation as ImageMagick suggesting ImageMagick is likely working properly.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: possible bug -auto-orient IM 6.8.8.4 Q16 Mac OSX

Post by fmw42 »

GIMP does what you say. But when it says it has the correct orientation, it has already been properly rotated to portrait mode and when I save the file, other viewers present it correctly in portrait mode.

IM displays it correctly, but when saved, it still views improperly in landscape mode with left side down by many viewers.

If I view the image with IM display or GIMP, it seems to be rotated to the correct (portrait) orientation because I assume they read the EXIF orientation and correct for viewing. But several other viewers (Preview, GraphicConverter, Photoshop) show the image left side down (landscape). I assume they are ignoring the EXIF orientation.

I thought the whole point of -auto-orient was to rotated the image (data) appropriately and then set the EXIF orientation to 1 (so that it would have the correct portrait orientation). Am I misunderstanding what -auto-orient is suppose to do.
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

Re: possible bug -auto-orient IM 6.8.8.4 Q16 Mac OSX

Post by glennrp »

fmw42 wrote:Can someone else verify?
Yes, I observe the same behavior with 6.8.8-4 on Ubuntu 13:10. Also, neither the latest Firefox nor Chrome rotates the image.
Last edited by glennrp on 2014-02-08T18:13:10-07:00, edited 1 time in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: possible bug -auto-orient IM 6.8.8.4 Q16 Mac OSX

Post by fmw42 »

thanks glenn
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: possible bug -auto-orient IM 6.8.8.4 Q16 Mac OSX

Post by magick »

  • -> convert SH100152.JPG -auto-orient test.jpg

    -> identify -verbose SH100152.JPG | grep -i orient
    Orientation: LeftBottom
    exif:Orientation: 8

    -> identify -verbose test.jpg | grep -i orient
    Orientation: TopLeft
    exif:Orientation: 1
Do you want the orientation to remain @ LeftBottom after its oriented? Here we rotate the image and update the EXIF orientation to TopLeft.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: possible bug -auto-orient IM 6.8.8.4 Q16 Mac OSX

Post by fmw42 »

Yes the result shows the correct EXIF data, but the image is not rotated. Should one not be able to do -strip afterwards and still see the image properly in portrait mode in any viewer, even GIMP?
Post Reply