{"action":"created","issue":{"url":"https://api.github.com/repos/Huddle/Resemble.js/issues/50","labels_url":"https://api.github.com/repos/Huddle/Resemble.js/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/Huddle/Resemble.js/issues/50/comments","events_url":"https://api.github.com/repos/Huddle/Resemble.js/issues/50/events","html_url":"https://github.com/Huddle/Resemble.js/pull/50","id":112322477,"number":50,"title":"Fix unloaded image issues, mostly in IE and Safari","user":{"login":"benwick","id":2118579,"avatar_url":"https://avatars.githubusercontent.com/u/2118579?v=3","gravatar_id":"","url":"https://api.github.com/users/benwick","html_url":"https://github.com/benwick","followers_url":"https://api.github.com/users/benwick/followers","following_url":"https://api.github.com/users/benwick/following{/other_user}","gists_url":"https://api.github.com/users/benwick/gists{/gist_id}","starred_url":"https://api.github.com/users/benwick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benwick/subscriptions","organizations_url":"https://api.github.com/users/benwick/orgs","repos_url":"https://api.github.com/users/benwick/repos","events_url":"https://api.github.com/users/benwick/events{/privacy}","received_events_url":"https://api.github.com/users/benwick/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-20T09:21:06Z","updated_at":"2015-11-03T09:58:39Z","closed_at":"2015-11-03T09:58:32Z","pull_request":{"url":"https://api.github.com/repos/Huddle/Resemble.js/pulls/50","html_url":"https://github.com/Huddle/Resemble.js/pull/50","diff_url":"https://github.com/Huddle/Resemble.js/pull/50.diff","patch_url":"https://github.com/Huddle/Resemble.js/pull/50.patch"},"body":"Every now and then, the hiddenImage.onload function will fail, because the width and height of the hiddenImage are zero. The IE will throw an IndexSizeError in line 161, when it tries to get the image data. Safari fails silently. The reason for this is, that only the complete property is evaluated to consider the manual firing of the onload callback. But it can happen sometimes, that the complete property is true, but width and height are not calculated yet. So I added an extra test for the naturalWidth of the image. See also here: http://stackoverflow.com/questions/1977871/check-if-an-image-is-loaded-no-errors-in-javascript#answer-1977898"},"comment":{"url":"https://api.github.com/repos/Huddle/Resemble.js/issues/comments/153302921","html_url":"https://github.com/Huddle/Resemble.js/pull/50#issuecomment-153302921","issue_url":"https://api.github.com/repos/Huddle/Resemble.js/issues/50","id":153302921,"user":{"login":"jamescryer","id":366068,"avatar_url":"https://avatars.githubusercontent.com/u/366068?v=3","gravatar_id":"","url":"https://api.github.com/users/jamescryer","html_url":"https://github.com/jamescryer","followers_url":"https://api.github.com/users/jamescryer/followers","following_url":"https://api.github.com/users/jamescryer/following{/other_user}","gists_url":"https://api.github.com/users/jamescryer/gists{/gist_id}","starred_url":"https://api.github.com/users/jamescryer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamescryer/subscriptions","organizations_url":"https://api.github.com/users/jamescryer/orgs","repos_url":"https://api.github.com/users/jamescryer/repos","events_url":"https://api.github.com/users/jamescryer/events{/privacy}","received_events_url":"https://api.github.com/users/jamescryer/received_events","type":"User","site_admin":false},"created_at":"2015-11-03T09:58:39Z","updated_at":"2015-11-03T09:58:39Z","body":"Thanks"}}