2012年3月4日日曜日

Zoom

i try Camera Zoom.
first, i check to suppert Zoom.
Camera.Parameters param = camera.getParameters();
Log.d("camera", "isZoomSupported = " + param.isZoomSupported ());
and i check to support smooth zoom. my nexusOne is not supported.
Camera.Parameters param = camera.getParameters();
Log.d("camera", "isSmoothZoomSupported = " + param.isSmoothZoomSupported ());
i view list of zoom size.
Camera.Parameters param = camera.getParameters();
List ZoomRatislist = param.getZoomRatios ();
for (int i=0;i < ZoomRatislist.size();i++) {
 Log.d("camera", "list " + i + " = " + ZoomRatislist.get(i));
}
it is list of nexusone zoom. passible is between 0 and 12, from x1 to x2.
0 = 100
1 = 104
2 = 112
3 = 117
4 = 125
5 = 131
6 = 141
7 = 148
8 = 158
9 = 166
10 = 178
11 = 186
12 = 200
i set zoom.
Camera.Parameters param = camera.getParameters();
param.setZoom(zoom);
camera.setParameters(param);
source code is here.

0 件のコメント:

コメントを投稿