android 获取摄像头像素

Camera camera=Camera.open();
        Parameters parameters=camera.getParameters();
        List<Size> PictureSizes=parameters.getSupportedPictureSizes();
        List<Size> PreviewSizes=parameters.getSupportedPreviewSizes();
        for (int i = 0; i < PictureSizes.size(); i++) {
            Log.i("msg", "PictureSizes:"+PictureSizes.get(i).height+"*"+PictureSizes.get(i).width);
        }
        Log.i("msg", "-----------");
        for (int i = 0; i < PreviewSizes.size(); i++) {
            Log.i("msg", "PreviewSizes:"+PreviewSizes.get(i).height+"*"+PreviewSizes.get(i).width);
        }

 

posted @ 2013-09-01 22:00  最後的輕語  阅读(1113)  评论(0编辑  收藏  举报