mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-19 16:52:53 +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 { Injectable } from '@angular/core';
|
||||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||||
|
|
||||||
export interface ImageResizerOptions {
|
export interface ImageResizerOptions {
|
||||||
/**
|
/**
|
||||||
@ -7,6 +7,24 @@ export interface ImageResizerOptions {
|
|||||||
*/
|
*/
|
||||||
uri: string;
|
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
|
* The width of the new image
|
||||||
*/
|
*/
|
||||||
@ -18,22 +36,10 @@ export interface ImageResizerOptions {
|
|||||||
height: number;
|
height: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name of the folder the image should be put
|
* Whether or not to return a base64 encoded image string instead of the path to the resized image.
|
||||||
* (Android only)
|
* iOS only
|
||||||
*/
|
*/
|
||||||
folderName?: string;
|
base64?: boolean;
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -79,5 +85,7 @@ export class ImageResizer extends IonicNativePlugin {
|
|||||||
* @returns {Promise<any>}
|
* @returns {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
resize(options: ImageResizerOptions): Promise<any> { return; }
|
resize(options: ImageResizerOptions): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user