Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

multi-resize

2.3.0 • Public • Published

Multi Resize

Resizes a PNG to many sizes at once!
Made by Jack Baron

Setup

yarn add multi-resize or npm i -S multi-resize

const path = require('path')
const MultiResize = require('multi-resize')
const image = new MultiResize(path.join(__dirname, 'path', 'to', 'image.png'))

Docs

  • MultiResize
    • new MultiResize(input)
    • .resizeOnce(size) ⇒ Promise.<Object>
    • .resizeMany(sizes) ⇒ Promise.<Array>

new MultiResize(input)

Multi Resize

Param Type Description
input string File path to PNG File

multiResize.resizeOnce(size) ⇒ Promise.<Object>

Resize Once

Kind: instance method of MultiResize
Returns: Promise.<Object> - - Buffer and Size keys
Throws: Promise.<Error>

Param Type Description
size integer X/Y Size to Scale To

multiResize.resizeMany(sizes) ⇒ Promise.<Array>

Resize To an Array of Sizes

Kind: instance method of MultiResize
Returns: Promise.<Array> - - Array of Buffer and Size keys
Throws: Promise.<Error>

Param Type Description
sizes Array X/Y Size to Scale To

Install

npm i multi-resize

DownloadsWeekly Downloads

0

Version

2.3.0

License

ISC

Last publish

Collaborators

  • avatar