Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

发现一处代码错误 #12

Open
dingdoublewei opened this issue Nov 27, 2020 · 0 comments
Open

发现一处代码错误 #12

dingdoublewei opened this issue Nov 27, 2020 · 0 comments

Comments

@dingdoublewei
Copy link

/**
 * 设置合适的预览尺寸
 *
 * @param camera
 */
public void setFitPreSize(Camera camera){
    Camera.Parameters parameters = camera.getParameters();

    try {
        Camera.Size adapterSize = findFitPreResolution(camera);
        parameters.setPictureSize(adapterSize.width, adapterSize.height);
        camera.setParameters(parameters);

        Log.i(TAG, "setFitPreSize:" + adapterSize.width + "*" + adapterSize.height);
    } catch (Exception e) {
        e.printStackTrace();
    }
}

你好作者,你的这个库给了我很大帮助。在使用的过程中发现这里的参数应该是设置错了parameters.setPreviewSize(adapterSize.width, adapterSize.height);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant