{"_id":"@asandmann/png","_rev":"5-d5edd44a8843a31759f053cd06073935","name":"@asandmann/png","dist-tags":{"latest":"0.0.6"},"versions":{"0.0.1":{"name":"@asandmann/png","version":"0.0.1","keywords":["png","nodejs","performance"],"author":{"name":"acsandmann"},"license":"GPL-3.0-or-later","_id":"@asandmann/png@0.0.1","maintainers":[{"name":"asandmann","email":"asandmann@icloud.com"}],"dist":{"shasum":"6b4b992bc1affff20b2a0f4057a230f210de0e78","tarball":"https://registry.npmjs.org/@asandmann/png/-/png-0.0.1.tgz","fileCount":6,"integrity":"sha512-yDXvZsHSFCmZjJhdLIoqXPy5i1SAPgYg+L68KN351e9+EKT7CsmO8DgAQiPCvHguCw78bwrrl/q4sWthYQS9Sw==","signatures":[{"sig":"MEYCIQCEHUOD1E2e4zY8qnxK+uZ5//4suCRdhu4Jh/Y3yD5AyAIhAK/mgWbuUZCpjvoNijzupC5GXdXFqF+C0ktBACrSNEdX","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42669},"main":"src/index.js","type":"module","gitHead":"486a6779b5cc7d162accdde217a0bfdb2598d8bc","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"asandmann","email":"asandmann@icloud.com"},"_npmVersion":"10.7.0","description":"png encoder in javascript","directories":{},"_nodeVersion":"22.2.0","_hasShrinkwrap":false,"devDependencies":{"mitata":"^1.0.10","@asandmann/font":"^0.0.2"},"_npmOperationalInternal":{"tmp":"tmp/png_0.0.1_1728919355218_0.23127875212480653","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"@asandmann/png","version":"0.0.2","keywords":["png","nodejs","performance"],"author":{"name":"acsandmann"},"license":"GPL-3.0-or-later","_id":"@asandmann/png@0.0.2","maintainers":[{"name":"asandmann","email":"asandmann@icloud.com"}],"dist":{"shasum":"0ea690d460a8e22ab3c39af1a2e324778ea688a9","tarball":"https://registry.npmjs.org/@asandmann/png/-/png-0.0.2.tgz","fileCount":6,"integrity":"sha512-2Dskdp1PegMp188zAEXpH1tgtAcMGiqKnqVGakJlUlAhO0MEZu3BQAXwYVbI30JrxVU8PXBT9KzcPpT8OFfElg==","signatures":[{"sig":"MEQCIA7HkLtOa910eq+lPFwhEtE8pgYQzzI5DiV9OeSFkDL3AiAFp4uCLoyxHi5+kb05VfFrYpbDv2RdRD7gYon0Gm7hwA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42774},"main":"src/index.js","type":"module","gitHead":"3af8c630fed41c103d82834e4eeb94cca82ce272","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"asandmann","email":"asandmann@icloud.com"},"_npmVersion":"10.7.0","description":"png encoder in javascript","directories":{},"_nodeVersion":"22.2.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/png_0.0.2_1728920073628_0.04428461666443795","host":"s3://npm-registry-packages"}},"0.0.3":{"name":"@asandmann/png","version":"0.0.3","keywords":["png","nodejs","performance","library"],"author":{"name":"acsandmann"},"license":"GPL-3.0-or-later","_id":"@asandmann/png@0.0.3","maintainers":[{"name":"asandmann","email":"asandmann@icloud.com"}],"homepage":"https://github.com/acsandmann/png#readme","bugs":{"url":"https://github.com/acsandmann/png/issues"},"dist":{"shasum":"7a789f689448830c11dc60241ec353aeb7109248","tarball":"https://registry.npmjs.org/@asandmann/png/-/png-0.0.3.tgz","fileCount":7,"integrity":"sha512-W0mNkFbUFCIbN8elDceI46AxxG9GlNbUlJqH+OWx+CBcwST5rCkZuaKLgSYqNjB81tQQvqdpdd02Iy241W1g+g==","signatures":[{"sig":"MEUCIQC38XhZwuSGcb6iAQhg2+cH/ql0kY6iGXaVIqnI60EiKgIgYuBwYUEFOp/m3oGmsw9LPEjIOPB6i/bBpxuek80kz2w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":43931},"main":"src/index.js","type":"module","types":"src/index.d.ts","gitHead":"e9847bbd2a7c2e199b03aeaf608d9f44434d2749","_npmUser":{"name":"asandmann","email":"asandmann@icloud.com"},"repository":{"url":"git+https://github.com/acsandmann/png.git","type":"git"},"_npmVersion":"10.7.0","description":"png encoder in javascript","directories":{},"_nodeVersion":"22.2.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/png_0.0.3_1728920433732_0.3462482619208709","host":"s3://npm-registry-packages"}},"0.0.4":{"name":"@asandmann/png","version":"0.0.4","keywords":["png","nodejs","performance","library"],"author":{"name":"acsandmann"},"license":"GPL-3.0-or-later","_id":"@asandmann/png@0.0.4","maintainers":[{"name":"asandmann","email":"asandmann@icloud.com"}],"homepage":"https://github.com/acsandmann/png#readme","bugs":{"url":"https://github.com/acsandmann/png/issues"},"dist":{"shasum":"33e766b91b9ad5d3a0cd554a6e373e1e5591c51b","tarball":"https://registry.npmjs.org/@asandmann/png/-/png-0.0.4.tgz","fileCount":7,"integrity":"sha512-mWfnLSu9jE2ZLGhW8vvQERQD5gTItclfbEE3Rbh1U4HE1tcnTy9Jf9tkNHiwPt7XSTRq+H3egmTbkYNUjSxhiA==","signatures":[{"sig":"MEYCIQD14yEHK4VmsZ+nPt2OrmThuTPCQhDs/VxqPOIwr3sYmwIhALJ6uSJr3D7aP/x79P5KPt8NpXa/Y145n/LgCZwPg9yd","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":44008},"main":"src/index.js","type":"module","types":"src/index.d.ts","gitHead":"e9847bbd2a7c2e199b03aeaf608d9f44434d2749","_npmUser":{"name":"asandmann","email":"asandmann@icloud.com"},"repository":{"url":"git+https://github.com/acsandmann/png.git","type":"git"},"_npmVersion":"10.7.0","description":"png encoder in javascript","directories":{},"_nodeVersion":"22.2.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/png_0.0.4_1728920574543_0.7497795886471463","host":"s3://npm-registry-packages"}},"0.0.5":{"name":"@asandmann/png","version":"0.0.5","keywords":["png","nodejs","performance","library"],"author":{"name":"acsandmann"},"license":"GPL-3.0-or-later","_id":"@asandmann/png@0.0.5","maintainers":[{"name":"asandmann","email":"asandmann@icloud.com"}],"homepage":"https://github.com/acsandmann/png#readme","bugs":{"url":"https://github.com/acsandmann/png/issues"},"dist":{"shasum":"2039541e796617f7b4a5f95a6ba791b8ffa7aee5","tarball":"https://registry.npmjs.org/@asandmann/png/-/png-0.0.5.tgz","fileCount":7,"integrity":"sha512-G9I7sckJyxErNkalrOoPdUUsckrrhePd8d2mlwO/w7GzxUtPxVlIPoNqZkRANDqktf1CLvrEXXS2+gm9zBh0Dw==","signatures":[{"sig":"MEUCIHX8Tl40Oz8YNEOyzY0ElWV/4w7Er/n9Q/s9aiaYt6T4AiEApUmgYRNrg8nFEEdZ0oaWohHwHaHnbh5qRp01lJepYKo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":69652},"main":"src/index.js","type":"module","types":"src/index.d.ts","gitHead":"2ca5d4bdf67baa9cc4a5a3eaa42de120c0d8bf72","_npmUser":{"name":"asandmann","email":"asandmann@icloud.com"},"repository":{"url":"git+https://github.com/acsandmann/png.git","type":"git"},"_npmVersion":"10.7.0","description":"png encoder in javascript","directories":{},"_nodeVersion":"22.2.0","_hasShrinkwrap":false,"devDependencies":{"fflate":"^0.8.2","imagescript":"^1.3.0"},"_npmOperationalInternal":{"tmp":"tmp/png_0.0.5_1729014520616_0.4098254581977967","host":"s3://npm-registry-packages"}},"0.0.6":{"name":"@asandmann/png","version":"0.0.6","description":"png encoder in javascript","main":"src/index.js","types":"src/index.d.ts","keywords":["png","nodejs","performance","library"],"author":{"name":"acsandmann"},"license":"GPL-3.0-or-later","type":"module","homepage":"https://github.com/acsandmann/png#readme","bugs":{"url":"https://github.com/acsandmann/png/issues"},"repository":{"type":"git","url":"git+https://github.com/acsandmann/png.git"},"_id":"@asandmann/png@0.0.6","gitHead":"62e70cf173581fa30e1ba63d9953b5eb82f42210","_nodeVersion":"22.2.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-sMBluFQaHuhHMp6F6cqcLliCjPQxyRMjjXErxpCCkXzngMQID9K0/wcFg+A3ik2rEqanNIBwvoO8N+Jrc+e/SQ==","shasum":"1f52fa7308810985685c605635b081459252ee3f","tarball":"https://registry.npmjs.org/@asandmann/png/-/png-0.0.6.tgz","fileCount":7,"unpackedSize":69572,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH0YE+VrhIF58GdbyIbYVTRVJP/xqvTmKt4+CikUyanVAiEA6Xb+ThkkSW1glmDFTqgo3/Nnb15FZFxkPtiBYcz5VHE="}]},"_npmUser":{"name":"asandmann","email":"asandmann@icloud.com"},"directories":{},"maintainers":[{"name":"asandmann","email":"asandmann@icloud.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/png_0.0.6_1729031287664_0.8570941033480406"},"_hasShrinkwrap":false}},"time":{"created":"2024-10-14T15:22:35.111Z","modified":"2024-10-15T22:28:08.047Z","0.0.1":"2024-10-14T15:22:35.427Z","0.0.2":"2024-10-14T15:34:33.817Z","0.0.3":"2024-10-14T15:40:33.972Z","0.0.4":"2024-10-14T15:42:54.710Z","0.0.5":"2024-10-15T17:48:40.882Z","0.0.6":"2024-10-15T22:28:07.865Z"},"bugs":{"url":"https://github.com/acsandmann/png/issues"},"author":{"name":"acsandmann"},"license":"GPL-3.0-or-later","homepage":"https://github.com/acsandmann/png#readme","keywords":["png","nodejs","performance","library"],"repository":{"type":"git","url":"git+https://github.com/acsandmann/png.git"},"description":"png encoder in javascript","maintainers":[{"name":"asandmann","email":"asandmann@icloud.com"}],"readme":"### **@asandmann/png**\n\n[![npm bundle size](https://img.shields.io/bundlephobia/minzip/%40asandmann%2Fpng)][npm-url]\n[![NPM Version](https://img.shields.io/npm/v/%40asandmann%2Fpng?style=flat-square)][npm-url]\n\n[npm-url]: https://www.npmjs.com/package/@asandmann/png\n\nA zero-depencency, performant, and simple png encoder written in pure javascript.\n\n---\n\n```bash\nnpm install @asandmann/png\n```\n\n---\n\n#### **API Reference**\n\n##### **encode(data, options)**\n\nEncodes the raw image data into PNG format.\n\n- **Parameters:**\n  - `data` (`Uint8Array`): The raw pixel data of the image.\n  - `options` (`Object`): An object with the following properties:\n    - `width` (`number`): The width of the image.\n    - `height` (`number`): The height of the image.\n    - `channels` (`number`): The number of color channels (e.g., 3 for RGB, 4 for RGBA).\n    - `depth` (`number`, optional): The bit depth of the image. Default is 8 bits per channel.\n\n- **Returns:**\n  - `Uint8Array`: A buffer containing the PNG-encoded image.\n\n---\n\n#### Credits\n\nSome ideas taken from [imagescript](https://github.com/matmen/ImageScript/blob/master/png/src/png.mjs) and zlib implementation is from [fflate](https://github.com/101arrowz/fflate)","readmeFilename":"README.md"}