{"name":"png-js","description":"A PNG decoder in JavaScript","version":"2.0.0","type":"module","main":"./lib/png-js.cjs","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"}},"author":{"name":"Devon Govett","email":"devongovett@gmail.com","url":"http://badassjs.com/"},"repository":{"type":"git","url":"git+https://github.com/devongovett/png.js.git"},"bugs":{"url":"http://github.com/devongovett/png.js/issues"},"dependencies":{"fflate":"^0.8.2"},"devDependencies":{"@rollup/plugin-replace":"5.0.0","jest":"24.1.0","prettier":"1.16.4","rimraf":"2.6.3","rollup":"4.9.0","rollup-plugin-ignore":"1.0.10"},"scripts":{"test":"yarn build && jest","build":"rimraf ./lib && rollup -c","prettier":"prettier test/**/*.js png-node.js png.js --write"},"engine":["node >= v0.6.0"],"jest":{"setupFiles":["<rootDir>/test/patch-canvas.js","<rootDir>/zlib.js","<rootDir>/png.js"]},"_id":"png-js@2.0.0","gitHead":"ce0b0138a95b1dd6557f518c7a8dea2ff4fa3694","homepage":"https://github.com/devongovett/png.js#readme","_nodeVersion":"22.15.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-GdzJuUMc6ZSpxFJWVxtOH1bzYHym+TOnveqUjb+VJIbZWbZzyiRGFiKhbiielfpYbgMlhHVhsJ0FTazfuRFkMA==","shasum":"7bc521aea1d47f5e3bf42eeecdd77095cba98d5f","tarball":"http://registry-npm.ywwl.com/png-js/download/png-js-2.0.0.tgz","fileCount":8,"unpackedSize":65921,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEFUfEwndJ+TonCP1LcX3pfy177hRppwvIXam5y1JVqZAiEA3E3zTD6440Z8tOFeeDU08hrK+MXFHM2bqMu6a/QyZN4="}],"size":8079,"noattachment":false,"key":"/png-js/-/png-js-2.0.0.tgz"},"_npmUser":{"name":"diegomura","email":"diegomuracciole@gmail.com"},"directories":{},"maintainers":[{"name":"devongovett","email":"devongovett@gmail.com"},{"name":"diegomura","email":"diegomuracciole@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/png-js_2.0.0_1776209903799_0.9733123096370431"},"_hasShrinkwrap":false,"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":1776209903950,"_cnpm_publish_time":1776209903950,"dist-tags":{"latest":"2.0.0"}}