1 | /**
|
2 | * @name Base64 To Gallery
|
3 | * @description This plugin allows you to save base64 data as a png image into the device
|
4 | * @usage
|
5 | * ```typescript
|
6 | * import { Base64ToGallery } from 'ionic-native';
|
7 | *
|
8 | *
|
9 | * Base64ToGallery.base64ToGallery(base64Data, 'img_').then(
|
10 | * res => console.log('Saved image to gallery ', res),
|
11 | * err => console.log('Error saving image to gallery ', err)
|
12 | * );
|
13 | * ```
|
14 | */
|
15 | export declare class Base64ToGallery {
|
16 | /**
|
17 | * Converts a base64 string to an image file in the device gallery
|
18 | * @param {string} data The actual base64 string that you want to save
|
19 | * @param {any} options (optional) An object with properties: prefix: string, mediaScanner: boolean. Prefix will be prepended to the filename. If true, mediaScanner runs Media Scanner on Android and saves to Camera Roll on iOS; if false, saves to Library folder on iOS.
|
20 | * @returns {Promise<any>} returns a promise that resolves when the image is saved.
|
21 | */
|
22 | static base64ToGallery(data: string, options?: {
|
23 | prefix?: string;
|
24 | mediaScanner?: boolean;
|
25 | }): Promise<any>;
|
26 | }
|