Most visited

Recently visited

Added in API level 8

CameraProfile

public class CameraProfile
extends Object

java.lang.Object
   ↳ android.media.CameraProfile


CameraProfile类用于检索Camera应用程序中用于低,中和高质量设置的预定义静态图像捕捉(jpeg)质量级别(0-100)。

Summary

Constants

int QUALITY_HIGH

int QUALITY_LOW

为JPEG图像编码定义三个质量等级。

int QUALITY_MEDIUM

Public constructors

CameraProfile()

Public methods

static int getJpegEncodingQualityParameter(int quality)

返回Camera应用程序中用于设备上第一个背面照相机的给定质量级别的预定义静态图像捕捉(jpeg)质量级别。

static int getJpegEncodingQualityParameter(int cameraId, int quality)

返回用于指定相机的Camera应用程序中给定质量级别的预定义静态图像捕捉(jpeg)质量级别。

Inherited methods

From class java.lang.Object

Constants

QUALITY_HIGH

Added in API level 8
int QUALITY_HIGH

常量值:2(0x00000002)

QUALITY_LOW

Added in API level 8
int QUALITY_LOW

为JPEG图像编码定义三个质量等级。

常量值:0(0x00000000)

QUALITY_MEDIUM

Added in API level 8
int QUALITY_MEDIUM

常数值:1(0x00000001)

Public constructors

CameraProfile

Added in API level 8
CameraProfile ()

Public methods

getJpegEncodingQualityParameter

Added in API level 8
int getJpegEncodingQualityParameter (int quality)

返回Camera应用程序中用于设备上第一个背面照相机的给定质量级别的预定义静态图像捕捉(jpeg)质量级别。 如果设备没有后置摄像头,则返回0。

Parameters
quality int: The target quality level
Returns
int

getJpegEncodingQualityParameter

Added in API level 9
int getJpegEncodingQualityParameter (int cameraId, 
                int quality)

返回用于指定相机的Camera应用程序中给定质量级别的预定义静态图像捕捉(jpeg)质量级别。

Parameters
cameraId int: The id of the camera
quality int: The target quality level
Returns
int

Hooray!