{"name":"resize-img","version":"1.1.1","description":"Resize 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":["bmp","fast","image","jpeg","jpg","memory","png","resize"],"dependencies":{"bmp-js":"0.0.1","file-type":"^3.8.0","get-stream":"^2.0.0","jimp":"^0.2.21","jpeg-js":"^0.1.1","parse-png":"^1.1.1"},"devDependencies":{"ava":"*","image-size":"^0.5.0","pify":"^2.3.0","xo":"*"},"gitHead":"4958acc7f8004b435e21bbc707ad5e60dee0db1b","bugs":{"url":"https://github.com/kevva/resize-img/issues"},"homepage":"https://github.com/kevva/resize-img#readme","_id":"resize-img@1.1.1","_shasum":"5eeb8f53581a0be2708eec84dd537bed94902122","_from":".","_npmVersion":"3.10.6","_nodeVersion":"5.11.1","_npmUser":{"name":"kevva","email":"kevinmartensson@gmail.com"},"dist":{"shasum":"5eeb8f53581a0be2708eec84dd537bed94902122","tarball":"http://registry-npm.ywwl.com/resize-img/download/resize-img-1.1.1.tgz","integrity":"sha512-nZBEmjE5mM2gFcjtyjF2gJKmLG76uWSK7AMqedC+jqR5TfuvM1edgpW7BMQQg9VP3GhkFWKvWx3oOIaWl8/YdQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCXnL/sJwhfI++v3HezVQHeIRJrUSam3+rzdJ76kxgp8QIgSDQopnu4jbziSvMmtvRmHeBy3yqAg4JwYJoelEGlJeg="}],"size":2184,"noattachment":false,"key":"/resize-img/-/resize-img-1.1.1.tgz"},"maintainers":[{"name":"kevva","email":"kevinmartensson@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/resize-img-1.1.1.tgz_1473804316802_0.28372273221611977"},"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":1473804317479,"_cnpm_publish_time":1473804317479,"dist-tags":{"latest":"2.0.0"}}