{"action":"created","issue":{"url":"https://api.github.com/repos/NYTimes/svg-crowbar/issues/19","labels_url":"https://api.github.com/repos/NYTimes/svg-crowbar/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/NYTimes/svg-crowbar/issues/19/comments","events_url":"https://api.github.com/repos/NYTimes/svg-crowbar/issues/19/events","html_url":"https://github.com/NYTimes/svg-crowbar/issues/19","id":87019008,"number":19,"title":"repurpose for use beyond a bookmarklet","user":{"login":"deanmalmgren","id":255672,"avatar_url":"https://avatars.githubusercontent.com/u/255672?v=3","gravatar_id":"","url":"https://api.github.com/users/deanmalmgren","html_url":"https://github.com/deanmalmgren","followers_url":"https://api.github.com/users/deanmalmgren/followers","following_url":"https://api.github.com/users/deanmalmgren/following{/other_user}","gists_url":"https://api.github.com/users/deanmalmgren/gists{/gist_id}","starred_url":"https://api.github.com/users/deanmalmgren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deanmalmgren/subscriptions","organizations_url":"https://api.github.com/users/deanmalmgren/orgs","repos_url":"https://api.github.com/users/deanmalmgren/repos","events_url":"https://api.github.com/users/deanmalmgren/events{/privacy}","received_events_url":"https://api.github.com/users/deanmalmgren/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-10T16:02:12Z","updated_at":"2015-12-03T05:34:22Z","closed_at":null,"body":"Thanks for putting this together @shancarter et al!\r\n\r\nI recently had a project where I wanted to have a button that downloaded an svg image as a png and, when combined with a few things from [this blog post](http://willkoehler.net/2014/11/07/client-side-solution-for-downloading-highcharts-charts-as-images.html), I made it possible to download an svg with the click of a button (highlighted below):\r\n\r\n<img src=\"https://cloud.githubusercontent.com/assets/255672/8086979/f6e740ce-0f5d-11e5-9fd8-61643c67f9d4.png\" width=\"300\" alt=\"screenshot\"/>\r\n\r\nI was thinking of contributing this back to the project so that others could easily download svg elements as a png with an interface that looks something like this:\r\n\r\n```html\r\n<!-- index.html -->\r\n<script src=\"//cdn.rawgit.com/NYTimes/svg-crowbar/gh-pages/svg-crowbar-download.js\"></script>\r\n<script>\r\n    var svg_el = document.getElementById(\"#my-svg\");\r\n    $(\"#my-button\").click(function () {\r\n        crowbar(svg_el, { // optional arguments\r\n            filename: \"awesome.png\",\r\n            width: 400,\r\n            height: 400,\r\n        });\r\n    });\r\n</script>\r\n```\r\n\r\nI would be happy to put together a pull request but, before I did, I thought I'd try and see if this is inline with the goals of this project or whether it would be better to just start a separate project that enables this functionality. Would you like this functionality to be baked into svg-crowbar or is your focus specifically on the bookmarklet?\r\n"},"comment":{"url":"https://api.github.com/repos/NYTimes/svg-crowbar/issues/comments/161521957","html_url":"https://github.com/NYTimes/svg-crowbar/issues/19#issuecomment-161521957","issue_url":"https://api.github.com/repos/NYTimes/svg-crowbar/issues/19","id":161521957,"user":{"login":"deanmalmgren","id":255672,"avatar_url":"https://avatars.githubusercontent.com/u/255672?v=3","gravatar_id":"","url":"https://api.github.com/users/deanmalmgren","html_url":"https://github.com/deanmalmgren","followers_url":"https://api.github.com/users/deanmalmgren/followers","following_url":"https://api.github.com/users/deanmalmgren/following{/other_user}","gists_url":"https://api.github.com/users/deanmalmgren/gists{/gist_id}","starred_url":"https://api.github.com/users/deanmalmgren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deanmalmgren/subscriptions","organizations_url":"https://api.github.com/users/deanmalmgren/orgs","repos_url":"https://api.github.com/users/deanmalmgren/repos","events_url":"https://api.github.com/users/deanmalmgren/events{/privacy}","received_events_url":"https://api.github.com/users/deanmalmgren/received_events","type":"User","site_admin":false},"created_at":"2015-12-03T05:34:22Z","updated_at":"2015-12-03T05:34:22Z","body":"Nice! I'll open up an issue on your project to incorporate png support. Maybe that's the best path forward for this..."}}