{"action":"created","issue":{"url":"https://api.github.com/repos/ericmandel/js9/issues/18","repository_url":"https://api.github.com/repos/ericmandel/js9","labels_url":"https://api.github.com/repos/ericmandel/js9/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/ericmandel/js9/issues/18/comments","events_url":"https://api.github.com/repos/ericmandel/js9/issues/18/events","html_url":"https://github.com/ericmandel/js9/issues/18","id":146572070,"number":18,"title":"TypeError: Argument 1 of CanvasRenderingContext2D.createImageData is not a finite floating-point value.","user":{"login":"briehanlombaard","id":375716,"avatar_url":"https://avatars.githubusercontent.com/u/375716?v=3","gravatar_id":"","url":"https://api.github.com/users/briehanlombaard","html_url":"https://github.com/briehanlombaard","followers_url":"https://api.github.com/users/briehanlombaard/followers","following_url":"https://api.github.com/users/briehanlombaard/following{/other_user}","gists_url":"https://api.github.com/users/briehanlombaard/gists{/gist_id}","starred_url":"https://api.github.com/users/briehanlombaard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/briehanlombaard/subscriptions","organizations_url":"https://api.github.com/users/briehanlombaard/orgs","repos_url":"https://api.github.com/users/briehanlombaard/repos","events_url":"https://api.github.com/users/briehanlombaard/events{/privacy}","received_events_url":"https://api.github.com/users/briehanlombaard/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-04-07T10:17:10Z","updated_at":"2016-04-14T07:04:56Z","closed_at":"2016-04-14T07:04:56Z","body":"Hi Eric,\r\n\r\nI've upgraded from v1.5 to v1.8 and get this error when using either `JS9.Preload` or `JS9.Load` to load an initial image into JS9. This only happens when loading a PNG.\r\n\r\nThe error is in the `createImageData` call below:\r\n\r\n```\r\n    // create an RGB image if necessary\r\n    if( !rgb.img                         ||    \r\n        (rgb.img.width  !== sect.width)  ||\r\n        (rgb.img.height !== sect.height) ){\r\n        rgb.img = ctx.createImageData(sect.width, sect.height);\r\n    }\r\n```\r\n\r\nAnd the `sect` object looks like this:\r\n\r\n`Object { zoom: 1, ozoom: 1, xcen: NaN, ycen: NaN, width: NaN, height: NaN, x0: NaN, y0: NaN, x1: NaN, y1: NaN }`\r\n\r\nAny idea if I'm doing something wrong here?"},"comment":{"url":"https://api.github.com/repos/ericmandel/js9/issues/comments/209790833","html_url":"https://github.com/ericmandel/js9/issues/18#issuecomment-209790833","issue_url":"https://api.github.com/repos/ericmandel/js9/issues/18","id":209790833,"user":{"login":"briehanlombaard","id":375716,"avatar_url":"https://avatars.githubusercontent.com/u/375716?v=3","gravatar_id":"","url":"https://api.github.com/users/briehanlombaard","html_url":"https://github.com/briehanlombaard","followers_url":"https://api.github.com/users/briehanlombaard/followers","following_url":"https://api.github.com/users/briehanlombaard/following{/other_user}","gists_url":"https://api.github.com/users/briehanlombaard/gists{/gist_id}","starred_url":"https://api.github.com/users/briehanlombaard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/briehanlombaard/subscriptions","organizations_url":"https://api.github.com/users/briehanlombaard/orgs","repos_url":"https://api.github.com/users/briehanlombaard/repos","events_url":"https://api.github.com/users/briehanlombaard/events{/privacy}","received_events_url":"https://api.github.com/users/briehanlombaard/received_events","type":"User","site_admin":false},"created_at":"2016-04-14T07:04:56Z","updated_at":"2016-04-14T07:04:56Z","body":"Thanks Eric. That fixed it."}}