{"_id":"@pdf-lib/upng","_rev":"2-dd3d9decbca54f8fd7d85925fbafd39d","name":"@pdf-lib/upng","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@pdf-lib/upng","license":"MIT","version":"1.0.0","description":"Small, fast and advanced PNG / APNG encoder and decoder","main":"cjs/UPNG.js","unpkg":"dist/UPNG.min.js","module":"UPNG.js","types":"index.d.ts","scripts":{"build":"yarn build:cjs && yarn build:umd && yarn build:umd:min","build:cjs":"babel --plugins @babel/plugin-transform-modules-commonjs --out-dir cjs UPNG.js","build:umd":"rollup --config rollup.config.js --file dist/UPNG.js","build:umd:min":"rollup --config rollup.config.js --file dist/UPNG.min.js --environment MINIFY"},"repository":{"type":"git","url":"https://github.com/Hopding/upng"},"author":{"name":"photopea","url":"https://github.com/photopea"},"contributors":[{"name":"Andrew Dillon","url":"https://github.com/Hopding"},{"name":"Scimonster","url":"https://github.com/Scimonster"}],"bugs":{"url":"https://github.com/Hopding/upng/issues"},"keywords":["png","apng","image","conversion"],"dependencies":{"pako":"^1.0.5"},"devDependencies":{"@babel/cli":"^7.8.4","@babel/core":"^7.8.4","@babel/plugin-transform-modules-commonjs":"^7.8.3","@rollup/plugin-commonjs":"^11.0.0","@rollup/plugin-node-resolve":"^7.1.1","rollup":"^1.31.1","rollup-plugin-terser":"^5.1.3"},"licenseText":"MIT License\n\nCopyright (c) 2017 Photopea\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","_id":"@pdf-lib/upng@1.0.0","dist":{"shasum":"31bd109219831f2bfe4566eb11dc475b788d9f39","integrity":"sha512-plI1GngIy8+RtfdLIZcT32byc/lQ7H9KYyRWPrk5SXTC1iSJq4b9+ErOGi9BDnTe19pJlH55bpTY52x8kYFKLw==","tarball":"https://registry.npmjs.org/@pdf-lib/upng/-/upng-1.0.0.tgz","fileCount":11,"unpackedSize":705540,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeTdg2CRA9TVsSAnZWagAAW20P/0zOjCul8uyi54Qui6sw\ntL8m54inOF3phtEf283inmzLSGu8O2WqWQC6hJ4MpXtmqufb+thmJyXVZP7/\nVH+6K23h1zoGcBvQiI9v1yGqqHoPrl3MsETFYzIJ0mFHDVFQuRYJWkZszZc6\nNTPdibP0+m2rJA5Se8GO/Q6j2oHN2OxKXGEEvbAPAakqaW94Wu15/q+2QEQb\nYKcplrZbdf7je1nn0NnlN/20QFFxtihE2Aif91swoeBMqZ2B6syiF4hVZNRF\nL9P/OK/T45ecm7pSsw76/XvrWAHdYjmVsM5Q2WCaC2SzTzIc9Hf9kjQ2dwYW\nNW2WTtSFh/qLwN272mIr6C2SHY2HgbOPlgmwg+fn0mZHghhyEzz7Dm7fcP+p\nPwERxe+Uagm3spk1yaYBd2VXqN5AWxmlhjPqOjETvwOv6I6HwAcFQBy/odd3\nOn2ycu4vnza+3uqp5RBbpdZQXNqMmqJKnsd5wZ4rem8VY/LepgMLTZMWgy3O\nggEtdzJI4kEzn0OPK4a0eeyGA7STlVJySZB+fLlUaRixU+llMrviuDOXoYe7\nZHIvuydVd7MDDdg25pzQpQCA/tro9Du85/1rMhDrOp5Zcs5Xp14HqrCJCR2q\nx7lTse6IpKEIi8Z2LFaH3TOK3M6o4LEgy9r8SMINHiPgERf5RVDrdlO8BACK\nnHKk\r\n=2DZQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEKVWrdaOlITP1Brr84PRy6O5QHfA4HA4fMoFYtHN25xAiEAnHwQ21OhBmdCErtiqscEhWTxq1RU+1vgTOCVhshbKW8="}]},"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/upng_1.0.0_1582159926299_0.6407845904891543"},"_hasShrinkwrap":false},"1.0.1":{"name":"@pdf-lib/upng","license":"MIT","version":"1.0.1","description":"Small, fast and advanced PNG / APNG encoder and decoder","main":"cjs/UPNG.js","unpkg":"dist/UPNG.min.js","module":"UPNG.js","types":"index.d.ts","scripts":{"build":"yarn build:cjs && yarn build:umd && yarn build:umd:min","build:cjs":"babel --plugins @babel/plugin-transform-modules-commonjs --out-dir cjs UPNG.js","build:umd":"rollup --config rollup.config.js --file dist/UPNG.js","build:umd:min":"rollup --config rollup.config.js --file dist/UPNG.min.js --environment MINIFY"},"repository":{"type":"git","url":"https://github.com/Hopding/upng"},"author":{"name":"photopea","url":"https://github.com/photopea"},"contributors":[{"name":"Andrew Dillon","url":"https://github.com/Hopding"},{"name":"Scimonster","url":"https://github.com/Scimonster"}],"bugs":{"url":"https://github.com/Hopding/upng/issues"},"keywords":["png","apng","image","conversion"],"dependencies":{"pako":"^1.0.10"},"devDependencies":{"@babel/cli":"^7.8.4","@babel/core":"^7.8.4","@babel/plugin-transform-modules-commonjs":"^7.8.3","@rollup/plugin-commonjs":"^11.0.0","@rollup/plugin-node-resolve":"^7.1.1","rollup":"^1.31.1","rollup-plugin-terser":"^5.1.3"},"licenseText":"MIT License\n\nCopyright (c) 2017 Photopea\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","_id":"@pdf-lib/upng@1.0.1","dist":{"shasum":"7dc9c636271aca007a9df4deaf2dd7e7960280cb","integrity":"sha512-dQK2FUMQtowVP00mtIksrlZhdFXQZPC+taih1q4CvPZ5vqdxR/LKBaFg0oAfzd1GlHZXXSPdQfzQnt+ViGvEIQ==","tarball":"https://registry.npmjs.org/@pdf-lib/upng/-/upng-1.0.1.tgz","fileCount":12,"unpackedSize":707597,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeTdmACRA9TVsSAnZWagAAyuAP/2h6vZTUD5uxPAYum8IM\nbCQzqa1PhqKTZSLD3q5hZRvJm2O/OQFNIwZkNNC6H0CbrWz/U7K9AUVItws7\nvJ4MlNfiGLeFNqv7mZds5nHHdciA64VCJPOFXxGZse5RSYdtmH9b/EVjhSn9\nrLjC1xywgMQ0Q0QkTEJ/f4iHLQOJ9Ig9mc3BwNWr4rUGOIRLfCzeQJvEYvB+\nNxpGoc6vFDgyUzCfKiMz90YDlSsdtaPVyDgG9KUW0w0kIYKb7FvivrQ0ZR+U\nZiic1WBNwP6tWwNx429200jPXWxmUvUy8U9bIWmyJGXWdjXKMJAp3bkNNqpU\ndRfvFkJ+V+lORR7qA0PNOAONig1AxwwC8Ns0TDTzgVoAoFdaaB1A0hVpDaBY\n9QIwRy2IDn6yiiXFbEkY0ARBMUuKTeV4POSVUlgQb+dj+JwzqqhkjC7/7vyB\nJGLqcc0GXjNW+fR3xz1q2UZgubBRmoCVluRLIrgmk/McOtz4l9CIZO1UGrX4\nVtbvn09YtP/ueEpFTAg+UzCYN9rvpIE5lUSuhshLIq18/9Rs0AvYjXosVU2G\n9rDMxnUgtE48TES8EnTPlg54ABaG+BTuoVQXco3I/QQ9rIADS2n1C3AtOQnq\nJgrqUDXewDh1bssIouMxMazD0npiW2NrtmeR0ZdKwLk105IUCjHIL5bZO5aB\n07MF\r\n=20yG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCeHlcfZI3sgrc1UNmzn4sqs37giPj5bjnNaEjaImoX4wIhAJFfFAEWox9ckA4RCbWfA1f8yyjn79PTn6vgBwrX6I6N"}]},"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/upng_1.0.1_1582160255936_0.3813650220306337"},"_hasShrinkwrap":false}},"time":{"created":"2020-02-20T00:52:06.132Z","1.0.0":"2020-02-20T00:52:06.502Z","modified":"2022-04-06T13:40:24.394Z","1.0.1":"2020-02-20T00:57:36.125Z"},"maintainers":[{"name":"hopding","email":"andrew.dillon.j@gmail.com"}],"description":"Small, fast and advanced PNG / APNG encoder and decoder","keywords":["png","apng","image","conversion"],"repository":{"type":"git","url":"https://github.com/Hopding/upng"},"contributors":[{"name":"Andrew Dillon","url":"https://github.com/Hopding"},{"name":"Scimonster","url":"https://github.com/Scimonster"}],"author":{"name":"photopea","url":"https://github.com/photopea"},"bugs":{"url":"https://github.com/Hopding/upng/issues"},"license":"MIT","readme":"

\n upng\n\n
\n\n \n \n \n \n

\n\n> A small, fast and advanced PNG / APNG encoder and decoder\n\nThis project is a fork of [`UPNG.js`](https://github.com/photopea/UPNG.js) and was created for use in [`pdf-lib`](https://github.com/Hopding/pdf-lib). The maintainer of the original repo does not publish it to NPM. That is the primary purpose of this fork. In addition, an `index.d.ts` file has been added (copied directly from [`@types/upng-js`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/upng-js/index.d.ts)) to makes TypeScript definitions available without requiring additional packages to be installed.\n\n## Example of `UPNG.toRGBA8`\n```javascript\n// Import the UPNG class\nimport UPNG from '@pdf-lib/upng';\n\n// Create a UPNG object\nconst pngImage = UPNG.decode(/* Uint8Array containing bytes of PNG image */);\n\n// `pixels` is a 1D array (in rgba order) of decoded pixel data\nconst pixels = pngImage.UPNG.toRGBA8();\n```\n\n## Installation\n### NPM Module\nTo install the latest stable version:\n```bash\n# With npm\nnpm install --save @pdf-lib/upng\n\n# With yarn\nyarn add @pdf-lib/upng\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 `@pdf-lib/upng` 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 `