{"_id":"parse-png","_rev":"357700","name":"parse-png","description":"Parse a PNG","dist-tags":{"latest":"2.1.0"},"maintainers":[{"name":"kevva","email":""}],"time":{"modified":"2021-07-13T08:39:08.000Z","created":"2016-04-18T07:49:06.534Z","2.1.0":"2019-09-18T13:38:02.885Z","2.0.0":"2019-09-18T12:39:51.953Z","1.1.2":"2017-05-19T11:32:11.579Z","1.1.1":"2016-04-18T15:41:50.657Z","1.1.0":"2016-04-18T15:28:43.322Z","1.0.0":"2016-04-18T07:49:06.534Z"},"users":{"hintss":true,"mojaray2k":true},"author":{"name":"Kevin Martensson","email":"kevinmartensson@gmail.com","url":"github.com/kevva"},"repository":{"type":"git","url":"git+https://github.com/kevva/parse-png.git"},"versions":{"2.1.0":{"name":"parse-png","version":"2.1.0","description":"Parse a PNG","license":"MIT","repository":{"type":"git","url":"git+https://github.com/kevva/parse-png.git"},"author":{"name":"Kevin Martensson","email":"kevinmartensson@gmail.com","url":"github.com/kevva"},"engines":{"node":">=10"},"scripts":{"test":"xo && ava && tsd"},"keywords":["parse","png","promise"],"dependencies":{"pngjs":"^3.3.0"},"devDependencies":{"@types/node":"^12.7.5","@types/pngjs":"^3.3.2","ava":"^2.4.0","file-type":"^7.2.0","get-stream":"^3.0.0","tsd":"^0.7.4","xo":"^0.24.0"},"gitHead":"16eb14da0e39fb3b0508baa782cf04a59e6ec158","bugs":{"url":"https://github.com/kevva/parse-png/issues"},"homepage":"https://github.com/kevva/parse-png#readme","_id":"parse-png@2.1.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"shasum":"2a42ad719fedf90f81c59ebee7ae59b280d6b338","size":2085,"noattachment":false,"key":"/parse-png/-/parse-png-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/parse-png/download/parse-png-2.1.0.tgz"},"maintainers":[{"name":"kevva","email":""}],"_npmUser":{"name":"kevva","email":"kevinmartensson@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parse-png_2.1.0_1568813882668_0.9962606155890039"},"_hasShrinkwrap":false,"publish_time":1568813882885,"_cnpm_publish_time":1568813882885},"2.0.0":{"name":"parse-png","version":"2.0.0","description":"Parse a PNG","license":"MIT","repository":{"type":"git","url":"git+https://github.com/kevva/parse-png.git"},"author":{"name":"Kevin Martensson","email":"kevinmartensson@gmail.com","url":"github.com/kevva"},"engines":{"node":">=10"},"scripts":{"test":"xo && ava"},"keywords":["parse","png","promise"],"dependencies":{"pngjs":"^3.3.0"},"devDependencies":{"ava":"^2.4.0","file-type":"^7.2.0","get-stream":"^3.0.0","xo":"^0.24.0"},"gitHead":"aa5c38773dcab6f60c24f75bb258d800caddc148","bugs":{"url":"https://github.com/kevva/parse-png/issues"},"homepage":"https://github.com/kevva/parse-png#readme","_id":"parse-png@2.0.0","_nodeVersion":"12.10.0","_npmVersion":"6.10.3","dist":{"shasum":"8999397d9afc17c247b66180ac60683f2cef8295","size":1843,"noattachment":false,"key":"/parse-png/-/parse-png-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/parse-png/download/parse-png-2.0.0.tgz"},"maintainers":[{"name":"kevva","email":""}],"_npmUser":{"name":"kevva","email":"kevinmartensson@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parse-png_2.0.0_1568810391763_0.6281505486555494"},"_hasShrinkwrap":false,"publish_time":1568810391953,"_cnpm_publish_time":1568810391953},"1.1.2":{"name":"parse-png","version":"1.1.2","description":"Parse a PNG","license":"MIT","repository":{"type":"git","url":"git+https://github.com/kevva/parse-png.git"},"author":{"name":"Kevin Martensson","email":"kevinmartensson@gmail.com","url":"github.com/kevva"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["parse","png","promise"],"dependencies":{"pngjs":"^3.2.0"},"devDependencies":{"ava":"*","file-type":"^4.3.0","get-stream":"^3.0.0","pify":"^2.3.0","xo":"*"},"xo":{"esnext":true},"gitHead":"9ae868b40c65b6da37005c165ee9de2cc0ff26fe","bugs":{"url":"https://github.com/kevva/parse-png/issues"},"homepage":"https://github.com/kevva/parse-png#readme","_id":"parse-png@1.1.2","_shasum":"f5c2ad7c7993490986020a284c19aee459711ff2","_from":".","_npmVersion":"4.6.1","_nodeVersion":"4.5.0","_npmUser":{"name":"kevva","email":"kevinmartensson@gmail.com"},"dist":{"shasum":"f5c2ad7c7993490986020a284c19aee459711ff2","size":1898,"noattachment":false,"key":"/parse-png/-/parse-png-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/parse-png/download/parse-png-1.1.2.tgz"},"maintainers":[{"name":"kevva","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/parse-png-1.1.2.tgz_1495193530640_0.7943963864818215"},"directories":{},"publish_time":1495193531579,"_hasShrinkwrap":false,"_cnpm_publish_time":1495193531579},"1.1.1":{"name":"parse-png","version":"1.1.1","description":"Parse a PNG","license":"MIT","repository":{"type":"git","url":"git+https://github.com/kevva/parse-png.git"},"author":{"name":"Kevin Martensson","email":"kevinmartensson@gmail.com","url":"github.com/kevva"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["parse","png","promise"],"dependencies":{"pngjs":"^2.2.0"},"devDependencies":{"ava":"*","file-type":"^3.8.0","get-stream":"^2.0.0","pify":"^2.3.0","xo":"*"},"xo":{"esnext":true},"gitHead":"422a83986f8aaa558525a42da0be4853e32b17b3","bugs":{"url":"https://github.com/kevva/parse-png/issues"},"homepage":"https://github.com/kevva/parse-png#readme","_id":"parse-png@1.1.1","_shasum":"0633f18e0e674dbcddf9f3d74f7df6aed8312418","_from":".","_npmVersion":"3.7.0","_nodeVersion":"5.10.1","_npmUser":{"name":"kevva","email":"kevinmartensson@gmail.com"},"dist":{"shasum":"0633f18e0e674dbcddf9f3d74f7df6aed8312418","size":1840,"noattachment":false,"key":"/parse-png/-/parse-png-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/parse-png/download/parse-png-1.1.1.tgz"},"maintainers":[{"name":"kevva","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/parse-png-1.1.1.tgz_1460994108016_0.657204573508352"},"directories":{},"publish_time":1460994110657,"_cnpm_publish_time":1460994110657,"_hasShrinkwrap":false},"1.1.0":{"name":"parse-png","version":"1.1.0","description":"Parse a PNG","license":"MIT","repository":{"type":"git","url":"git+https://github.com/kevva/parse-png.git"},"author":{"name":"Kevin Martensson","email":"kevinmartensson@gmail.com","url":"github.com/kevva"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["parse","png","promise"],"dependencies":{"pngjs":"^2.2.0"},"devDependencies":{"ava":"*","file-type":"^3.8.0","get-stream":"^2.0.0","pify":"^2.3.0","xo":"*"},"xo":{"esnext":true},"gitHead":"547258f5d6ce41a5b28c81eb207b0dc5d9b4bfb8","bugs":{"url":"https://github.com/kevva/parse-png/issues"},"homepage":"https://github.com/kevva/parse-png#readme","_id":"parse-png@1.1.0","_shasum":"95ec39f700627f20b360cd5cd4b95a043cb80de3","_from":".","_npmVersion":"3.7.0","_nodeVersion":"5.10.1","_npmUser":{"name":"kevva","email":"kevinmartensson@gmail.com"},"dist":{"shasum":"95ec39f700627f20b360cd5cd4b95a043cb80de3","size":1879,"noattachment":false,"key":"/parse-png/-/parse-png-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/parse-png/download/parse-png-1.1.0.tgz"},"maintainers":[{"name":"kevva","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/parse-png-1.1.0.tgz_1460993321967_0.44699940690770745"},"directories":{},"publish_time":1460993323322,"_cnpm_publish_time":1460993323322,"_hasShrinkwrap":false},"1.0.0":{"name":"parse-png","version":"1.0.0","description":"Parse a PNG","license":"MIT","repository":{"type":"git","url":"git+https://github.com/kevva/parse-png.git"},"author":{"name":"Kevin Martensson","email":"kevinmartensson@gmail.com","url":"github.com/kevva"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["parse","png","promise"],"dependencies":{"pngjs":"^2.2.0"},"devDependencies":{"ava":"*","pify":"^2.3.0","xo":"*"},"xo":{"esnext":true},"gitHead":"4694d400f0192e210c53c9418b8ae3d0e9e69ea3","bugs":{"url":"https://github.com/kevva/parse-png/issues"},"homepage":"https://github.com/kevva/parse-png#readme","_id":"parse-png@1.0.0","_shasum":"fca2173a27082f47e5242a04f20ede2291f6508a","_from":".","_npmVersion":"3.7.0","_nodeVersion":"5.10.1","_npmUser":{"name":"kevva","email":"kevinmartensson@gmail.com"},"dist":{"shasum":"fca2173a27082f47e5242a04f20ede2291f6508a","size":1773,"noattachment":false,"key":"/parse-png/-/parse-png-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/parse-png/download/parse-png-1.0.0.tgz"},"maintainers":[{"name":"kevva","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/parse-png-1.0.0.tgz_1460965745424_0.39005028433166444"},"directories":{},"publish_time":1460965746534,"_cnpm_publish_time":1460965746534,"_hasShrinkwrap":false}},"readme":"# parse-png [![Build Status](https://travis-ci.org/kevva/parse-png.svg?branch=master)](https://travis-ci.org/kevva/parse-png)\n\n> Parse a PNG\n\n\n## Install\n\n```\n$ npm install parse-png\n```\n\n\n## Usage\n\n```js\nconst fs = require('fs');\nconst parsePng = require('parse-png');\n\n(async () => {\n\tconst png = await parsePng(fs.readFileSync('unicorn.png'));\n\n\tconsole.log(png);\n\t/*\n\t{\n\t\twidth: 200,\n\t\theight: 133,\n\t\tdepth: 8,\n\t\tinterlace: false,\n\t\tpalette: false,\n\t\tcolor: true,\n\t\talpha: false,\n\t\tbpp: 3,\n\t\tcolorType: 2,\n\t\tdata: <Buffer 29 48 4d ...>,\n\t}\n\t*/\n\n\tpng.adjustGamma();\n\tpng.pack().pipe(fs.createWriteStream('unicorn-adjusted.png'));\n})();\n```\n\n\n## API\n\n### parsePng(buffer, options?)\n\nReturns a `Promise<Object>` with a PNG instance. See the [pngjs documentation](https://github.com/lukeapage/pngjs#async-api) for more information.\n\n#### buffer\n\nType: `Buffer`\n\nA PNG image buffer.\n\n#### options\n\nType: `Object`\n\nSee the [pngjs options](https://github.com/lukeapage/pngjs#options).\n","_attachments":{},"homepage":"https://github.com/kevva/parse-png#readme","bugs":{"url":"https://github.com/kevva/parse-png/issues"},"license":"MIT"}