{"name":"resize-img","version":"1.1.2","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":"42dd586e74d8f56a14f2737aa9dbea9b43fbd08b","bugs":{"url":"https://github.com/kevva/resize-img/issues"},"homepage":"https://github.com/kevva/resize-img#readme","_id":"resize-img@1.1.2","_shasum":"fad650faf3ef2c53ea63112bc272d95e9d92550e","_from":".","_npmVersion":"3.10.6","_nodeVersion":"6.9.1","_npmUser":{"name":"kevva","email":"kevinmartensson@gmail.com"},"dist":{"shasum":"fad650faf3ef2c53ea63112bc272d95e9d92550e","tarball":"http://registry-npm.ywwl.com/resize-img/download/resize-img-1.1.2.tgz","integrity":"sha512-/4nKUmuNPuM6gYTWad136ica81baOVjpesgv8FGaIvP0KWcbCWahOWBKaM4tFoM+aVcSA+qQDg28pcnIzFRpJw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+qnDWMXRMdbVU6LfkpkpOFZIBOLAptB5V3p9nhascgQIgWFLbd/meSLWBiJEX38Am8FCpsLxPVEb7GiHgXt9YX+c="}],"size":2193,"noattachment":false,"key":"/resize-img/-/resize-img-1.1.2.tgz"},"maintainers":[{"name":"kevva","email":"kevinmartensson@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/resize-img-1.1.2.tgz_1477904442711_0.11141711170785129"},"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":1477904444536,"_cnpm_publish_time":1477904444536,"dist-tags":{"latest":"2.0.0"}}