2.3.0 • Published 9 years ago

multi-resize v2.3.0

Weekly downloads
1
License
ISC
Repository
-
Last release
9 years ago

Multi Resize npm.io

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

ParamTypeDescription
inputstringFile 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>

ParamTypeDescription
sizeintegerX/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>

ParamTypeDescription
sizesArrayX/Y Size to Scale To
2.3.0

9 years ago

2.1.0

9 years ago