android 获取摄像头像素

Camera camera=Camera.open();
        Parameters parameters=camera.getParameters();
        List PictureSizes=parameters.getSupportedPictureSizes();
        List 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);
        }

 

转载于:https://www.cnblogs.com/zhoujian315/p/3295532.html

你可能感兴趣的:(android 获取摄像头像素)