Camera.Parameters
public class Camera.Parameters
extends Object
java.lang.Object | |
↳ | android.hardware.Camera.Parameters |
This class was deprecated in API level 21.
We recommend using the new android.hardware.camera2
API
for new applications.
Camera service settings.
To make camera parameters take effect, applications have to call setParameters(Camera.Parameters)
.
For example, after setWhiteBalance(String)
is
called, white balance is not actually changed until setParameters(Camera.Parameters)
is
called with the changed parameters object.
讓相機參數生效,應用程序必須調用setParameters(Camera.Parameters)。例如,在setWhiteBalance(String),白平衡實際上並不是改變直到setParameters(Camera.Parameters)更改的參數對象。
Different devices may have different camera capabilities, such as picture size or flash modes. The application should query the camera capabilities before setting parameters. For example, the application should call getSupportedColorEffects()
before
calling setColorEffect(String)
.
If the camera does not support color effects, getSupportedColorEffects()
will
return null.
不同的設備有不同的相機功能,如圖像大小或閃光模式。應用程序之前應該查詢相機功能設置參數。例如,應用程序應該調用getSupportedColorEffects()調用之前setColorEffect(String)。如果相機不支持顏色效果,getSupportedColorEffects()將返回null。
Summary
Constants |
|
---|---|
String |
ANTIBANDING_50HZ |
String |
ANTIBANDING_60HZ |
String |
ANTIBANDING_AUTO |
String |
ANTIBANDING_OFF |
String |
EFFECT_AQUA |
String |
EFFECT_BLACKBOARD |
String |
EFFECT_MONO |
String |
EFFECT_NEGATIVE |
String |
EFFECT_NONE |
String |
EFFECT_POSTERIZE |
String |
EFFECT_SEPIA |
String |
EFFECT_SOLARIZE |
String |
EFFECT_WHITEBOARD |
String |
FLASH_MODE_AUTO
Flash will be fired automatically when required. Flash在需要時將自動被解僱。 |
String |
FLASH_MODE_OFF
Flash will not be fired. Flash不會被解僱。 |
String |
FLASH_MODE_ON
Flash will always be fired during snapshot. Flash在快照總是會被解僱。 |
String |
FLASH_MODE_RED_EYE
Flash will be fired in red-eye reduction mode. Flash在減少紅眼模式將被解僱。 |
String |
FLASH_MODE_TORCH
Constant emission of light during preview, auto-focus and snapshot. 常數光線發射在預覽,自動對焦和快照。 |
int |
FOCUS_DISTANCE_FAR_INDEX
The array index of far focus distance for use with 焦點距離遠的數組索引使用getFocusDistances(float[]). |
int |
FOCUS_DISTANCE_NEAR_INDEX
The array index of near focus distance for use with 焦點距離附近的數組索引使用getFocusDistances(float[])。 |
int |
FOCUS_DISTANCE_OPTIMAL_INDEX
The array index of optimal focus distance for use with 最佳聚焦距離的數組索引使用getFocusDistances(float[])。 |
String |
FOCUS_MODE_AUTO
Auto-focus mode. 自動對焦模式。 |
String |
FOCUS_MODE_CONTINUOUS_PICTURE
Continuous auto focus mode intended for taking pictures. 連續自動對焦模式用於拍照。 |
String |
FOCUS_MODE_CONTINUOUS_VIDEO
Continuous auto focus mode intended for video recording. 連續自動對焦模式用於錄像。 |
String |
FOCUS_MODE_EDOF
Extended depth of field (EDOF). 擴展景深(EDOF)。 |
String |
FOCUS_MODE_FIXED
Focus is fixed. 焦點是固定的。 |
String |
FOCUS_MODE_INFINITY
Focus is set at infinity. 焦點是無窮。 |
String |
FOCUS_MODE_MACRO
Macro (close-up) focus mode. |
int |
PREVIEW_FPS_MAX_INDEX
The array index of maximum preview fps for use with 最大預覽fps的數組索引使用getPreviewFpsRange(int[])或getSupportedPreviewFpsRange()。 |
int |
PREVIEW_FPS_MIN_INDEX
The array index of minimum preview fps for use with 最低預覽fps的數組索引使用getPreviewFpsRange(int[])或getSupportedPreviewFpsRange()。 |
String |
SCENE_MODE_ACTION
Take photos of fast moving objects. 拍攝快速移動的物體。 |
String |
SCENE_MODE_AUTO
Scene mode is off. 場景模式。 |
String |
SCENE_MODE_BARCODE
Applications are looking for a barcode. 應用程序正在尋找一個條碼。 |
String |
SCENE_MODE_BEACH
Take pictures on the beach. 在海灘上拍照。 |
String |
SCENE_MODE_CANDLELIGHT
Capture the naturally warm color of scenes lit by candles. 捕捉場景的自然暖色點燃蠟燭。 |
String |
SCENE_MODE_FIREWORKS
For shooting firework displays. 拍攝焰火表演。 |
String |
SCENE_MODE_HDR
Capture a scene using high dynamic range imaging techniques. 使用高動態範圍成像技術捕捉一個場景。 |
String |
SCENE_MODE_LANDSCAPE
Take pictures on distant objects. 拍攝遠處的物體。 |
String |
SCENE_MODE_NIGHT
Take photos at night. 晚上拍照。 |
String |
SCENE_MODE_NIGHT_PORTRAIT
Take people pictures at night. 晚上拍攝人物照片。 |
String |
SCENE_MODE_PARTY
Take indoor low-light shot. 室內光線拍攝。 |
String |
SCENE_MODE_PORTRAIT
Take people pictures. 人們拍攝照片。 |
String |
SCENE_MODE_SNOW
Take pictures on the snow. 在雪地裏拍照。 |
String |
SCENE_MODE_SPORTS
Take photos of fast moving objects. 拍攝快速移動的物體。 |
String |
SCENE_MODE_STEADYPHOTO
Avoid blurry pictures (for example, due to hand shake). 避免模糊的圖片(例如,由於握手)。 |
String |
SCENE_MODE_SUNSET
Take sunset photos. 日落的照片。 |
String |
SCENE_MODE_THEATRE
Take photos in a theater. 在劇院拍照。 |
String |
WHITE_BALANCE_AUTO |
String |
WHITE_BALANCE_CLOUDY_DAYLIGHT |
String |
WHITE_BALANCE_DAYLIGHT |
String |
WHITE_BALANCE_FLUORESCENT |
String |
WHITE_BALANCE_INCANDESCENT |
String |
WHITE_BALANCE_SHADE |
String |
WHITE_BALANCE_TWILIGHT |
String |
Public methods
flatten
String flatten ()
Creates a single string with all the parameters set in this Parameters object.
創建一個字符串中所有的參數設置的參數對象。
The unflatten(String)
method
does the reverse.
Returns | |
---|---|
String |
a String with all values from this Parameters object, in semi-colon delimited key-value pairs |