This repository has been archived by the owner on May 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 85
Additional Options For ImagePicker
Abdullah Alhazmy edited this page Sep 11, 2016
·
1 revision
-
mode
to select the mode, you can choose one of theseCAMERA
,GALLERY
orCAMERA_AND_GALLERY
.mode(ImagePicker.Mode.CAMERA)
-
extension
You can change the extension of image toPNG
orJPG
.extension(ImagePicker.Extension.PNG)
-
compressLevel
You can change the quality of image with three different levelsHARD
,MEDIUM
,SOFT
orNONE
.compressLevel(ImagePicker.ComperesLevel.MEDIUM)
-
directory
You can pass the storage path, or selectDirectory.DEFAULT_DIR
to keep the default path.
.directory(ImagePicker.Directory.DEFAULT)
//OR
.directory(Environment.getExternalStorageDirectory()+"/myFolder")
-
scale
You can scale the image to a a minimum width and height. This will only be used if compressLevel is set. To avoid OutOfMemory issues, ensure this is used.
.scale(500, 500)
-
allowMultipleImages
Extra used to select and return multiple images from gallery CANNOT select single image from gallery if this feature was enabled
.allowMultipleImages(true)
-
enableDebuggingMode
used to print Image Picker Log
.enableDebuggingMode(true)