CameraUtils

class CameraUtils

Functions

getCameraIntent
Link copied to clipboard
open fun getCameraIntent(saveFileURI: Uri): Intent
获取[跳转至相册选择界面,并跳转至裁剪界面,默认可缩放裁剪区域]的Intent
getChoosedImage
Link copied to clipboard
open fun getChoosedImage(context: Activity, data: Intent): Bitmap
获得选中相册的图片
getChoosedImagePath
Link copied to clipboard
open fun getChoosedImagePath(context: Activity, data: Intent): String
获得选中相册的图片路径
getCropImageIntent
Link copied to clipboard
open fun getCropImageIntent(outputX: Int, outputY: Int, fromFileURI: Uri, saveFileURI: Uri): Intent
获取[跳转至裁剪界面,默认可缩放]的Intent
open fun getCropImageIntent(aspectX: Int, aspectY: Int, outputX: Int, outputY: Int, fromFileURI: Uri, saveFileURI: Uri): Intent
获取[跳转至裁剪界面,默认可缩放]的Intent
open fun getCropImageIntent(aspectX: Int, aspectY: Int, outputX: Int, outputY: Int, canScale: Boolean, fromFileURI: Uri, saveFileURI: Uri): Intent
获取[跳转至裁剪界面]的Intent
getImagePickerIntent
Link copied to clipboard
open fun getImagePickerIntent(): Intent
获取跳转至相册选择界面的Intent
open fun getImagePickerIntent(outputX: Int, outputY: Int, fromFileURI: Uri, saveFileURI: Uri): Intent
获取[跳转至相册选择界面,并跳转至裁剪界面,默认可缩放裁剪区域]的Intent
open fun getImagePickerIntent(aspectX: Int, aspectY: Int, outputX: Int, outputY: Int, fromFileURI: Uri, saveFileURI: Uri): Intent
获取[跳转至相册选择界面,并跳转至裁剪界面,默认可缩放裁剪区域]的Intent
open fun getImagePickerIntent(aspectX: Int, aspectY: Int, outputX: Int, outputY: Int, canScale: Boolean, fromFileURI: Uri, saveFileURI: Uri): Intent
获取[跳转至相册选择界面,并跳转至裁剪界面,可以指定是否缩放裁剪区域]的Intent
getOpenCameraIntent
Link copied to clipboard
open fun getOpenCameraIntent(): Intent
获取打开照程序界面的Intent
getTakePictureFile
Link copied to clipboard
open fun getTakePictureFile(data: Intent, filePath: String): File
获取拍照之后的照片文件(JPG格式)