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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.0
    1
  • 1.1.0
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i img-bot

Weekly Downloads

1

Version

2.0.0

License

MIT

Last publish

Collaborators

  • karlpokus