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

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Constants

QUALITY_HIGH

Added in API level 8
public static final int QUALITY_HIGH

Constant Value: 2 (0x00000002)

QUALITY_LOW

Added in API level 8
public static final int QUALITY_LOW

Define three quality levels for JPEG image encoding.

Constant Value: 0 (0x00000000)

QUALITY_MEDIUM

Added in API level 8
public static final int QUALITY_MEDIUM

Constant Value: 1 (0x00000001)

Public constructors

CameraProfile

public CameraProfile ()

Public methods

getJpegEncodingQualityParameter

Added in API level 8
public 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. 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
public 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.

Parameters
cameraId int: The id of the camera

quality int: The target quality level

Returns
int