From 859cbfcfc6cecbf02cf6b6093fc3160fb5da7853 Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 6 Apr 2018 22:30:25 +0200 Subject: [PATCH] fix(image-resizer): add missing option --- .../plugins/image-resizer/index.ts | 42 +++++++++++-------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/src/@ionic-native/plugins/image-resizer/index.ts b/src/@ionic-native/plugins/image-resizer/index.ts index 165ffbcd4..8d9c7ad78 100644 --- a/src/@ionic-native/plugins/image-resizer/index.ts +++ b/src/@ionic-native/plugins/image-resizer/index.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core'; +import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core'; export interface ImageResizerOptions { /** @@ -7,6 +7,24 @@ export interface ImageResizerOptions { */ uri: string; + /** + * The name of the folder the image should be put + * (Android only) + */ + folderName?: string; + + /** + * A custom name for the file. Default name is a timestamp. You have to set this value on iOS + */ + fileName?: string; + + /** + * + * Quality given as Number for the quality of the new image + * (Android and iOS only) + */ + quality?: number; + /** * The width of the new image */ @@ -18,22 +36,10 @@ export interface ImageResizerOptions { height: number; /** - * The name of the folder the image should be put - * (Android only) + * Whether or not to return a base64 encoded image string instead of the path to the resized image. + * iOS 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; + base64?: boolean; } /** @@ -79,5 +85,7 @@ export class ImageResizer extends IonicNativePlugin { * @returns {Promise} */ @Cordova() - resize(options: ImageResizerOptions): Promise { return; } + resize(options: ImageResizerOptions): Promise { + return; + } }