No Description

Christian Kahlau f2392d778a Speichern und Lesen von verschiedenen URI Schemata; JS-Interface wesentlich schlanker; 6 years ago
src f2392d778a Speichern und Lesen von verschiedenen URI Schemata; JS-Interface wesentlich schlanker; 6 years ago
www f2392d778a Speichern und Lesen von verschiedenen URI Schemata; JS-Interface wesentlich schlanker; 6 years ago
.gitignore eb231f2335 clone from https://github.com/RealBrubru/cordova-plugin-image-processing.git 6 years ago
LICENSE eb231f2335 clone from https://github.com/RealBrubru/cordova-plugin-image-processing.git 6 years ago
README.md eb231f2335 clone from https://github.com/RealBrubru/cordova-plugin-image-processing.git 6 years ago
package.json 30c00460c7 generated package.json 6 years ago
plugin.xml eb231f2335 clone from https://github.com/RealBrubru/cordova-plugin-image-processing.git 6 years ago

README.md

Ionic / Cordova Image Processing

Authors: Bruno Oliveira, Marcus Oliveira

Adding the Plugin

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

Methods

At the moment the plugin is only avaible on the android and ios platform.

resize

ImageProcessing.resize(success, failed, options);

options

  • sourceUri (String): The Uri for the image on the device to get scaled
  • destinationUri (String): The name of the image to be saved
  • newWidth (Number): Width of the new resized image
  • newHeight (Number): Height of the new resize image
example
var options = {
      sourceUri: sourceUri,
      destinationUri: destinationUri,
      newWidth: 800,
      newHeight: 400,
      keepScale: true
      };

ImageProcessing.resize(function(success) {
     // success: 
  }, function(fail) {
    // failed: 
  }, options);

rotate

ImageProcessing.rotate(success, failed, options);

options

  • sourceUri (String): The Uri for the image on the device to get scaled
  • destinationUri (String): The name of the image to be saved
  • angle (Number): Rotation angle
example
var options = {
      sourceUri: sourceUri,
      destinationUri: destinationUri,
      angle: 30
      };

ImageProcessing.rotate(function(success) {
     // success: 
  }, function(fail) {
    // failed: 
  }, options);

crop

ImageProcessing.crop(success, failed, options);

options

  • sourceUri (String): The Uri for the image on the device to get scaled
  • destinationUri (String): The name of the image to be saved
  • rect (Rectangle): Rectangle to crop
example
var options = {
      sourceUri: sourceUri,
      destinationUri: destinationUri,
      rect: [30, 30, 120, 140]
      };

ImageProcessing.crop(function(success) {
     // success: 
  }, function(fail) {
    // failed: 
  }, options);