@ionic-native/image-picker
- Version 5.36.0
- Published
- 23.2 kB
- 1 dependency
- MIT license
Install
npm i @ionic-native/image-picker
yarn add @ionic-native/image-picker
pnpm add @ionic-native/image-picker
Overview
Ionic Native - Native plugins for ionic apps
Index
Variables
variable ImagePicker
const ImagePicker: ImagePickerOriginal;
Classes
class ImagePickerOriginal
class ImagePickerOriginal extends IonicNativePlugin {}
Image Picker Cordova Plugin For Multiple Image Selection
Requires Cordova plugin:
cordova-plugin-image-picker
. For more info, please see the https://github.com/Telerik-Verified-Plugins/ImagePickerimport { ImagePicker } from '@ionic-native/image-picker/ngx';constructor(private imagePicker: ImagePicker) { }...this.imagePicker.getPictures(options).then((results) => {for (var i = 0; i < results.length; i++) {console.log('Image URI: ' + results[i]);}}, (err) => { });ImagePickerOptions
method getPictures
getPictures: (options: ImagePickerOptions) => Promise<any>;
Pick pictures from the library.
Parameter options
Returns
{Promise} Returns a Promise that resolves the image file URI otherwise rejects with an error.
method hasReadPermission
hasReadPermission: () => Promise<boolean>;
Check if we have permission to read images
Returns
{Promise} Returns a promise that resolves with a boolean that indicates whether we have permission
method requestReadPermission
requestReadPermission: () => Promise<any>;
Request permission to read images
Returns
{Promise}
Interfaces
interface ImagePickerOptions
interface ImagePickerOptions {}
property allow_video
allow_video?: boolean;
Videos allowed?
property disable_popover
disable_popover?: boolean;
Disable the iOS popover as seen on iPad
property height
height?: number;
Max height to allow images to be
property maximumImagesCount
maximumImagesCount?: number;
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. (Android only)
property message
message?: string;
the old plugin impl didn't have it, so passing null by default
property outputType
outputType?: number;
Choose the format of the return value. Defined in ImagePicker.OutputType. Default is FILE_URI. FILE_URI : 0, Return image file URI, DATA_URL : 1, Return image as base64-encoded string
property quality
quality?: number;
Quality of images, defaults to 100
property title
title?: string;
the default is the message of the old plugin impl
property width
width?: number;
Max width to allow images to be
Enums
enum OutputType
enum OutputType { FILE_URL = 0, DATA_URL = 1,}
Package Files (1)
Dependencies (1)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (2)
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@ionic-native/image-picker
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@ionic-native/image-picker)
- HTML<a href="https://www.jsdocs.io/package/@ionic-native/image-picker"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2181 ms. - Missing or incorrect documentation? Open an issue for this package.