{"name":"png-js","description":"A PNG decoder in CoffeeScript","version":"0.1.0","author":{"name":"Devon Govett","email":"devongovett@gmail.com","url":"http://badassjs.com/"},"repository":{"type":"git","url":"git://github.com/devongovett/png.js.git"},"bugs":{"name":"http://github.com/devongovett/png.js/issues"},"devDependencies":{"coffee-script":">=1.0.1"},"scripts":{"prepublish":"coffee -c png-node.coffee"},"main":"png-node.js","engine":["node >= v0.6.0"],"_npmUser":{"name":"devongovett","email":"devongovett@gmail.com"},"_id":"png-js@0.1.0","dependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.0-3","_nodeVersion":"v0.6.9","_defaultsLoaded":true,"dist":{"shasum":"f419b6986e0fea35ca05f0f461926870f9e37db6","tarball":"http://registry-npm.ywwl.com/png-js/download/png-js-0.1.0.tgz","integrity":"sha512-wNwtUkSipoEcfrUay0xKQAWA/LAmjuhcdkkU+hmxG/No3cjWJrXCCw48WiSwcthCD6glogNnxZdU/FkR71A3mw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDfaJeLMcpUBRA2Yzkv2qZWqcSz9PHvPtgOueRvxJqrNgIgWUhwZwT3M38yWCf6Ews8GD/fdsmBiGN7BMt8EIDgth0="}],"size":1895471,"noattachment":false,"key":"/png-js/-/png-js-0.1.0.tgz"},"maintainers":[{"name":"devongovett","email":"devongovett@gmail.com"}],"directories":{},"readme":"png.js\n======\nA PNG decoder in JS for the canvas element or Node.js.\n\n## Browser Usage\nSimply include png.js and zlib.js on your HTML page, create a canvas element, and call PNG.load to load an image.\n\n    <canvas></canvas>\n    <script src=\"zlib.js\"></script>\n    <script src=\"png.js\"></script>\n    <script>\n        var canvas = document.getElementsByTagName('canvas')[0];\n        PNG.load('some.png', canvas);\n    </script>\n    \nThe source code for the browser version resides in `png.js` and also supports loading and displaying animated PNGs.\n    \n## Node.js Usage\nInstall the module using npm\n\n    sudo npm install png-js\n    \nRequire the module and decode a PNG\n\n    var PNG = require('png-js');\n    PNG.decode('some.png', function(pixels) {\n        // pixels is a 1d array (in rgba order) of decoded pixel data\n    });\n    \nYou can also call `PNG.load` if you want to load the PNG (but not decode the pixels) synchronously.  If you already\nhave the PNG data in a buffer, simply use `new PNG(buffer)`.  In both of these cases, you need to call `png.decode`\nyourself which passes your callback the decoded pixels as a buffer.  If you already have a buffer you want the pixels\ncopied to, call `copyToImageData` with your buffer and the decoded pixels as returned from `decodePixels`.\n","publish_time":1333773765730,"_cnpm_publish_time":1333773765730,"dist-tags":{"latest":"2.0.0"}}