Socket
Book a DemoInstallSign in
Socket

img-bot

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

img-bot

Client side image manipulation

2.0.0
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

client side

FAQs

Package last updated on 16 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.