Skip to content

Most visited

Recently visited

navigation

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.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

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.

Take a short survey?
Help us improve the Android developer experience.
(Sep 2017 survey)