{"name":"resize-img","version":"2.0.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":">=10"},"scripts":{"test":"xo && ava"},"keywords":["bmp","fast","image","jpeg","jpg","memory","png","resize"],"dependencies":{"file-type":"^12.3.0","jimp":"^0.8.3"},"devDependencies":{"ava":"^2.4.0","image-size":"^0.8.1","xo":"^0.24.0"},"gitHead":"c040cc4f72185d4c51121298c005cadb54bab85f","bugs":{"url":"https://github.com/kevva/resize-img/issues"},"homepage":"https://github.com/kevva/resize-img#readme","_id":"resize-img@2.0.0","_nodeVersion":"12.10.0","_npmVersion":"6.11.2","dist":{"integrity":"sha512-im2Kn4CY0c7JGdYXwL7g77T8AUi15YQeEBmmpWuglrcPFq4Di53tIvLXlbasW7UKed9GaZCza/OSxOJrmB0jbg==","shasum":"9194e2647973b1a7f45a0a72edc87af982a25128","tarball":"http://registry-npm.ywwl.com/resize-img/download/resize-img-2.0.0.tgz","fileCount":4,"unpackedSize":3919,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdg47uCRA9TVsSAnZWagAAxqkQAIA+TECdftdk4/drkUH0\nd4sN8dLJcVKnjrlIm6NM8QE3D77S3l1+SlvtvEdQd9K6U6ky6Z/0k8e01/OL\nWRRptgiZijeo+l5QCutNnu4/wfxS6zIoE7I13cKA7pHZzJTtUiD1eeRpQf6X\nNbM+MpJXMQoJD+NgjnnPyeCMvqkuJnb7ypEfIjtfrYwoXidgTtSxpBnyBC19\nATGPzYFEyvwnpNoZqmiztjliUp2fPShZqt3VUKUJX2K1u8Phz5rbugGiKJwQ\nUNUtB7pzPB9eitHcJUP1WLZ/Urgsbu0OrqLllLOVelRnxl5zhs4cx6L6Vhv2\n3JKpyaFYfXgQsNgjj+9FYGXTBcSpSOasm9tWuU3H3zC2tWkxqzHJWk5r9RjJ\niVWfhcz01oSjnc01tHlfS8yUF1L2cRCpdWyU3GH7NDvqZGluLaG6wqb2FbHI\n7fAN7ycZBmo5pis0RXUdHEpWIbw4/Qd1OcMT9b1qAhGNQWzNhEHBBsg6Se5u\nGhIgpOdvl6mKfWsF/vnilinDNQs56QMU7fZMP0yz+RWoPRXjPAW8KwVUNXAF\ntZMF7ZwZY/OoFMjGWnk+eI8DwinVAkC5w9POqrkYMOBLuWwCx9L+0zZhGU+R\nx8oR+2vcZmJbznDae3kzPy7+/NfgmphVRWtLsRcCaxMEhuCKlfwhtvDUI/aV\nzdII\r\n=LrW1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCyVBEgGepOMyr9c6AAckGhJx1luvOp3bC290D2caZtEAIhANgbfIbXGjUuGXCvgxpCClCsY/V52ACoKPtwLPWEHEhR"}],"size":2032,"noattachment":false,"key":"/resize-img/-/resize-img-2.0.0.tgz"},"maintainers":[{"name":"kevva","email":"kevinmartensson@gmail.com"}],"_npmUser":{"name":"kevva","email":"kevinmartensson@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/resize-img_2.0.0_1568902893758_0.37435471407727405"},"_hasShrinkwrap":false,"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":1568902894225,"_cnpm_publish_time":1568902894225,"dist-tags":{"latest":"2.0.0"}}