Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cropo

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cropo

Cropo is a fast, lightweight image cropping tools for JavaScript. Resize and crop your uploaded image using a intuitive user interface.

  • 0.5.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

cropo

Project Page

Table of Contents

About

Cropo is a fast, lightweight image cropping tools for JavaScript. Resize and crop your uploaded image using a intuitive user interface.

Getting Started

Install via NPM

npm install --save cropo

Install via Yarn

yarn add --save cropo

Usage

1 - Include the cropo using ES modules

using ES modules

import cr from 'cropo';

using CommonJs

const cr = require('cropo');

2 - initialize Cropo with the following code

// load html canvas element
cr.loadCanvas(document.getElementById('canvas'));
// load image
cr.loadImageFromUrl('https://loacl/landscape/3.jpg');

3 - Optionals

// select an input to control zoom level
cr.loadSlider(document.getElementById("myRange"))

input range most be between 1 and 5

4 - Download or upload image

// download canvas image
cr.download();
// get image as data url
cr.getDataUrl();

Features

  • Lightweight
  • No dependencies
  • Touch enabled
  • Pinch gesture
  • Supports any images format
  • Supports url and data url

Keywords

FAQs

Package last updated on 31 Oct 2021

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc