rectimage

0.2.0 • Public • Published

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

Package Sidebar

Install

npm i rectimage

Weekly Downloads

0

Version

0.2.0

License

MIT

Last publish

Collaborators

  • chentsulin