Skip to content

Most visited

Recently visited

navigation
Added in API level 8

CameraProfile

public class CameraProfile
extends Object

java.lang.Object
   ↳ 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

int QUALITY_HIGH

int QUALITY_LOW

Define three quality levels for JPEG image encoding.

int QUALITY_MEDIUM

Public constructors

CameraProfile()

Public methods

static int getJpegEncodingQualityParameter(int quality)

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.

static int getJpegEncodingQualityParameter(int cameraId, int quality)

Returns a pre-defined still image capture (jpeg) quality level used for the given quality level in the Camera application for the specified camera.

Inherited methods

From class java.lang.Object

Constants

QUALITY_HIGH

Added in API level 8
int QUALITY_HIGH

Constant Value: 2 (0x00000002)

QUALITY_LOW

Added in API level 8
int QUALITY_LOW

Define three quality levels for JPEG image encoding.

Constant Value: 0 (0x00000000)

QUALITY_MEDIUM

Added in API level 8
int QUALITY_MEDIUM

Constant Value: 1 (0x00000001)

Public constructors

CameraProfile

Added in API level 8
CameraProfile ()

Public methods

getJpegEncodingQualityParameter

Added in API level 8
int getJpegEncodingQualityParameter (int quality)

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
Returns
int

getJpegEncodingQualityParameter

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

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
Returns
int
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.