Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Cropper | 7,804 | 241 | 29 | 3 years ago | 85 | October 12, 2019 | 4 | mit | JavaScript | |
⚠️ [Deprecated] No longer maintained, please use https://github.com/fengyuanchen/jquery-cropper | ||||||||||
Jquery Cropper | 452 | 17 | 7 | 3 years ago | 4 | October 19, 2019 | 1 | mit | JavaScript | |
A jQuery plugin wrapper for Cropper.js. | ||||||||||
Jquery Filepond | 135 | 2 years ago | 1 | August 07, 2019 | 2 | mit | JavaScript | |||
🔌 A handy FilePond wrapper for jQuery | ||||||||||
Uploadcare Rails | 57 | 3 days ago | 2 | mit | Ruby | |||||
Rails API client that handles uploads and further operations with files by wrapping Uploadcare Upload and REST APIs. | ||||||||||
Jquery Alpha Image | 51 | 5 years ago | 1 | JavaScript | ||||||
This plugin can change selected colours to transparent and give result as image or imagedata. This plugin works IE9+, Chrome, Firefox, Safari. | ||||||||||
Object Detection Flask Opencv | 15 | 9 months ago | mit | Python | ||||||
👁️ A plain web application for real-time object detection via webcam, using Flask and OpenCV. | ||||||||||
Uiimage | 2 | 6 years ago | JavaScript | |||||||
This software provides JavaScript image processing of HTML canvas. |
A simple jQuery image cropping plugin. As of v4.0.0, the core code of Cropper is replaced with Cropper.js.
dist/
├── cropper.css
├── cropper.min.css (compressed)
├── cropper.js (UMD)
├── cropper.min.js (UMD, compressed)
├── cropper.common.js (CommonJS, default)
└── cropper.esm.js (ES Module)
npm install cropper jquery
Include files:
<script src="/path/to/jquery.js"></script><!-- jQuery is required -->
<link href="/path/to/cropper.css" rel="stylesheet">
<script src="/path/to/cropper.js"></script>
Initialize with $.fn.cropper
method.
<!-- Wrap the image or canvas element with a block element (container) -->
<div>
<img id="image" src="picture.jpg">
</div>
/* Limit image width to avoid overflow the container */
img {
max-width: 100%; /* This rule is very important, please do not ignore this! */
}
var $image = $('#image');
$image.cropper({
aspectRatio: 16 / 9,
crop: function(event) {
console.log(event.detail.x);
console.log(event.detail.y);
console.log(event.detail.width);
console.log(event.detail.height);
console.log(event.detail.rotate);
console.log(event.detail.scaleX);
console.log(event.detail.scaleY);
}
});
// Get the Cropper.js instance after initialized
var cropper = $image.data('cropper');
See the available options of Cropper.js.
$('img').cropper(options);
See the available methods of Cropper.js.
$('img').once('ready', function () {
$(this).cropper('method', argument1, , argument2, ..., argumentN);
});
See the available events of Cropper.js.
$('img').on('event', handler);
If you have to use other plugin with the same namespace, just call the $.fn.cropper.noConflict
method to revert to it.
<script src="other-plugin.js"></script>
<script src="cropper.js"></script>
<script>
$.fn.cropper.noConflict();
// Code that uses other plugin's "$('img').cropper" can follow here.
</script>
It is the same as the browser support of Cropper.js. As a jQuery plugin, you also need to see the jQuery Browser Support.
Please read through our contributing guidelines.
Maintained under the Semantic Versioning guidelines.