Cropo is a fast, lightweight image cropping tools for JavaScript. Resize and crop your uploaded image using a intuitive user interface.
npm install --save cropo
yarn add --save cropo
using ES modules
import { Cropo } from 'cropo';
using CommonJs
const { Cropo } = require('cropo');
const cropo = new Cropo({
imageUrl: image,
canvas: document.getElementById('canvas'),
rangeInput: document.getElementById('inputRange')
})
// download canvas image
cropo.download();
// get image as data url
cropo.getDataUrl();
- Lightweight
- No dependencies
- Touch enabled
- Pinch gesture
- Supports any images format
- Supports url and data url