Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

resize-img

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

resize-img

Resize images in memory

  • 1.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
66K
increased by53.05%
Maintainers
1
Weekly downloads
 
Created
Source

resize-img Build Status

Resize images in memory

Install

$ npm install --save resize-img

Usage

const fs = require('fs');
const resizeImg = require('resize-img');

resizeImg(fs.readFileSync('unicorn.png'), {width: 128, height: 128}).then(buf => {
	fs.writeFileSync('unicorn-128x128.png', buf);
});

API

resizeImg(input, options)

input

Type: buffer

An image buffer. Supported formats are bmp, jpg and png.

options
width

Type: number

Desired width of the target image.

height

Type: number

Desired height of the target image.

  • resize-img-cli - CLI for this module.

License

MIT © Kevin Martensson

Keywords

FAQs

Package last updated on 13 Sep 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc