Skip to content

Still can't figure out how to change aspect ratio! #34

@lectricas

Description

@lectricas

Hi. There are two options we have from camerax that allow us to change aspect ration:

Preview preview = new Preview.Builder()
            .setTargetAspectRatio(AspectRatio.RATIO_4_3)
            .build();
ImageCapture imageCapture = new ImageCapture.Builder()
            .setTargetAspectRatio(AspectRatio.RATIO_4_3)
            .build();

The first one change the viewfinder ration, the second one changes the output picture ratio.
Can I change aspect ratio only for ImageCapture and not for preview?

What code should I write to change aspect ration in both cases?

I haven't found any setTargetAspectRatio lines inside library code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions