jimp-autocrop
v0.1.0
Published
auto crop centre of a jimp image based on min and max ratio (width/height)
Downloads
3
Readme
jimp-autocrop
auto crop centre of a jimp image based on min and max ratio (width/height)
Install
npm i jimp-autocrop
Usage
import Jimp from 'jimp'
import { cropCentreFromPath } from 'jimp-autopcrop'
cropCentreFromPath('inPath', { outImgPath: 'outPath', ratio: { min: 0.75, max: 1.25 })
.then(res => {
console.log(res.img, res.path)
})
.catch(err => console.log(err))