{"bugs":{"url":"https://github.com/Hopding/png-ts/issues"},"dist":{"shasum":"d68dbe27d4f750fda28613914409347f037d201a","tarball":"https://registry.npmjs.org/png-ts/-/png-ts-0.0.1-rc4.tgz","fileCount":15,"integrity":"sha512-Nk9v3egUSxVfOA6+PzFj2nbRR5zUVwwtcXH0jILSYGWtkbfQbbxmJO7jP1K3mvDCQsWF9UwuTMeDjQ4RXGtVeg==","signatures":[{"sig":"MEUCIG/MR5QZKFdw1fqZUBKi5aw4tA/2WFPmODIzfrjfstknAiEAr8XYFzobczIu70qQjf2+J9tQpoOubXKndazsXSUFlTo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":328825,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcGAl3CRA9TVsSAnZWagAAGCQQAJ2WlQEX/f7N/i0YK+kB\nsN2BymfgOXelyI24c1TPflnKF/sxESBSDEVXTTQrQ1Tax43hmMvWApwjhSsZ\nsDUpa3HyFdFn97p90qo8771XcoqNQ2nj5ayXNTpoyuRgwrCGjk9y7nPAxANp\nCMVn+PyFGg4WR/uK5OEb+a9XGxDqRtMoUbKyRHtv7DVie83qravh2rKGNgs5\n/2atoW9WgLx82nu2SNBB+3x5GYfsrdxIyl34v72GcpGM1Zc0T+SCNXApuQg6\ngTXRwbNn9l1fgB0AF34hS55ubCXx/dBBjTJK/sbivGqe5fG/tIIl4L13Hci3\n3UUJ84OCrqrzgcIUycRDjCwB7cnQgR1lbF2K8SrviQmtLhRUHGTBt9YVaeJr\nmYoo3LbLwTv1Cgaemt9irJQDGCT1ad0mW3t33qAB575SBaIbTX04Qdift7pX\nlLfcYJPh4BuN4uuF2EvB7h/uwGInSO4uWV5A1dOeIFIMr2qzBQaUTBEh6LQP\nry+SRPqek5VzMTKvsIZGBSNbvYZi5VxbLelEU0LZXexVUwwZxH0bY7kOW5z6\nhGs+6duwpwXPgR/0ppZzrApPq3D8ZYc9mzNmqJ6S1BrJ+pHciqSiXCqsy6AZ\n/UmcPE9SfRBf3jkSSr8NQ5IMhlBiifIt81/SGqKam5Vdpyt1FGTSiSUjzleG\nqui5\r\n=iHxx\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/png.js","name":"png-ts","types":"lib/png.d.ts","unpkg":"dist/png-ts.min.js","author":{"name":"Andrew Dillon","email":"andrew.dillon.j@gmail.com"},"module":"es/index.js","readme":"**NOTE:** All credit for this code belongs to the developers of https://github.com/devongovett/png.js\n# Purpose of this Fork\nThis fork was created for use in https://github.com/Hopding/pdf-lib.\n\n**Update 6/10/2018:** The static `PNG.decode` and `PNG.load` methods have been removed from the `PNG` class in the `png-node.coffee` (and thus `png-node.js`) file. This allows all references to the `fs` module to be removed from those files. This was done to prevent packaging errors when using the module in a React Native app.\n\nThe original repository offered a `decode` method and a `decodePixels` method on `PNG` objects. Both of these methods were asynchronous (when using the package installed via `npm`), and they passed their results to a callback function. This was necessary because the original repository used Node's `zlib` module for decoding the PNG data, which is inherently asynchronous. However, this asynchronous behavior is not always desirable. For example, in the case of [`pdf-lib`](https://github.com/Hopding/pdf-lib) all aspects of the API are synchronous. So the PNG image embedding feature (which makes use of `png.js`) was forced to be asynchronous, and it stuck out like a sore thumb.\n\nThis fork preserves both the `decode` and `decodePixels` methods, but adds two new ones: `decodeSync` and `decodePixelsSync`. These methods work just like the original ones, except they behave in a synchronous fashion. This is made possible by using the [`pako`](https://github.com/nodeca/pako) library to decode PNG data instead of Node's `zlib` module.\n\n## Example of `PNG.decodePixelsSync`\n```javascript\nconst PNG = require('png-js');\nconst pngImg = new PNG(/* Buffer object containing PNG image */);\nconst pixels = pngImg.decodePixelsSync(); // pixels is a 1d array (in rgba order) of decoded pixel data\n```\n\n# png.js\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","license":"MIT","scripts":{"lint":"node Makefile.js lint","make":"node Makefile.js","typecheck":"tsc --noEmit","releaseNext":"node Makefile.js releaseNext","releaseLatest":"node Makefile.js releaseLatest"},"_npmUser":{"name":"hopding","email":"andrew.dillon.j@gmail.com"},"repository":{"url":"https://github.com/devongovett/png.js.git","type":"git"},"description":"A PNG decoder written in TypeScript","directories":{},"licenseText":"MIT License\n\nCopyright (c) 2017 Devon Govett\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","maintainers":[{"name":"hopding","email":"andrew.dillon.j@gmail.com"}],"contributors":[{"url":"http://badassjs.com/","name":"Devon Govett","email":"devongovett@gmail.com"}],"dependencies":{"pako":"^1.0.6"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rollup":"^0.68.0","tslint":"^5.11.0","shelljs":"^0.8.3","prettier":"^1.15.3","typescript":"^3.2.2","@types/pako":"^1.0.0","rollup-plugin-uglify":"^6.0.0","rollup-plugin-analyzer":"^2.1.0","rollup-plugin-commonjs":"^9.2.0","tslint-config-prettier":"^1.17.0","rollup-plugin-node-resolve":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/png-ts_0.0.1-rc4_1545079158425_0.7561725530252852","host":"s3://npm-registry-packages"},"_id":"png-ts@0.0.1-rc4","version":"0.0.1-rc4"}