{"name":"resize-img","version":"1.1.0","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":"174d9adee1a0f24c95e83a123a63e21ee4558d89","bugs":{"url":"https://github.com/kevva/resize-img/issues"},"homepage":"https://github.com/kevva/resize-img#readme","_id":"resize-img@1.1.0","_shasum":"f4a5be3d784e0d89dd83f6fa7a17cb615f31d019","_from":".","_npmVersion":"3.7.0","_nodeVersion":"5.10.1","_npmUser":{"name":"kevva","email":"kevinmartensson@gmail.com"},"dist":{"shasum":"f4a5be3d784e0d89dd83f6fa7a17cb615f31d019","tarball":"http://registry-npm.ywwl.com/resize-img/download/resize-img-1.1.0.tgz","integrity":"sha512-9lUK4W4yHHI91PztJKqtj8VFyoX62Ex86VxqzANWkKJRJ272KWiB3rlxBpA7TsuZj5vkmM8bV6e3PE5vfCeyYg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICUHb9vf20WQGzTBKgw1lbeXpd64qyXeSt2HxoiVtlwxAiEAh1IhD/rBBUMNfrnwYOgBqdVypMMv1TncQTNpcN8YCPk="}],"size":2139,"noattachment":false,"key":"/resize-img/-/resize-img-1.1.0.tgz"},"maintainers":[{"name":"kevva","email":"kevinmartensson@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/resize-img-1.1.0.tgz_1461014293304_0.60683803120628"},"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":1461014294755,"_cnpm_publish_time":1461014294755,"dist-tags":{"latest":"2.0.0"}}