{"_id":"resize-image-buffer","_rev":"1-3106829445df916c1cdf6299e9d96cca","name":"resize-image-buffer","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"resize-image-buffer","version":"1.0.0","description":"Resize image buffer in memory","license":"MIT","repository":{"type":"git","url":"git+https://github.com/velusgautam/resize-image-buffer.git"},"author":{"name":"Velu S Gautam","email":"i@velusgautam.com","url":"https://github.com/velusgautam"},"main":"index.js","scripts":{"test":"ava"},"engines":{"node":">=10","npm":">=5"},"keywords":["fast","image","memory","resize","buffer","image buffer","bmp","jpeg","jpg","png"],"dependencies":{"file-type":"^14.6.2","jimp":"^0.14.0"},"devDependencies":{"ava":"^3.11.0","image-size":"^0.8.3"},"gitHead":"669ed60d5fd77a246e9b37950fcb015884dfd93f","bugs":{"url":"https://github.com/velusgautam/resize-image-buffer/issues"},"homepage":"https://github.com/velusgautam/resize-image-buffer#readme","_id":"resize-image-buffer@1.0.0","_nodeVersion":"12.18.3","_npmVersion":"6.14.6","dist":{"integrity":"sha512-JQ3+63D17LE9pCbLDaojw7+aUkAphOd5Dp+9Mn7hM0B/f/ceH3ae/yja//3NYcTuyQOS9DkcFXs7mpLVZgJ5ug==","shasum":"21a3946683eb409820ac124de0ff0266ae0d03a7","tarball":"https://registry.npmjs.org/resize-image-buffer/-/resize-image-buffer-1.0.0.tgz","fileCount":4,"unpackedSize":3944,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIARqCRA9TVsSAnZWagAADEcP/RJFFDlQV+bTUi2jA4/D\nChDkLWSybfXr2c5KY+NQHXNli7kzbkP9ppi0iRDuKn35DbL7wL8W7hCffZ/T\nsElouTJDlLYZD0/v6LnoB+kKd/3OxU3A/j+056J4ZX8QxLNPsDp3hPFiWIES\nR4l+x3wMpIvMuULkoK73Wq5sraTLh0CASWgu7IgnZ0BuwNcX/mlZRW/feP1x\n0fI/qEIxCRvp1nP4GHs0qO6oKLsUFGMCR0c5KcwDDkWt6hyFmCIUvUJ3/+eh\n1BfkmxRJ4TPUAZgKE8Zi976euoVVjrgI6433wnM10VHcbEONl3Dy6UHPV2te\nkTstctVI5F/9M30MeA1nmX4nEUocjN9z3RbgzoqNoietENevGiMfBNMuhce4\nc24Z/vlGzgk68SnSN+XuqOEI6USlYgXv4wu7IcX9zLnft1czmyBrEFf4TzsX\n8SPFUrixS4Q5f4KMt94fZjfC/lOSq6XUU3HwNm3hIsvoyRk46iRXI8KPFOau\nGuCLHo3pLdHOslV/uQiQYXN9w/bIJEhFE2/5aI5aPqL4Wh58Tj5CyQZznv3J\nopFK9cP2w0zSLEPhjER6XkrbdVgjvxo+k7x3zMC2monMO4QEU2W/ivw1/yzc\ncuppLCiPrOVTvYWBz+CXrrGtJZP5Tgjsrm2q7DL1PqG3llsl9k1pKZrD+djk\nGMx0\r\n=N5lQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG/ewUozPl5rXYiZ/mBW1QJqYyb+zreW6/QXMgW+iXMlAiEA8W2VbflbW7Y5R2XvFqq5ZdYbqBIXUdleEx9/nqk7iFk="}]},"maintainers":[{"name":"velusgautam","email":"i@velusgautam.com"}],"_npmUser":{"name":"velusgautam","email":"i@velusgautam.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/resize-image-buffer_1.0.0_1595933802313_0.44266367066158097"},"_hasShrinkwrap":false}},"time":{"created":"2020-07-28T10:56:42.282Z","1.0.0":"2020-07-28T10:56:42.417Z","modified":"2022-05-15T21:03:30.611Z"},"maintainers":[{"name":"velusgautam","email":"i@velusgautam.com"}],"description":"Resize image buffer in memory","homepage":"https://github.com/velusgautam/resize-image-buffer#readme","keywords":["fast","image","memory","resize","buffer","image buffer","bmp","jpeg","jpg","png"],"repository":{"type":"git","url":"git+https://github.com/velusgautam/resize-image-buffer.git"},"author":{"name":"Velu S Gautam","email":"i@velusgautam.com","url":"https://github.com/velusgautam"},"bugs":{"url":"https://github.com/velusgautam/resize-image-buffer/issues"},"license":"MIT","readme":"> Resize images in memory\n\n## Install\n\n```\nnpm install resize-image-buffer\n\nyarn add resize-image-buffer\n```\n\n## Usage\n\n```js\nconst fs = require('fs');\nconst resizeImg = require('resize-image-buffer');\n\n(async () => {\n  const image = await resizeImg(fs.readFileSync('unicorn.png'), {\n    width: 128,\n    height: 128,\n  });\n\n  fs.writeFileSync('unicorn-128x128.png', image);\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","readmeFilename":"README.md"}