Android获取摄像头支持的分辨率

获取摄像头支持的分辨率


代码块

mCamera = Camera.open(mCamId);
        Camera.Parameters params = mCamera.getParameters();

        List pictureSizes = params.getSupportedPictureSizes();
        int length = pictureSizes.size();
        for (int i = 0; i < length; i++) {
            Log.e("SupportedPictureSizes","SupportedPictureSizes : " + pictureSizes.get(i).width + "x" + pictureSizes.get(i).height);
        }

        List previewSizes = params.getSupportedPreviewSizes();
        length = previewSizes.size();
        for (int i = 0; i < length; i++) {
            Log.e("SupportedPreviewSizes","SupportedPreviewSizes : " + previewSizes.get(i).width + "x" + previewSizes.get(i).height);
        }

你可能感兴趣的:(Android多媒体)