CameraProfile
open class CameraProfile
kotlin.Any | |
↳ | android.media.CameraProfile |
The CameraProfile class is used to retrieve the pre-defined still image capture (jpeg) quality levels (0-100) used for low, medium, and high quality settings in the Camera application.
Summary
Constants | |
---|---|
static Int | |
static Int |
Define three quality levels for JPEG image encoding. |
static Int |
Public constructors | |
---|---|
Public methods | |
---|---|
open static Int |
getJpegEncodingQualityParameter(quality: Int) Returns a pre-defined still image capture (jpeg) quality level used for the given quality level in the Camera application for the first back-facing camera on the device. |
open static Int |
getJpegEncodingQualityParameter(cameraId: Int, quality: Int) Returns a pre-defined still image capture (jpeg) quality level used for the given quality level in the Camera application for the specified camera. |
Constants
QUALITY_LOW
static val QUALITY_LOW: Int
Define three quality levels for JPEG image encoding.
Value: 0
Public constructors
CameraProfile
CameraProfile()
Public methods
getJpegEncodingQualityParameter
open static fun getJpegEncodingQualityParameter(quality: Int): Int
Returns a pre-defined still image capture (jpeg) quality level used for the given quality level in the Camera application for the first back-facing camera on the device. If the device has no back-facing camera, this returns 0.
Parameters | |
---|---|
quality |
Int: The target quality level |
getJpegEncodingQualityParameter
open static fun getJpegEncodingQualityParameter(
cameraId: Int,
quality: Int
): Int
Returns a pre-defined still image capture (jpeg) quality level used for the given quality level in the Camera application for the specified camera.
Parameters | |
---|---|
cameraId |
Int: The id of the camera |
quality |
Int: The target quality level |