{"name":"png-js","version":"1.1.0","author":{"url":"http://badassjs.com/","name":"Devon Govett","email":"devongovett@gmail.com"},"_id":"png-js@1.1.0","maintainers":[{"name":"devongovett","email":"devongovett@gmail.com"},{"name":"diegomura","email":"diegomuracciole@gmail.com"}],"homepage":"https://github.com/devongovett/png.js#readme","bugs":{"url":"http://github.com/devongovett/png.js/issues"},"dist":{"shasum":"60a135216601f807b88a6d61ac93bd42a32c5ee1","tarball":"http://registry-npm.ywwl.com/png-js/download/png-js-1.1.0.tgz","fileCount":8,"integrity":"sha512-PM/uYGzGdNSzqeOgly68+6wKQDL1SY0a/N+OEa/+br6LnHWOAJB0Npiamnodfq3jd2LS/i2fMeOKSAILjA+m5Q==","signatures":[{"sig":"MEQCIANT2fOdk+un+4DrfNZS/UIPFCqV6vr28RriePK4NJydAiB7T4rdLaXIDz/SYpm8NX3snV3W2lCds/p94RKz5Gcz8Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":66069,"size":8118,"noattachment":false,"key":"/png-js/-/png-js-1.1.0.tgz"},"jest":{"setupFiles":["<rootDir>/test/patch-canvas.js","<rootDir>/zlib.js","<rootDir>/png.js"]},"main":"./lib/png-js.cjs","type":"module","engine":["node >= v0.6.0"],"module":"./lib/png-js.js","browser":{"./lib/png-js.js":"./lib/png-js.browser.js","./lib/png-js.cjs":"./lib/png-js.browser.cjs"},"exports":{".":{"node":{"import":"./lib/png-js.js","require":"./lib/png-js.cjs"},"import":"./lib/png-js.browser.js","require":"./lib/png-js.browser.cjs"}},"gitHead":"fe53c2d25545e941a6f706cba30ed13c0991d1a1","scripts":{"test":"yarn build && jest","build":"rimraf ./lib && rollup -c","prettier":"prettier test/**/*.js png-node.js png.js --write"},"_npmUser":{"name":"diegomura","email":"diegomuracciole@gmail.com"},"repository":{"url":"git+https://github.com/devongovett/png.js.git","type":"git"},"_npmVersion":"10.7.0","description":"A PNG decoder in JavaScript","directories":{},"_nodeVersion":"18.20.4","dependencies":{"browserify-zlib":"^0.2.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"24.1.0","rimraf":"2.6.3","rollup":"4.9.0","prettier":"1.16.4","@rollup/plugin-alias":"5.1.0","rollup-plugin-ignore":"1.0.10","@rollup/plugin-replace":"5.0.0","@rollup/plugin-node-resolve":"15.2.0"},"_npmOperationalInternal":{"tmp":"tmp/png-js_1.1.0_1776193470506_0.3279486847494415","host":"s3://npm-registry-packages-npm-production"},"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":1776193470672,"_cnpm_publish_time":1776193470672,"dist-tags":{"latest":"2.0.0"}}