<commit_before>import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';

export interface ImageResizerOptions {
  /**
   * The URI for the image on the device to get scaled
   */
  uri: string;

  /**
   * The width of the new image
   */
  width: number;

  /**
   * The height of the new image
   */
  height: number;

  /**
   * The name of the folder the image should be put
   * (Android only)
   */
  folderName?: string;

  /**
   *
   * Quality given as Number for the quality of the new image
   * (Android and iOS only)
   */
  quality?: number;

  /**
   * A custom name for the file. Default name is a timestamp
   * (Android and Windows only)
   */
  fileName?: string;
}

/**
 * @name Image Resizer
 * @description
 * Cordova Plugin For Image Resize
 *
 * @usage
 * ```typescript
 * import { ImageResizer, ImageResizerOptions } from '@ionic-native/image-resizer';
 *
 * constructor(private imageResizer: ImageResizer) { }
 *
 * ...
 *
 * let options = {
 *  uri: uri,
 *  folderName: 'Protonet',
 *  quality: 90,
 *  width: 1280,
 *  height: 1280
 * } as ImageResizerOptions;
 *
 * this.imageResizer
 *   .resize(options)
 *   .then((filePath: string) => console.log('FilePath', filePath))
 *   .catch(e => console.log(e));<commit_msg>docs(image-resize): add note about fileName for iOS platform<commit_after>import { Injectable } from '@angular/core';
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';

export interface ImageResizerOptions {
  /**
   * The URI for the image on the device to get scaled
   */
  uri: string;

  /**
   * The width of the new image
   */
  width: number;

  /**
   * The height of the new image
   */
  height: number;

  /**
   * The name of the folder the image should be put
   * (Android only)
   */
  folderName?: string;

  /**
   *
   * Quality given as Number for the quality of the new image
   * (Android and iOS only)
   */
  quality?: number;

  /**
   * A custom name for the file. Default name is a timestamp. You have to set this value on iOS
   */
  fileName?: string;
}

/**
 * @name Image Resizer
 * @description
 * Cordova Plugin For Image Resize
 *
 * @usage
 * ```typescript
 * import { ImageResizer, ImageResizerOptions } from '@ionic-native/image-resizer';
 *
 * constructor(private imageResizer: ImageResizer) { }
 *
 * ...
 *
 * let options = {
 *  uri: uri,
 *  folderName: 'Protonet',
 *  quality: 90,
 *  width: 1280,
 *  height: 1280
 * } as ImageResizerOptions;
 *
 * this.imageResizer
 *   .resize(options)
 *   .then((filePath: string) => console.log('FilePath', filePath))
 *   .catch(e => console.log(e));
{'fraction_non_alphanumeric': 0.13343328335832083, 'fraction_numerical': 0.0074962518740629685, 'mean_word_length': 2.9134897360703813, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, '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': '522341', 'n_tokens_mistral': 881, 'n_tokens_neox': 849, 'n_words': 272}