2.3.0 • Published 9 years ago
multi-resize v2.3.0
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 |