Android APIs
public class

CameraProfile

extends Object
java.lang.Object
   ↳ android.media.CameraProfile

Class Overview

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.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int QUALITY_HIGH

Added in API level 8

Constant Value: 2 (0x00000002)

public static final int QUALITY_LOW

Added in API level 8

Define three quality levels for JPEG image encoding.

Constant Value: 0 (0x00000000)

public static final int QUALITY_MEDIUM

Added in API level 8

Constant Value: 1 (0x00000001)

Public Constructors

public CameraProfile ()

Added in API level 8

Public Methods

public static int getJpegEncodingQualityParameter (int quality)

Added in API level 8

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

public static int getJpegEncodingQualityParameter (int cameraId, int quality)

Added in API level 9

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