1.2.3 • Published 7 years ago

@houshuang/resize-img v1.2.3

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

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.

Related

License

MIT © Kevin Martensson

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.6

8 years ago

1.1.5

8 years ago

1.1.4

8 years ago

1.1.3

8 years ago

1.1.2

8 years ago