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
cr.loadCanvas(document.getElementById('canvas'));
cr.loadImageFromUrl('https://loacl/landscape/3.jpg');
3 - Optionals
cr.loadSlider(document.getElementById("myRange"))
input range most be between 1 and 5
4 - Download or upload image
cr.download();
cr.getDataUrl();
Features
- Lightweight
- No dependencies
- Touch enabled
- Pinch gesture
- Supports any images format
- Supports url and data url