{"name":"resize-img","version":"1.0.0","description":"Resize PNG images in memory","license":"MIT","repository":{"type":"git","url":"git+https://github.com/kevva/resize-img.git"},"author":{"name":"Kevin Martensson","email":"kevinmartensson@gmail.com","url":"github.com/kevva"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["fast","image","memory","png","resize"],"dependencies":{"get-stream":"^2.0.0","jimp":"^0.2.21","parse-png":"^1.1.1"},"devDependencies":{"ava":"*","image-size":"^0.5.0","pify":"^2.3.0","xo":"*"},"gitHead":"120a2513acc1f4822fcb68d19dfabbd260f52888","bugs":{"url":"https://github.com/kevva/resize-img/issues"},"homepage":"https://github.com/kevva/resize-img#readme","_id":"resize-img@1.0.0","_shasum":"202d31464e4e0be9342f87a8fd47efe1266d89c7","_from":".","_npmVersion":"3.7.0","_nodeVersion":"5.10.1","_npmUser":{"name":"kevva","email":"kevinmartensson@gmail.com"},"dist":{"shasum":"202d31464e4e0be9342f87a8fd47efe1266d89c7","tarball":"http://registry-npm.ywwl.com/resize-img/download/resize-img-1.0.0.tgz","integrity":"sha512-qK4Wc1yruenraJ+LGDcwyecp4QGacL1+yWJYPF1tPpddkmHvY7Rz0boA/SO/kmsDyd25dfXMLKVqS2rz9bTFEA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGDIAjAAeE3PFClR5lSiKw/bVV9GVvIm5DLI/GzCjAtKAiEAqYAZuT4sJ1GZJ0EpYrDcYOH16V2KoajB9xsXCKbPJYw="}],"size":1890,"noattachment":false,"key":"/resize-img/-/resize-img-1.0.0.tgz"},"maintainers":[{"name":"kevva","email":"kevinmartensson@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/resize-img-1.0.0.tgz_1460995647604_0.7029371890239418"},"directories":{},"readme":"# resize-img [![Build Status](https://travis-ci.org/kevva/resize-img.svg?branch=master)](https://travis-ci.org/kevva/resize-img)\n\n> Resize images in memory\n\n\n## Install\n\n```\n$ npm install resize-img\n```\n\n\n## Usage\n\n```js\nconst fs = require('fs');\nconst resizeImg = require('resize-img');\n\n(async () => {\n\tconst image = await resizeImg(fs.readFileSync('unicorn.png'), {\n\t\twidth: 128,\n\t\theight: 128\n\t});\n\n\tfs.writeFileSync('unicorn-128x128.png', image);\n})();\n```\n\n\n## API\n\n### resizeImg(buffer, options)\n\nReturns a `Promise<Buffer>` with the resized image.\n\n#### buffer\n\nType: `Buffer`\n\nAn image buffer. Supported formats are `bmp`, `jpg` and `png`.\n\n#### options\n\nType: `Object`\n\n##### width\n\nType: `number`\n\nDesired width of the target image.\n\n##### height\n\nType: `number`\n\nDesired height of the target image.\n\n##### format\n\nType: `string`\n\nThe output file format for the target image. Supported formats are `bmp`, `jpg` and `png`.\n\n\n## Related\n\n* [resize-img-cli](https://github.com/kevva/resize-img-cli) - CLI for this module.\n","publish_time":1460995649098,"_cnpm_publish_time":1460995649098,"dist-tags":{"latest":"2.0.0"}}