|
|
6 years ago | |
|---|---|---|
| src | 6 years ago | |
| www | 6 years ago | |
| .gitignore | 6 years ago | |
| LICENSE | 6 years ago | |
| README.md | 6 years ago | |
| package.json | 6 years ago | |
| plugin.xml | 6 years ago |
Authors: Bruno Oliveira, Marcus Oliveira
Use the Cordova CLI and type in the following command:
cordova plugin add https://github.com/RealBrubru/cordova-plugin-image-processing.git
To remove:
cordova plugin rm cordova-plugin-image-processing
At the moment the plugin is only avaible on the android and ios platform.
ImageProcessing.resize(success, failed, options);
var options = {
sourceUri: sourceUri,
destinationUri: destinationUri,
newWidth: 800,
newHeight: 400,
keepScale: true
};
ImageProcessing.resize(function(success) {
// success:
}, function(fail) {
// failed:
}, options);
ImageProcessing.rotate(success, failed, options);
var options = {
sourceUri: sourceUri,
destinationUri: destinationUri,
angle: 30
};
ImageProcessing.rotate(function(success) {
// success:
}, function(fail) {
// failed:
}, options);
ImageProcessing.crop(success, failed, options);
var options = {
sourceUri: sourceUri,
destinationUri: destinationUri,
rect: [30, 30, 120, 140]
};
ImageProcessing.crop(function(success) {
// success:
}, function(fail) {
// failed:
}, options);