{"action":"closed","issue":{"url":"https://api.github.com/repos/tsayen/dom-to-image/issues/46","repository_url":"https://api.github.com/repos/tsayen/dom-to-image","labels_url":"https://api.github.com/repos/tsayen/dom-to-image/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/tsayen/dom-to-image/issues/46/comments","events_url":"https://api.github.com/repos/tsayen/dom-to-image/issues/46/events","html_url":"https://github.com/tsayen/dom-to-image/issues/46","id":164287910,"number":46,"title":"Use in nodejs","user":{"login":"swampthang","id":428757,"avatar_url":"https://avatars.githubusercontent.com/u/428757?v=3","gravatar_id":"","url":"https://api.github.com/users/swampthang","html_url":"https://github.com/swampthang","followers_url":"https://api.github.com/users/swampthang/followers","following_url":"https://api.github.com/users/swampthang/following{/other_user}","gists_url":"https://api.github.com/users/swampthang/gists{/gist_id}","starred_url":"https://api.github.com/users/swampthang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swampthang/subscriptions","organizations_url":"https://api.github.com/users/swampthang/orgs","repos_url":"https://api.github.com/users/swampthang/repos","events_url":"https://api.github.com/users/swampthang/events{/privacy}","received_events_url":"https://api.github.com/users/swampthang/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tsayen/dom-to-image/labels/invalid","name":"invalid","color":"e6e6e6"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-07T11:29:29Z","updated_at":"2016-08-25T14:02:48Z","closed_at":"2016-08-25T14:02:48Z","body":"Thanks so much for the awesome code! I'm building an Electron app - electron.atom.io - and need to create a series of png images of a specific div's contents, saving each frame of animation. I'm using the following script:\r\n```\r\n// domtoimg test\r\nvar stageContainer = document.getElementById('stage-container');\r\ndomtoimage.toPng(stageContainer)\r\n.then(function (dataUrl) {\r\n    fs.writeFileSync('./tmp/pngs/img'+padded+'.png', dataUrl);\r\n})\r\n.catch(function (error) {\r\n    console.error('oops, something went wrong!', error);\r\n});\r\n```\r\nFiles are saving but I am getting files that are unreadable as PNGs. They're coming out like this..\r\n\r\n![newimg0001](https://cloud.githubusercontent.com/assets/428757/16651815/132a7650-440c-11e6-806d-e70fefba8f4c.png)\r\n\r\nIs this something I'm doing or a bug?"}}
{"actor":{"display_login":"tsayen"}}