Android Camera中参数设置

 

parameter.set("jpeg-quality", 30);

 

 

List<Size> psizelist = parameter.getSupportedPictureSizes();
		if (null != psizelist && 0 < psizelist.size()) {
			int heights[] = new int[psizelist.size()];
			Map<Integer, Integer> map = new HashMap<Integer, Integer>();
			for (int i = 0; i < psizelist.size(); i++) {
				Size size = (Size) psizelist.get(i);
				int sizehieght = size.height;
				int sizewidth = size.width;
				heights[i] = sizehieght;
				map.put(sizehieght, sizewidth);
			}
			Arrays.sort(heights);// 取最小尺寸
			parameter.setPictureSize(map.get(heights[heights.length - 1]),
					heights[heights.length - 1]);

 

 

			parameter.setPictureFormat(PixelFormat.JPEG);

 

parameters.setRotation(90);
 

 

parameter.setPreviewSize(640, 480);

你可能感兴趣的:(android)