{"action":"created","issue":{"url":"https://api.github.com/repos/blueimp/JavaScript-Load-Image/issues/65","labels_url":"https://api.github.com/repos/blueimp/JavaScript-Load-Image/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/blueimp/JavaScript-Load-Image/issues/65/comments","events_url":"https://api.github.com/repos/blueimp/JavaScript-Load-Image/issues/65/events","html_url":"https://github.com/blueimp/JavaScript-Load-Image/pull/65","id":49946759,"number":65,"title":"Add note about providing a value to the orientation option.","user":{"login":"nateroling","id":18673,"avatar_url":"https://avatars.githubusercontent.com/u/18673?v=3","gravatar_id":"","url":"https://api.github.com/users/nateroling","html_url":"https://github.com/nateroling","followers_url":"https://api.github.com/users/nateroling/followers","following_url":"https://api.github.com/users/nateroling/following{/other_user}","gists_url":"https://api.github.com/users/nateroling/gists{/gist_id}","starred_url":"https://api.github.com/users/nateroling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nateroling/subscriptions","organizations_url":"https://api.github.com/users/nateroling/orgs","repos_url":"https://api.github.com/users/nateroling/repos","events_url":"https://api.github.com/users/nateroling/events{/privacy}","received_events_url":"https://api.github.com/users/nateroling/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-11-24T21:46:17Z","updated_at":"2015-03-11T16:47:03Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/blueimp/JavaScript-Load-Image/pulls/65","html_url":"https://github.com/blueimp/JavaScript-Load-Image/pull/65","diff_url":"https://github.com/blueimp/JavaScript-Load-Image/pull/65.diff","patch_url":"https://github.com/blueimp/JavaScript-Load-Image/pull/65.patch"},"body":"Just spent an hour debugging, trying to figure out why setting orientation: true in the options didn't do anything.\r\n\r\nTurns out you have to provide an EXIF orientation value.\r\n\r\nMaking orientation: true work would be ideal, but for now a note in the documentation would be very helpful!"},"comment":{"url":"https://api.github.com/repos/blueimp/JavaScript-Load-Image/issues/comments/78303586","html_url":"https://github.com/blueimp/JavaScript-Load-Image/pull/65#issuecomment-78303586","issue_url":"https://api.github.com/repos/blueimp/JavaScript-Load-Image/issues/65","id":78303586,"user":{"login":"hppycoder","id":541976,"avatar_url":"https://avatars.githubusercontent.com/u/541976?v=3","gravatar_id":"","url":"https://api.github.com/users/hppycoder","html_url":"https://github.com/hppycoder","followers_url":"https://api.github.com/users/hppycoder/followers","following_url":"https://api.github.com/users/hppycoder/following{/other_user}","gists_url":"https://api.github.com/users/hppycoder/gists{/gist_id}","starred_url":"https://api.github.com/users/hppycoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hppycoder/subscriptions","organizations_url":"https://api.github.com/users/hppycoder/orgs","repos_url":"https://api.github.com/users/hppycoder/repos","events_url":"https://api.github.com/users/hppycoder/events{/privacy}","received_events_url":"https://api.github.com/users/hppycoder/received_events","type":"User","site_admin":false},"created_at":"2015-03-11T16:47:03Z","updated_at":"2015-03-11T16:47:03Z","body":"Here's what I am doing to change the orientation:\r\n\r\n```javascript\r\nvar file = evt.target.files[0];\r\n\r\n            loadImage.parseMetaData(\r\n              file,\r\n              function(data) {\r\n                var orientation = 0;\r\n                if(typeof(data.exif) !== 'undefined') {\r\n                  orientation = parseInt(data.exif.get('Orientation'));\r\n                }\r\n\r\n                loadImage(\r\n                  file,\r\n                  function(canvas) {\r\n                    var randomNumber = Math.random();\r\n                    canvas.id = 'canvas-'+randomNumber;\r\n                    canvas.style.display = 'none';\r\n                    angular.element('body').append(canvas);\r\n\r\n                    var source = document.getElementById('canvas-'+randomNumber);\r\n                    console.log(source.toDataURL('image/jpeg'));\r\n                    source.remove();\r\n                  },\r\n                  {\r\n                    maxWidth: 1500,\r\n                    orientation: orientation,\r\n                    canvas: true\r\n                  }\r\n                );\r\n              }\r\n            );\r\n```"}}