1 | export interface ImagePickerOptions {
|
2 | /**
|
3 | * max images to be selected, defaults to 15. If this is set to 1, upon selection of a single image, the plugin will return it.
|
4 | */
|
5 | maximumImagesCount?: number;
|
6 | /**
|
7 | * Max width to allow images to be
|
8 | */
|
9 | width?: number;
|
10 | /**
|
11 | * Max height to allow images to be
|
12 | */
|
13 | height?: number;
|
14 | /**
|
15 | * Quality of images, defaults to 100
|
16 | */
|
17 | quality?: number;
|
18 | /**
|
19 | * Output type, defaults to 0 (FILE_URI).
|
20 | */
|
21 | outputType?: number;
|
22 | }
|
23 | /**
|
24 | * @name Image Picker
|
25 | * @description
|
26 | * Cordova Plugin For Multiple Image Selection
|
27 | *
|
28 | * Requires Cordova plugin: `cordova-plugin-image-picker`.
|
29 | * For more info, please see the https://github.com/wymsee/cordova-imagePicker
|
30 | *
|
31 | * @usage
|
32 | * ```typescript
|
33 | * import { ImagePicker } from 'ionic-native';
|
34 | *
|
35 | *
|
36 | *
|
37 | * ImagePicker.getPictures(options).then((results) => {
|
38 | * for (var i = 0; i < results.length; i++) {
|
39 | * console.log('Image URI: ' + results[i]);
|
40 | * }
|
41 | * }, (err) => { });
|
42 | * ```
|
43 | * @interfaces
|
44 | * ImagePickerOptions
|
45 | */
|
46 | export declare class ImagePicker {
|
47 | /**
|
48 | * Pick pictures from the library.
|
49 | * @param {ImagePickerOptions} options
|
50 | * @returns {Promise<any>} Returns a Promise that resolves the image file URI
|
51 | * otherwise rejects with an error.
|
52 | */
|
53 | static getPictures(options: ImagePickerOptions): Promise<any>;
|
54 | /**
|
55 | * Check if we have permission to read images
|
56 | * @returns {Promise<boolean>} Returns a promise that resolves with a boolean that indicates whether we have permission
|
57 | */
|
58 | static hasReadPermission(): Promise<boolean>;
|
59 | /**
|
60 | * Request permission to read images
|
61 | * @returns {Promise<any>}
|
62 | */
|
63 | static requestReadPermission(): Promise<any>;
|
64 | }
|