<commit_before># Image Resizer for Cordova #
By: Protonet GmbH

Authors: <NAME>

## Adding the Plugin ##

Use the Cordova CLI and type in the following command:

`cordova plugin add https://github.com/protonet/cordova-plugin-image-resizer.git`

## Sample Code

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

### resize

    window.ImageResizer.resize(options, success, failed);

### Options
  - **uri**(String): The Uri for the image on the device to get scaled
  - **folderName**(String): The name of the folder the image should be put in
  - **fileName**(String): A custom name for the file. Default name is a timestamp.
  - **quality**(Number): Quality given as Number for the quality of the new image
  - **width**(Number): The width of the new image,
  - **height**(Number): The height of the new image

### Android Example
    var options = {
          uri: uri,
          folderName: "Protonet Messenger",
          quality: 90,
          width: 1280,
          height: 1280};

    window.ImageResizer.resize(options,
      function(image) {
         // success: image is the new resized image
      }, function() {
        // failed: grumpy cat likes this function
      });
<commit_msg>Updated readme to reflect implementation behaviour<commit_after># Image Resizer for Cordova #
By: Protonet GmbH

Authors: <NAME>

## Adding the Plugin ##

Use the Cordova CLI and type in the following command:

`cordova plugin add https://github.com/protonet/cordova-plugin-image-resizer.git`

## Sample Code

At the moment the plugin is available on android, iOS and windows

### resize

    window.ImageResizer.resize(options, success, failed);

### Options
  - **uri**(String): The Uri for the image on the device to get scaled
  - **folderName**(String): The name of the folder the image should be put in **android only**
  - **fileName**(String): A custom name for the file. Default name is a timestamp. **android and windows only**
  - **quality**(Number): Quality given as Number for the quality of the new image **android and iOS only**
  - **width**(Number): The width of the new image,
  - **height**(Number): The height of the new image

### Android Example
    var options = {
          uri: uri,
          folderName: "Protonet Messenger",
          quality: 90,
          width: 1280,
          height: 1280};

    window.ImageResizer.resize(options,
      function(image) {
         // success: image is the new resized image
      }, function() {
        // failed: grumpy cat likes this function
      });

{'fraction_non_alphanumeric': 0.10840534171249018, 'fraction_numerical': 0.007855459544383346, 'mean_word_length': 3.0492845786963434, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '551035', 'n_tokens_mistral': 744, 'n_tokens_neox': 693, 'n_words': 295}