{"issue":{"state":"open","pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"user":{"avatar_url":"https://secure.gravatar.com/avatar/c52501e384405cbf12dc477a5c95e6f3?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"c52501e384405cbf12dc477a5c95e6f3","url":"https://api.github.com/users/brianshumate","login":"brianshumate","id":77563},"milestone":null,"updated_at":"2011-11-10T17:41:35Z","assignee":null,"labels":[],"closed_at":null,"comments":4,"url":"https://api.github.com/repos/diaspora/diaspora/issues/2322","body":"I uploaded an image which I can verify is already in the proper orientation.\r\n\r\nIt has the following characteristics:\r\n\r\n* JPEG\r\n* ~1.4MB\r\n* 1536px wide by 2048px high\r\n\r\nAs you can see, it is a very tall and narrow image, but this was essentially taken directly from an iPhone 3GS in \"portrait\" mode or the usual mode one would hold the phone in when photographing.\r\n\r\nThe issue arrises whenever I upload this image to my pod; Diaspora shows the image as rotated 90 degrees counter-clockwise, which is both unexpected and undesirable behavior.\r\n\r\nIt was only when I manually resized the image in an image editor to be 600px wide by 800px high (arbitrarily smaller dimension I chose) that the uploaded image maintained proper orientation in Diaspora.\r\n","html_url":"https://github.com/diaspora/diaspora/issues/2322","title":"Images unexpectedly/unnecessarily rotated","number":2322,"id":2151755,"created_at":"2011-11-05T12:48:33Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/2ff45dcc3874524bc53094d03fbb1f2c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"2ff45dcc3874524bc53094d03fbb1f2c","url":"https://api.github.com/users/pixelistik","login":"pixelistik","id":170929},"updated_at":"2011-11-10T17:41:35Z","url":"https://api.github.com/repos/diaspora/diaspora/issues/comments/2698417","body":"I gave this a little test. The result is: D* does not observe the EXIF metadata rotation information, that is used by cameras to indicate that the camera was held in landscape orientation, stating the image must be rotated at display.\r\n\r\n### This was my test:\r\n\r\n* Create a jpg image file `test.jpg`, 640x480, using GIMP, containing some drawn markers \"top\", \"bottom\" etc.\r\n* Make a copy of the file, called `test-180.jpg`\r\n* Run `exiftool -Orientation=8 test-180.jpg` on the copy. This will just change the metadata, stating that the image must be rotated 180° before display\r\n* Test what image tools do with this information:\r\n  * The evince file viewer displays the `test-180.jpg` upside down, as expected.\r\n  * GIMP asks if it should rotate `test-180.jpg` upon opening it, as expected.\r\n* On D*, click the image upload button and upload both files to a new post.\r\n* Submit the post\r\n\r\n### Result\r\n\r\n**Both** images are displayed unrotated, thumbnails and bigger size. This indicates that the pod did not rotate `test-180.jpg` as the EXIF metadata requested.\r\n\r\n### Expected\r\n\r\nD* should apply the rotation as stated when creating thumbnails and other sizes, then remove the metadata setting.\r\n\r\nI don't know anything about the code that is handling this, but at least at the command line, ImageMagick needs an [--auto-orient](http://www.imagemagick.org/script/command-line-options.php?ImageMagick=3uub7urak614ivs9fd5o75h6i5#auto-orient) switch to do this.","id":2698417,"created_at":"2011-11-10T17:41:35Z"}}