img-bot

2.0.0 • Public • Published

npm version

img-bot

Client side image manipulation based on the excellent load-image lib

Features

  • Crops an image to a square
  • Properly orients the image (even those taken on iOS)
  • Lets you set some options i.e size and image quality. If you need more options you should probably use the load-image lib instead.

Usage

var imgBot = require('img-bot');

imgBot.process(file, {}, function(data){
  // data is a dataURL from canvas
});  

Arguments

  • A file from an input element
  • Options. Pass empty to use defaults.
Options = {
  size: int // defaults to 500(px),
  quality: int [0-1] // defaults to 0.5
} 
  • Callback

Package Sidebar

Install

npm i img-bot

Weekly Downloads

2

Version

2.0.0

License

MIT

Last publish

Collaborators

  • karlpokus