Home

Awesome

rectimage

NPM version Build Status Quality Test coverage Dependency Status

Crop image to rectangle

Install

$ npm install rectimage

Usage

var rectimage = require('rectimage')

var newImage = rectimage(image)

newImage.onload = function() { /* */ }

or return a canvas

var rectimage = require('rectimage')

var canvas = rectimage(image, { canvas: true })

document.body.appendChild(canvas)

Customize Length

var rectimage = require('rectimage')

var newImage = rectimage(image, { newLength: 200 })

License

MIT © C. T. Lin