{"_id":"png-ts","_rev":"9-6b093d0315db2be28b95e1cbee42b2ee","name":"png-ts","dist-tags":{"latest":"0.0.3","next":"0.0.1"},"versions":{"0.0.0":{"name":"png-ts","version":"0.0.0","description":"A PNG decoder written in TypeScript","main":"lib/png.js","unpkg":"dist/pdf-lib.min.js","module":"es/index.js","types":"lib/png.d.ts","scripts":{"build-lib":"tsc --module CommonJS --outDir lib","build-es":"tsc --module ES2015 --outDir es","build-umd":"rollup -c rollup.config.js -o dist/pdf-lib.js","build-umd-min":"UGLIFY=true rollup -c rollup.config.js -o dist/pdf-lib.min.js"},"repository":{"type":"git","url":"https://github.com/devongovett/png.js.git"},"author":{"name":"Andrew Dillon","email":"andrew.dillon.j@gmail.com"},"contributors":[{"name":"Devon Govett","email":"devongovett@gmail.com","url":"http://badassjs.com/"}],"bugs":{"url":"https://github.com/Hopding/png.js/issues"},"devDependencies":{"@types/pako":"^1.0.0","prettier":"^1.15.3","rollup":"^0.68.0","rollup-plugin-analyzer":"^2.1.0","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-node-resolve":"^4.0.0","rollup-plugin-uglify":"^6.0.0","tslint":"^5.11.0","tslint-config-prettier":"^1.17.0","typescript":"^3.2.2"},"dependencies":{"pako":"^1.0.6"},"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","license":"MIT","_id":"png-ts@0.0.0","dist":{"shasum":"e68760aaab7ce69265efa54676779572d73266cf","integrity":"sha512-SA69lhYtiYQ+M8TwfcxeLL3uglzPwqY0Cd0Pzo7ZVrsMOGsRTcG8hwtrF2uKiTJ0EqtwN0Do8SWo6z6pSlNfLg==","tarball":"https://registry.npmjs.org/png-ts/-/png-ts-0.0.0.tgz","fileCount":22,"unpackedSize":1926209,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcF/3ACRA9TVsSAnZWagAAWWIP/R2PBvaIAAG90vbj/F13\nyjhCBQqWn+wzzf2NM6L6d0/Hq7qzxLJxFT78BoNH6hRv0xHr+VLx9bMs3tOW\nXSWJZ1siXvWvP6ljKBL9UFUQlGSWAID/z04vW6x11iYhudJfIcjNfuQklSVi\nVAsglxsHRInwQ72CJ7aBLdm53JpsCRYF5ffP35lUJcqg9Eou5yAszrWhOVbw\no6vfb5GLAmKFkHioJ3bBrQH0XS/lWuuNY0+H99Dn8RFG+hKRjcGK0dEo8GBW\nEX6q8bltopUMBUJQhi80LP661BDtP2Pij4G9CMg2LurGYmgNoZTn+aQGySVq\nAgxBxI0P1FNSnHhxb68Wl0h/bWXITmWPSmc9XQyIW8n49fPU5xhmPHPdhz/3\n8cY5aYOnZ4sMWkM5aJYH/syr1FVnEoZ4pg34gedMlIH304sISt71ZC+VwEDb\nPsMVJeDkPqLnGfVsGep8zU7xbDPOUc1QTM4fXrmizSyA0fOrJu7Kgog64dLW\n5bW0xbzVBuhq7IPee1O8pIdns0OXMJQ4ZC6L2FV5m+LdyCSt+7T81BT7oodR\nSqTFM75+ZBvPl8Y6+h37aiH1cCEoJz2Kwltzov9nKN4aKXHOrShNjLZu9qDm\nDQgi3aSjlpoJTvwbnpkOQ3DbP2+vxSmgd8dxBg7YkowlLc7TwVz4c9YyBB+m\nZ43J\r\n=jYYI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFH6Q9j9dtpVvQf+GFAzEGXU/avQwa+dqMZh+kMwNZ0fAiEAxQ5xTZ4bYHW+4IepNXPoEDtIcu8fvTkpU3KrLPuKKIk="}]},"maintainers":[{"name":"hopding","email":"andrew.dillon.j@gmail.com"}],"_npmUser":{"name":"hopding","email":"andrew.dillon.j@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/png-ts_0.0.0_1545076160141_0.439666284907698"},"_hasShrinkwrap":false},"0.0.1-rc1":{"name":"png-ts","version":"0.0.1-rc1","description":"A PNG decoder written in TypeScript","main":"lib/png.js","unpkg":"dist/pdf-lib.min.js","module":"es/index.js","types":"lib/png.d.ts","scripts":{"make":"node Makefile.js","lint":"node Makefile.js lint","releaseNext":"node Makefile.js releaseNext","releaseLatest":"node Makefile.js releaseLatest","typecheck":"tsc --noEmit"},"repository":{"type":"git","url":"https://github.com/devongovett/png.js.git"},"author":{"name":"Andrew Dillon","email":"andrew.dillon.j@gmail.com"},"contributors":[{"name":"Devon Govett","email":"devongovett@gmail.com","url":"http://badassjs.com/"}],"bugs":{"url":"https://github.com/Hopding/png-ts/issues"},"devDependencies":{"@types/pako":"^1.0.0","prettier":"^1.15.3","rollup":"^0.68.0","rollup-plugin-analyzer":"^2.1.0","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-node-resolve":"^4.0.0","rollup-plugin-uglify":"^6.0.0","shelljs":"^0.8.3","tslint":"^5.11.0","tslint-config-prettier":"^1.17.0","typescript":"^3.2.2"},"dependencies":{"pako":"^1.0.6"},"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","license":"MIT","_id":"png-ts@0.0.1-rc1","dist":{"shasum":"849a0d795e49ccca1bdb4d00da164e7220f9a741","integrity":"sha512-eifdFy1otMQUUPEYd36Lb4F/USQW9tTfBeF6YxhTW0XV13vk2G7TSy9QTE0ys+RA3QZkm+eFUXy2HvMXnhNJ8A==","tarball":"https://registry.npmjs.org/png-ts/-/png-ts-0.0.1-rc1.tgz","fileCount":15,"unpackedSize":328826,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcGAdgCRA9TVsSAnZWagAAAOYQAJxnduRzBbIyvjZ5xC+s\n8YroWYRO4dbCZ6dBh8OyMCMz7OvuXS93/CsIxo5hORc2JLPgMZnITVhKscDe\njGAINvuZVy2Guupw4jhaEFO4YRhCJ6pYjT+5jF7PksFuu/E0tyJf+UgaMqbm\n7CAbw/HDQ2fbsC8MjYZVScd/1x8OF161NPYi9QS8GuDW0odDNMEZjqvxfYLE\njlMki3ZTTxlme8Dl5V6eRe/r3mFrKUXOAqKU0eW5sIFlOhkJc6K8r0P8vbIl\nzgrJkY1rOXZ93L8wni6624Q4eXbKxhvx7JJnZ4ZK1Xd3MDV+J9dgN5zt9CEG\nuPk34KfHxZ6tDrAJEjlE4a85IVenQxBTYIL3No0BBlbE4AmYfoEd/t96rJXK\nY90kVzYhlmFfwbgMGKQZzGSfReCb5FikvfsCboFFQV9QczXxUeqKjTuWQMEw\n8MwT0eJu0wmeSWn4UZpHY+T8Ck8vR3kf2TH7rZ4cdEqjLiMxGvAYxfXzfCDd\nbvb8xh/ftjcQvkrlHqwiIEB0KXJHu+fPkFPk1Q/J/B5/aPApbfFVGLZcdEd1\nJLaums2NVOOUK13yNyG/1Q9Lfrk52OWgYW8wdFaLwIDSOB7PMd80dsTzQGnN\nvHlGrT4wgwxR7AvfNcQSTJiIAJZhVtwwdkTfMPeMi10TBEV/0GsIaSB4GFhD\nuhHq\r\n=e3mT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDsnQolsFg14RyIJHxQvMyrLirXrQNBvFrE5fN4MxjEVAIhAPRtTHcB1tVutMfQGxgig0BrlaNRcaEZzafzt8C8zXhZ"}]},"maintainers":[{"name":"hopding","email":"andrew.dillon.j@gmail.com"}],"_npmUser":{"name":"hopding","email":"andrew.dillon.j@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/png-ts_0.0.1-rc1_1545078623620_0.5202922552791693"},"_hasShrinkwrap":false},"0.0.1-rc2":{"name":"png-ts","version":"0.0.1-rc2","description":"A PNG decoder written in TypeScript","main":"lib/png.js","unpkg":"dist/pdf-lib.min.js","module":"es/index.js","types":"lib/png.d.ts","scripts":{"make":"node Makefile.js","lint":"node Makefile.js lint","releaseNext":"node Makefile.js releaseNext","releaseLatest":"node Makefile.js releaseLatest","typecheck":"tsc --noEmit"},"repository":{"type":"git","url":"https://github.com/devongovett/png.js.git"},"author":{"name":"Andrew Dillon","email":"andrew.dillon.j@gmail.com"},"contributors":[{"name":"Devon Govett","email":"devongovett@gmail.com","url":"http://badassjs.com/"}],"bugs":{"url":"https://github.com/Hopding/png-ts/issues"},"devDependencies":{"@types/pako":"^1.0.0","prettier":"^1.15.3","rollup":"^0.68.0","rollup-plugin-analyzer":"^2.1.0","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-node-resolve":"^4.0.0","rollup-plugin-uglify":"^6.0.0","shelljs":"^0.8.3","tslint":"^5.11.0","tslint-config-prettier":"^1.17.0","typescript":"^3.2.2"},"dependencies":{"pako":"^1.0.6"},"readmeFilename":"README.md","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","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","license":"MIT","_id":"png-ts@0.0.1-rc2","dist":{"shasum":"5f05f372344c54ea43ffd6331d91d197a80e904d","integrity":"sha512-Bz+bs/6sZTrFvUuV2ia0EPqLOUXLEpiSloBVdqySmwJQltV+q/LLBn7UAg7xv/VPqZwlJAzKA0n06OQEd+PrfQ==","tarball":"https://registry.npmjs.org/png-ts/-/png-ts-0.0.1-rc2.tgz","fileCount":15,"unpackedSize":328826,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcGAeiCRA9TVsSAnZWagAAUakP/R7cvF9JUceUDLm4DVjF\nb9Y6F20TlyERUwjo2e/BxFsEC58b3aPaaOFGK0aykoLxRQ09Lg8W5Gg2QpTk\nWOyLVXO3LNxDfSWaw7l6KkzP8z7zNInIcER0Sf2YuH2nsR/nxTeUZXYca1ZE\nd4LE93C/hYiSqEmySrj7w+LHlKWTIJs+JUh4TnZxwWEwpgusT8sMBbw1jTxg\n1WOJgikYNac3qtnvUwX3Zkw6z6MLGuxuqaBq+dlTgH63qgeT4cZK4Xnhz6xX\n6zJcOfbnLN2sDxwXFaqXgiJ2EBYomaeUu7TtipIpzAsd7BIXONaOnpsl+/wD\njtTp5RGMqFXIMHhfZkiTAyVR2+x4qkb8ExfiU1mNGYYlA5TXhwFkI05fFsxj\n/rc5HSKAv03kMg7x0uOAYNOgdNSS9nhZPYat+jEmrwJHWEgDvZkE93cv0eZF\nw0avDffBjv6U0TSoTVs7BpcRs/NtPRDtnFD+BL0TjoAyrmIROyT0RNMqRnHG\n6rM5PFCQC6yuceXbt/bPT0NEZyiRlj1d43bjwXwmudMxAMPtYTdBaVzcENvg\nO4mSq+6QGb5ljC2ZdJQkUYjs+3MpsAWIE2+tHBNh8xbkUsG5aePXVBoefWYA\n43OC5xA4HztQVSWirdbjNfd/jsRF8Qy7CNa+WYfN1tyfHyOZ6vCcX7f1WDXJ\nkKoW\r\n=QG8C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPHNeJb7ZVF3G9RRy93YAgYA+YZxfdkQBW8n+YrJEJ6AIhAKFkrU5K+VhBNoy+RqO3tYs7yOcWUFPYX4fiXnwcLU3q"}]},"maintainers":[{"name":"hopding","email":"andrew.dillon.j@gmail.com"}],"_npmUser":{"name":"hopding","email":"andrew.dillon.j@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/png-ts_0.0.1-rc2_1545078689768_0.7040908065116729"},"_hasShrinkwrap":false},"0.0.1-rc3":{"name":"png-ts","version":"0.0.1-rc3","description":"A PNG decoder written in TypeScript","main":"lib/png.js","unpkg":"dist/pdf-lib.min.js","module":"es/index.js","types":"lib/png.d.ts","publishConfig":{"tag":"next"},"scripts":{"make":"node Makefile.js","lint":"node Makefile.js lint","releaseNext":"node Makefile.js releaseNext","releaseLatest":"node Makefile.js releaseLatest","typecheck":"tsc --noEmit"},"repository":{"type":"git","url":"https://github.com/devongovett/png.js.git"},"author":{"name":"Andrew Dillon","email":"andrew.dillon.j@gmail.com"},"contributors":[{"name":"Devon Govett","email":"devongovett@gmail.com","url":"http://badassjs.com/"}],"bugs":{"url":"https://github.com/Hopding/png-ts/issues"},"devDependencies":{"@types/pako":"^1.0.0","prettier":"^1.15.3","rollup":"^0.68.0","rollup-plugin-analyzer":"^2.1.0","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-node-resolve":"^4.0.0","rollup-plugin-uglify":"^6.0.0","shelljs":"^0.8.3","tslint":"^5.11.0","tslint-config-prettier":"^1.17.0","typescript":"^3.2.2"},"dependencies":{"pako":"^1.0.6"},"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","license":"MIT","_id":"png-ts@0.0.1-rc3","dist":{"shasum":"15ce1bfd46c0d0c92626ebfd0b92ca7587faff5a","integrity":"sha512-3YwJtIJsTyYfYGyJjXS1ZUck1HUJFKPrxhyaRl1UjHfXIds7MkKdf5MYmqa9CfpCfjJU65PCbOHynpOSKI3F9w==","tarball":"https://registry.npmjs.org/png-ts/-/png-ts-0.0.1-rc3.tgz","fileCount":15,"unpackedSize":328870,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcGAhuCRA9TVsSAnZWagAAUq0P/0Hhp0J3QxchB0fe9Wyq\nFcRI98fKQ/9Y/hxMBkMcBQpOY8rOYle8oVEZ4Jib4YXzUQfvWxsHJWEatHv3\nd079jo12aoIg1yLLnrSRZjq7Rt9l4u2DG4LP637zBZo/HAiRHzn7TGAdhiCs\nc9vDpiax4z2JOL4DnmujZDkiaeTclUuJjO/yM9oXJKxcq1VmbOiC9P2mqjLU\nN4rlbpxLUDzJ6CwftsXBdu0ruvZaXz0J4VixJMXThCFUG4uzCaNGcXRB5HWg\nMsXqaFetWE4NTsGcg1nUTygbJ23kWhXQ3aiqIUGQjg8I0Y95K+zFiQcXy7/4\nczW2hApc0Lvy3hSvaTIZZ8Kp51eZ5PPwlhutbZAMMWme+HD+t6cB4LH3wNjO\nZIr3NNxv/oFRi9dlS+4dBSSVA93aeYROyoJPXaMl59hBlJuOMnahCT0M43Kd\nY18rTNNcrL+u9kA26Rtqb3RYjG+fFid+zPAbjmhkBq5AGooDlpgGFEpQojx/\nbYnAHc+maCYv9EvTvRoq45C4nNcu8zTNY5orePhQ8ciA2Hti2xkdCb7zxcr2\n+5hANsNiuf79SC/oclu25a4qnftI//CV06mAPWQTW+QH0rk/Qb+ek9DNhowd\nupjlHp1UQXz8z+NPLvjxAfnT0yHiL/HmNI0fWmARuGTIpGFQyJWg7Cf3t6ev\ntzMX\r\n=5DCE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBZtKy5HjhfZ+mCIm/GlPtibMt8njhzxIS4y3bl1UvcEAiB1Ps19Kd6/1NspokXPG9eLaxQ4cQID0Y+MJcq48Q+jSA=="}]},"maintainers":[{"name":"hopding","email":"andrew.dillon.j@gmail.com"}],"_npmUser":{"name":"hopding","email":"andrew.dillon.j@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/png-ts_0.0.1-rc3_1545078893679_0.015161981474233643"},"_hasShrinkwrap":false},"0.0.1-rc4":{"name":"png-ts","version":"0.0.1-rc4","description":"A PNG decoder written in TypeScript","main":"lib/png.js","unpkg":"dist/png-ts.min.js","module":"es/index.js","types":"lib/png.d.ts","scripts":{"make":"node Makefile.js","lint":"node Makefile.js lint","releaseNext":"node Makefile.js releaseNext","releaseLatest":"node Makefile.js releaseLatest","typecheck":"tsc --noEmit"},"repository":{"type":"git","url":"https://github.com/devongovett/png.js.git"},"author":{"name":"Andrew Dillon","email":"andrew.dillon.j@gmail.com"},"contributors":[{"name":"Devon Govett","email":"devongovett@gmail.com","url":"http://badassjs.com/"}],"bugs":{"url":"https://github.com/Hopding/png-ts/issues"},"devDependencies":{"@types/pako":"^1.0.0","prettier":"^1.15.3","rollup":"^0.68.0","rollup-plugin-analyzer":"^2.1.0","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-node-resolve":"^4.0.0","rollup-plugin-uglify":"^6.0.0","shelljs":"^0.8.3","tslint":"^5.11.0","tslint-config-prettier":"^1.17.0","typescript":"^3.2.2"},"dependencies":{"pako":"^1.0.6"},"readmeFilename":"README.md","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","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","license":"MIT","_id":"png-ts@0.0.1-rc4","dist":{"shasum":"d68dbe27d4f750fda28613914409347f037d201a","integrity":"sha512-Nk9v3egUSxVfOA6+PzFj2nbRR5zUVwwtcXH0jILSYGWtkbfQbbxmJO7jP1K3mvDCQsWF9UwuTMeDjQ4RXGtVeg==","tarball":"https://registry.npmjs.org/png-ts/-/png-ts-0.0.1-rc4.tgz","fileCount":15,"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","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG/MR5QZKFdw1fqZUBKi5aw4tA/2WFPmODIzfrjfstknAiEAr8XYFzobczIu70qQjf2+J9tQpoOubXKndazsXSUFlTo="}]},"maintainers":[{"name":"hopding","email":"andrew.dillon.j@gmail.com"}],"_npmUser":{"name":"hopding","email":"andrew.dillon.j@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/png-ts_0.0.1-rc4_1545079158425_0.7561725530252852"},"_hasShrinkwrap":false},"0.0.1-rc5":{"name":"png-ts","version":"0.0.1-rc5","description":"A PNG decoder written in TypeScript","main":"lib/png.js","unpkg":"dist/png-ts.min.js","module":"es/index.js","types":"lib/png.d.ts","scripts":{"make":"node Makefile.js","lint":"node Makefile.js lint","releaseNext":"node Makefile.js releaseNext","releaseLatest":"node Makefile.js releaseLatest","typecheck":"tsc --noEmit"},"repository":{"type":"git","url":"https://github.com/devongovett/png.js.git"},"author":{"name":"Andrew Dillon","email":"andrew.dillon.j@gmail.com"},"contributors":[{"name":"Devon Govett","email":"devongovett@gmail.com","url":"http://badassjs.com/"}],"bugs":{"url":"https://github.com/Hopding/png-ts/issues"},"devDependencies":{"@types/pako":"^1.0.0","prettier":"^1.15.3","rollup":"^0.68.0","rollup-plugin-analyzer":"^2.1.0","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-node-resolve":"^4.0.0","rollup-plugin-uglify":"^6.0.0","shelljs":"^0.8.3","tslint":"^5.11.0","tslint-config-prettier":"^1.17.0","typescript":"^3.2.2"},"dependencies":{"pako":"^1.0.6"},"readmeFilename":"README.md","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","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","license":"MIT","_id":"png-ts@0.0.1-rc5","dist":{"shasum":"fcf8d8fb00a0014c18531715e4b57e766b873687","integrity":"sha512-7ISmj6jB/Ukf/39opCFhdKoQL6a5dmFtiDJq8GepJP1ClWbebP9BQ8ZWjcU/0vU1vXMtVlFEbKEmHumBpGolWQ==","tarball":"https://registry.npmjs.org/png-ts/-/png-ts-0.0.1-rc5.tgz","fileCount":15,"unpackedSize":327710,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcGAslCRA9TVsSAnZWagAAuFYP/1AsAZ3m7Wq+R6BiajB2\nbGr4US55fn3pwm/SQcTC+lbkY82v76V17SikWOC7I0tTnk6Eo46dMZPYXU0b\nOuQtDm6/aIDaMC6Aq52nhu/DrDGnZ8+LSNCL+DuwvAmE+E+NvwAFOC3V5KIR\nOgs8fkgO8hEg/T9vyaUYeMBhR60KlFx8m2+tjt6fRDsyHhvDml9PREqQ0cPu\nbb9mLQQj9VOMjTjdJML42ZRFVr13Qw4wcuIwk6XAxc60cc0rlZADbMc4NpwT\nb5wwHBVYFZ/G2bHwEGZNgBlMoIJIFejxo1DDnYC+hQwo5O0fmSU8V1ges7i1\noSsJ5uvGPH2/shBOkWZ74QcYGNipWjhBEQWTJ8G6GuDF7JHDteCut4a8Qjlm\nuL+F82kIx/+VfyV8CiiBwYg3mm+VspYU08f5Ap5lR5TZRhPfRUOczjFmFIHl\nDCGyBRzqLu/MC51PmrOeL2j/Ofsyn92izcrCCq8qkEL7c83q0Qay6XRVRtrn\nk+/kF6NpwgdG+gmi9yRsBGNaOmoRqfWCHlkWEZMESe4OrF9MP+2Cn2CHMPV1\nE/d9bjUBXXxAxCs03G0ocVlBScJKGfxzxibbLyGYirrqLpsMdSxFCOlHZ8Bu\nCp60Z5/GDhZK1KLPL4OsOYUATQkLGWDuVPx+La13doZYWonWK3qlJKdo9sqr\nCnnl\r\n=XdI6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDlpeQ+tjW7LtAvH8md7dmhcfApuPP4YaD/G7IwEAgMOAIhAPMQLTt6AxoSoQNYWSXaYt/lgM9osY+Tb/2s0avvJsiF"}]},"maintainers":[{"name":"hopding","email":"andrew.dillon.j@gmail.com"}],"_npmUser":{"name":"hopding","email":"andrew.dillon.j@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/png-ts_0.0.1-rc5_1545079588953_0.342890124808674"},"_hasShrinkwrap":false},"0.0.1":{"name":"png-ts","version":"0.0.1","description":"A PNG decoder written in TypeScript","main":"lib/png.js","unpkg":"dist/png-ts.min.js","module":"es/index.js","types":"lib/png.d.ts","scripts":{"make":"node Makefile.js","lint":"node Makefile.js lint","releaseNext":"node Makefile.js releaseNext","releaseLatest":"node Makefile.js releaseLatest","typecheck":"tsc --noEmit"},"repository":{"type":"git","url":"https://github.com/devongovett/png.js.git"},"author":{"name":"Andrew Dillon","email":"andrew.dillon.j@gmail.com"},"contributors":[{"name":"Devon Govett","email":"devongovett@gmail.com","url":"http://badassjs.com/"}],"bugs":{"url":"https://github.com/Hopding/png-ts/issues"},"devDependencies":{"@types/pako":"^1.0.0","prettier":"^1.15.3","rollup":"^0.68.0","rollup-plugin-analyzer":"^2.1.0","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-node-resolve":"^4.0.0","rollup-plugin-uglify":"^6.0.0","shelljs":"^0.8.3","tslint":"^5.11.0","tslint-config-prettier":"^1.17.0","typescript":"^3.2.2"},"dependencies":{"pako":"^1.0.6"},"readmeFilename":"README.md","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","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","license":"MIT","_id":"png-ts@0.0.1","dist":{"shasum":"d1a9d23ea5c5fe74979f0f957fd6274ee93714f5","integrity":"sha512-t8SCgNSUkqdNgh1fyaqslHWdaCvG4yQ9dMDzdDcDTrH2W8mfJqOmPwi9Mp3M043xrtSEQFyrmabZmk/ioY4/nA==","tarball":"https://registry.npmjs.org/png-ts/-/png-ts-0.0.1.tgz","fileCount":15,"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","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH1N70ufZguhEdnZvKbwc+8FfYBfl2Zm4UUghCP2kRJlAiEAh3wi4j180lFJN3JrlIriGDTkHTQIg12uOc2ZLffr8sc="}]},"maintainers":[{"name":"hopding","email":"andrew.dillon.j@gmail.com"}],"_npmUser":{"name":"hopding","email":"andrew.dillon.j@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/png-ts_0.0.1_1545087983538_0.8219219000828704"},"_hasShrinkwrap":false},"0.0.2":{"name":"png-ts","version":"0.0.2","description":"A PNG decoder written in TypeScript","main":"lib/png.js","unpkg":"dist/png-ts.min.js","module":"es/index.js","types":"lib/png.d.ts","scripts":{"make":"node Makefile.js","lint":"node Makefile.js lint","releaseNext":"node Makefile.js releaseNext","releaseLatest":"node Makefile.js releaseLatest","typecheck":"tsc --noEmit"},"repository":{"type":"git","url":"https://github.com/devongovett/png.js.git"},"author":{"name":"Andrew Dillon","email":"andrew.dillon.j@gmail.com"},"contributors":[{"name":"Devon Govett","email":"devongovett@gmail.com","url":"http://badassjs.com/"}],"bugs":{"url":"https://github.com/Hopding/png-ts/issues"},"devDependencies":{"@types/pako":"^1.0.0","prettier":"^1.15.3","rollup":"^0.68.0","rollup-plugin-analyzer":"^2.1.0","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-node-resolve":"^4.0.0","rollup-plugin-uglify":"^6.0.0","shelljs":"^0.8.3","tslint":"^5.11.0","tslint-config-prettier":"^1.17.0","typescript":"^3.2.2"},"dependencies":{"pako":"^1.0.6"},"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","license":"MIT","_id":"png-ts@0.0.2","dist":{"shasum":"95dd1d286b9e9a5b521fa351e2a33361faf34e6e","integrity":"sha512-L9z2YJfhANJZBePahf6GCWAfCu3C/5cULBAZyqYuWR3dz4EdomVh66hxN0KIyJxu4s7zka+elKEHfMyVmrj9cw==","tarball":"https://registry.npmjs.org/png-ts/-/png-ts-0.0.2.tgz","fileCount":15,"unpackedSize":326648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcGCyECRA9TVsSAnZWagAA0bkP+wVP1lb8TCxw/2KTr7E8\npyVCt2QDwGHpWc8oSpXglw8ZbfayZcnsnboBFDB5wD9jaDPOR+o+v/eu8E86\n2TKfdy8TzpgWzI7GdDzJ7kz6YYEG2sYyD2DGuCx/6L75GNdzV32tq+ZS0pLM\nFqTYZ37wDeHexPSqevfUrZArtxF8IDmJTrsIpd29T6Ucew8Av6dPUPmaz2DA\nsef/4K3CYJhRwZDN+CJJvIMI2Sm9gwAxY9VvkR0HCSNF0df5msq7PM9dWtTw\n2OaOvVGLObV33qiuaSz7AEv1cNOEpRXCUVtAzJHlRFMoztXZNYJzdgGnQBKG\nndie9ocuBrN2EtEBSMkkeIsZMkAcMUtVplHY06VhfVidFn+6sWsAg7fJXc9y\nAe1Cb7uD0RLdDks66bBta/wYu9B7VnmtsM+apYVPzSyADdDkd/3g9uuUq2A/\nFVAz56gk5BOepZ6hVikyn0zI7tcZX98oaXo7A9fm8amfqo28pKRt7vL+GT92\n3PQiSJ8NbRNXV8KRnl0rGnLWdjO8xJbeQy6jWrjJ4BhmymgE1lB4H6Rq3PzA\nWSy88vrbnSUcdAGQWVITbcyWyPoeRSZ9BBntS86lF/jun6Dtzp2uQYbugNAL\naSFHNRK5vVKRswqggab2b+U8su+dNhDK2dU9AYODmZIjF/EohoFmUb48KXcj\n/z0j\r\n=W0tb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHwMr8xwBzzrrnLAmJrESzuzI4wG4C4DUyC/7NRG9H4mAiEAjLz9B7BdtR0EzLDdAOrqz9XLlQOdv0PL7IKXbUv3OuM="}]},"maintainers":[{"name":"hopding","email":"andrew.dillon.j@gmail.com"}],"_npmUser":{"name":"hopding","email":"andrew.dillon.j@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/png-ts_0.0.2_1545088131794_0.6758897536146133"},"_hasShrinkwrap":false},"0.0.3":{"name":"png-ts","version":"0.0.3","description":"A PNG decoder written in TypeScript","main":"lib/png.js","unpkg":"dist/png-ts.min.js","module":"es/png.js","types":"lib/png.d.ts","scripts":{"make":"node Makefile.js","lint":"node Makefile.js lint","releaseNext":"node Makefile.js releaseNext","releaseLatest":"node Makefile.js releaseLatest","typecheck":"tsc --noEmit"},"repository":{"type":"git","url":"https://github.com/devongovett/png.js.git"},"author":{"name":"Andrew Dillon","email":"andrew.dillon.j@gmail.com"},"contributors":[{"name":"Devon Govett","email":"devongovett@gmail.com","url":"http://badassjs.com/"}],"bugs":{"url":"https://github.com/Hopding/png-ts/issues"},"dependencies":{"pako":"^1.0.6"},"devDependencies":{"@types/pako":"^1.0.0","prettier":"^1.15.3","rollup":"^0.68.0","rollup-plugin-analyzer":"^2.1.0","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-node-resolve":"^4.0.0","rollup-plugin-uglify":"^6.0.0","shelljs":"^0.8.3","tslint":"^5.11.0","tslint-config-prettier":"^1.17.0","typescript":"^3.2.2"},"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","license":"MIT","_id":"png-ts@0.0.3","dist":{"shasum":"497fa90f13b9a2cdcd5a457cb1c28ab3c68ec145","integrity":"sha512-Qwn3yMfbrbaN86QjrDAqD1UVJc4AV4hvBCx5Dv9libLd6D20xKtgOFs/UcvD0nnjxWlgS12kEVWCDFd9ZtwB+g==","tarball":"https://registry.npmjs.org/png-ts/-/png-ts-0.0.3.tgz","fileCount":16,"unpackedSize":17703431,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcGrrCCRA9TVsSAnZWagAA1uYP/A0gZ864rb0cW7zFtI96\nxA8hNbZ17ETQWz/YoNkK3wDN3FjNKH2tcme/kjkrDNUe0YfNRxqUh1yLjIiz\nqzcae/6RVUJSJR9ch/jtHpqQK+HEgdBpcOkTWxqNFqBDSABrHAQZp/nyu5x8\nkSBH7UUFT8pKLpta8NSGfsz4DhG8RomJ2+lat1wkg4yij0MW3GAK4eBtVMvd\nv72Xt4NRnL2FsMNo0d3SREsOTsaxJvQwUXCyIYW36dRBeS+v6up7uTzsNipY\nuCP5ROkNz6GA7tiWUv366vgamMCKSRNcwN7SLGAWUZyKXsgyoB+1wYlGhS/z\nm2XXcWM2V5CAuqsA09Jm/LVwFb/Buh1W1/SihEJNVauSU62t/bJusISgPcM9\nnGN+/l5PIE85BJfBi3MFau3LXA27WRPryh4Qjc6zLp5UIKCzZkk4mUnVBvd3\nT0FaIb3qXIqNlsJU3JXIwfuxeNsw2rrzoIImsDMBBk2ews50tq3JqHPG+RMR\nK05n2a0adI2Uep6NvBcF+mwVynDC1z8hWlOxGTsmYw/CuEBaCnBmHST4OGXs\nE+YhdQZi15jv/X8OHSQyc8wK533G5ZxHzph6VnUg3p8OByjuUsM4trE5W+Gd\nm1P0qoID2Pr6MM4fHTqNuVo/pbOTK08zTPckjr8BdLDyd9phfMvLFLe293A0\nivcV\r\n=F3RB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAEfq5xyFkou9P9padGkEhktUFH+pILYWK5U8uzT+2tsAiBho4El+kSms5n9rUpI3E1IpPYit3ZwgsMJW4kjwqeG9Q=="}]},"maintainers":[{"name":"hopding","email":"andrew.dillon.j@gmail.com"}],"_npmUser":{"name":"hopding","email":"andrew.dillon.j@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/png-ts_0.0.3_1545255617181_0.2805965071816434"},"_hasShrinkwrap":false}},"time":{"created":"2018-12-17T19:49:20.140Z","0.0.0":"2018-12-17T19:49:20.427Z","modified":"2022-05-13T03:20:20.909Z","0.0.1-rc1":"2018-12-17T20:30:23.827Z","0.0.1-rc2":"2018-12-17T20:31:29.862Z","0.0.1-rc3":"2018-12-17T20:34:53.787Z","0.0.1-rc4":"2018-12-17T20:39:18.556Z","0.0.1-rc5":"2018-12-17T20:46:29.170Z","0.0.1":"2018-12-17T23:06:23.704Z","0.0.2":"2018-12-17T23:08:51.971Z","0.0.3":"2018-12-19T21:40:18.211Z"},"maintainers":[{"name":"hopding","email":"andrew.dillon.j@gmail.com"}],"description":"A PNG decoder written in TypeScript","repository":{"type":"git","url":"https://github.com/devongovett/png.js.git"},"contributors":[{"name":"Devon Govett","email":"devongovett@gmail.com","url":"http://badassjs.com/"}],"author":{"name":"Andrew Dillon","email":"andrew.dillon.j@gmail.com"},"bugs":{"url":"https://github.com/Hopding/png-ts/issues"},"license":"MIT","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","readmeFilename":"README.md"}