{"bugs":{"url":"https://github.com/Hopding/png-ts/issues"},"dist":{"shasum":"d1a9d23ea5c5fe74979f0f957fd6274ee93714f5","tarball":"https://registry.npmjs.org/png-ts/-/png-ts-0.0.1.tgz","fileCount":15,"integrity":"sha512-t8SCgNSUkqdNgh1fyaqslHWdaCvG4yQ9dMDzdDcDTrH2W8mfJqOmPwi9Mp3M043xrtSEQFyrmabZmk/ioY4/nA==","signatures":[{"sig":"MEUCIH1N70ufZguhEdnZvKbwc+8FfYBfl2Zm4UUghCP2kRJlAiEAh3wi4j180lFJN3JrlIriGDTkHTQIg12uOc2ZLffr8sc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":326648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcGCvwCRA9TVsSAnZWagAA6CsP/2jfdlkSaHMR7nZPO2La\nvggzgfE+1u9hLIqK5XV+LVnpFyUxqieD5TVaaauWiPH7rGrDRZK+AxBPvNfP\npM6VcnUztPcTIzSBQWTj/iMe+XReRW04JpbtvQtX4rYmHxbbah7/carGwsyL\nlqRzMf5AHI4MLfwb7hSSh5cEqkSgWlQ9k/iO2qRAVTo1QqpupsWKvEI0edd4\nGH/ascc3ikZnrDZNh6/kTP0Zuy3rtb6kXlBmh6WbWDsajFX/QfS+pMRJFhAl\nF8KGznqB4dhiy7klTUw9IotgEQ38RSal6dlF2sSx5r5WNa3VXF91vBJO30W2\nIq/xdZxOEsWjE41jPF8oOwD9INXV0ewbV6f/VCZV5vjZ5cEPP12+mcRz8Lwe\n9AZmXMQfdZ9HArEyL6yHXbo0ax2/umF0qfXFlMT+BKXCzJEbuhfbJZ9808SF\nNFRkLnMjCMEcganyQBtHqIuoRaPKoQ/r2pIOt/9d+Kh5v8vRaeD/h6jUWG83\nodlkcROEkAZmlMrhlQIzXfISKF7uOw3gq9tKRY6qx5Zg/YXUaXcEluRt0Y2Y\nPHsaKRxeWusAwIqM5Jf/h97r4WzSp59prve8C4UhgKQFsxPmDZCHrhipNmX8\n12QFs0IlBlLmqyZDDSMAmIEJhmxnI5UDE9Z6TbBGnKXshI7liyYkYHCPXDe6\nt/Km\r\n=6UsZ\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":"# png-ts\n\n<!-- NPM Version -->\n<a href=\"https://www.npmjs.com/package/png-ts\">\n  <img\n    src=\"https://img.shields.io/npm/v/png-ts.svg?style=flat-square\"\n    alt=\"NPM Version\"\n  />\n</a>\n\n<!-- Prettier Badge -->\n<a href=\"https://prettier.io/\">\n  <img\n    src=\"https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square\"\n    alt=\"Prettier Badge\"\n  />\n</a>\n\n> A PNG decoder written in TypeScript\n\nThis project is a fork of [`png.js`](https://github.com/devongovett/png.js) and was created for use in [`pdf-lib`](https://github.com/Hopding/pdf-lib). The original project is written in CoffeeScript. It contains a file for browser environments (`png.coffee`) and a different file for Node environments (`png-node.coffee`). This fork is a rewrite of the original project in TypeScript. All environment specific code has been removed or replaced with environment-independent code.\n\n## Example of `PNG.decodePixels`\n```javascript\n// Import the PNG class\nimport PNG from 'png-ts';\n\n// Create a PNG object\nconst pngImage = PNG.load(/* Uint8Array containing bytes of PNG image */);\n\n// `pixels` is a 1D array (in rgba order) of decoded pixel data\nconst pixels = pngImage.decodePixels();\n```\n\n## Installation\n### NPM Module\nTo install the latest stable version:\n```bash\n# With npm\nnpm install --save png-ts\n\n# With yarn\nyarn add png-ts\n```\nThis assumes you're using [npm](https://www.npmjs.com/) or [yarn](https://yarnpkg.com/lang/en/) as your package manager.\n\n### UMD Module\nYou can also download `png-ts` as a UMD module from [unpkg](https://unpkg.com/#/). The UMD builds have been compiled to ES5, so they should work [in any modern browser](https://caniuse.com/#feat=es5). UMD builds are useful if you aren't using a package manager or module bundler. For example, you can use them directly in the `<script>` tag of an HTML page.\n\nThe following builds are available:\n\n* https://unpkg.com/png-ts/dist/png-ts.js\n* https://unpkg.com/png-ts/dist/png-ts.min.js\n\nWhen using a UMD build, you will have access to a global `window.PNG` variable. This variable contains the `PNG` class exported by `png-ts`. For example:\n\n```javascript\n// NPM module\nimport PNG from 'pdf-lib';\nconst pngImage = PNG.load(/* ... */)\n\n// UMD module\nvar pngImage = window.PNG.load(/* ... */)\n```\n\n## TODO\n- [ ] Document `PNG.decode()` and `PNG.copyImageDataToBuffer()` methods.\n- [ ] See how much `pako` inflates the bundle size, replace if necessary\n- [ ] Replace the switch statements with if-statements to improve readability\n- [ ] Add unit tests\n\n## Prior Art\n* [`png-js`](https://github.com/devongovett/png.js) is a (animated) PNG decoder written in JavaScript for the HTML5 canvas element and Node.js (http://devongovett.github.io/png.js/).\n\n## License\n[MIT](https://choosealicense.com/licenses/mit/)\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_1545087983538_0.8219219000828704","host":"s3://npm-registry-packages"},"_id":"png-ts@0.0.1","version":"0.0.1"}