cropo
TypeScript icon, indicating that this package has built-in type declarations

0.5.8 • Public • Published

cropo

OSSAR Node.js Package Lint Code Base

Project Page

code Example on codepen

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 { Cropo } from 'cropo';

using CommonJs

const { Cropo } = require('cropo');

2 - initialize Cropo with the following code

const cropo = new Cropo({
    imageUrl: image,
    canvas: document.getElementById('canvas'),
    rangeInput: document.getElementById('inputRange')
})

3 - Optionals

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

Features

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

Package Sidebar

Install

npm i cropo

Weekly Downloads

3

Version

0.5.8

License

MIT

Unpacked Size

134 kB

Total Files

12

Last publish

Collaborators

  • mh.alijany