RedApparat / Fotoapparat

Making Camera for Android more friendly. 📸
Apache License 2.0
3.83k stars 407 forks source link

The difference between preview and result obtained. #419

Open mastalsbota opened 3 years ago

mastalsbota commented 3 years ago

What are you trying to achieve or the steps to reproduce?

The problem is the difference between the preview you have on the screen and the result after using zoom. You adjust the zoom to fill the screen without space between an object and the border of your screen, but the picture result recorded has space between the object and the border.

How did you initialize FA?

// Wrap code in markdown source tags
private final CameraConfiguration cameraConfiguration = CameraConfiguration
            .builder()
            .photoResolution(standardRatio(
                    highestResolution()
            ))
            .focusMode(firstAvailable(
                    continuousFocusPicture(),
                    autoFocus(),
                    fixed()
            ))
            .flash(firstAvailable(
                    autoRedEye(),
                    autoFlash(),
                    torch(),
                    off()
            ))
            .previewFpsRange(highestFps())
            .sensorSensitivity(highestSensorSensitivity())
            .frameProcessor(new SampleFrameProcessor())
            .build();

Fotoapparat fotoapparat = Fotoapparat
                .with(this)
                .into(cameraView)
                .focusView(focusView)
                .previewScaleType(ScaleType.CenterCrop)
                .lensPosition(back())
                .frameProcessor(new SampleFrameProcessor())
                .logger(loggers(logcat(), fileLogger(this)))
                .cameraErrorCallback(e -> {
                    Toast.makeText(ActivityFotos.this, e.toString(), Toast.LENGTH_LONG).show();
                })
                .build();

What was the result you received?

The picture result recorded has space to the border of the screen.

What did you expect?

Adjust the zoom to fill the screen without space between an object and the border of your screen.

Context:

Abs-11001 commented 5 months ago

Hello, I have also encountered this problem now, the image in preview is inconsistent with the saved image, may I ask if you have solved this problem? thank you.