{"name":"fast-png","version":"0.0.3","author":{"name":"Michaël Zasso"},"license":"MIT","_id":"fast-png@0.0.3","maintainers":[{"name":"targos","email":"targos@live.com"}],"homepage":"https://github.com/image-js/png-js#readme","bugs":{"url":"https://github.com/image-js/png-js/issues"},"dist":{"shasum":"dc53af2452f462d4552b076aaaeddaa182d6f332","tarball":"http://registry-npm.ywwl.com/fast-png/download/fast-png-0.0.3.tgz","integrity":"sha512-+KNrEnTC9EV8ltHp2f9f0Md41FV8QaKZB1Wzh5TtSjBKbHQlsZOjxd4JmdbgTyytQ507jWrIinui+d3T3NQIig==","signatures":[{"sig":"MEQCIA7qj1NSLUmadbdVTVn3WpBD5CA4bcq6hhyBt2ip2dBUAiA6CKFqnO/F1AXwTj1GHXx2FXhymzglfD3CuDbbcNsKXA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"size":3408,"noattachment":false,"key":"/fast-png/-/fast-png-0.0.3.tgz"},"main":"src/index.js","_from":".","_shasum":"dc53af2452f462d4552b076aaaeddaa182d6f332","gitHead":"cd7ca28763463041d3b055966b649dbedbf25709","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"targos","email":"targos@live.com"},"repository":{"url":"git+https://github.com/image-js/png-js.git","type":"git"},"_npmVersion":"3.3.4","description":"PNG image decoder written entirely in JavaScript","directories":{},"_nodeVersion":"4.1.1","dependencies":{"pako":"^0.2.8","iobuffer":"^1.0.4"},"readme":"<h3 align=\"center\">\n  <a href=\"https://www.zakodium.com\">\n    <img src=\"https://www.zakodium.com/brand/zakodium-logo-white.svg\" width=\"50\" alt=\"Zakodium logo\" />\n  </a>\n  <p>\n    Maintained by <a href=\"https://www.zakodium.com\">Zakodium</a>\n  </p>\n</h3>\n\n# fast-png\n\n[![NPM version](https://img.shields.io/npm/v/fast-png.svg)](https://www.npmjs.com/package/fast-png)\n[![npm download](https://img.shields.io/npm/dm/fast-png.svg)](https://www.npmjs.com/package/fast-png)\n[![test coverage](https://img.shields.io/codecov/c/github/image-js/fast-png.svg)](https://codecov.io/gh/image-js/fast-png)\n[![license](https://img.shields.io/npm/l/fast-png.svg)](https://github.com/image-js/fast-png/blob/main/LICENSE)\n\nPNG image decoder and encoder written entirely in JavaScript.\n\n## Installation\n\n```console\nnpm install fast-png\n```\n\n## API\n\n### [Complete API documentation](https://image-js.github.io/fast-png/)\n\n### `decode(png[, options])`\n\n#### Arguments\n\n- `png` - A TypedArray or Buffer that contains the PNG data.\n- `options` - An object of options\n\n#### Options\n\n- `checkCrc` - If set to `true`, the CRC will be checked for each chunk and an error will be thrown in case it's wrong (default: false).\n\n### `encode(image)`\n\n#### Arguments\n\n- `png` - An object representing the image. You can pass an ImageData from the Canvas API or an object with the following properties:\n  - `width` - The width of the image\n  - `height` - The height of the image\n  - `data` - An array or TypedArray with the image data\n  - `depth` - A number indicating the color depth (only 8 and 16 are supported now). Default: `8`.\n  - `channels` - Number of channels, including alpha (1, 2, 3 and 4 are supported). Default: `4`.\n  - `text` - An object with key-value pairs representing `tEXt` chunks. The keys must have less than 80 characters.\n    The keys and values must have only characters in the latin1 charset (maximum code point of 255).\n    Default: `undefined`.\n\n### `hasPngSignature(array)`\n\nReturns whether the array starts with the PNG signature (magic bytes).\n\n## PNG standard\n\nSpec can be found at: https://www.w3.org/TR/PNG/\n\n## License\n\n[MIT](./LICENSE)\n","publish_time":1443265358255,"_cnpm_publish_time":1443265358255,"dist-tags":{"latest":"8.0.0"}}