mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-19 08:32:52 +08:00
fix(image-resizer): add missing option
This commit is contained in:
parent
4b4eb76352
commit
859cbfcfc6
@ -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<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
resize(options: ImageResizerOptions): Promise<any> { return; }
|
||||
resize(options: ImageResizerOptions): Promise<any> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user