hjam40 / Camera.MAUI

A CameraView Control for preview, take photos and control the camera options
MIT License
438 stars 69 forks source link

Android: Setting cameraView.ZoomFactor = cameraView.MaxZoomFactor captures a solid green picture #136

Open archblaze opened 5 months ago

archblaze commented 5 months ago

On Android 13, if you set:

cameraView.ZoomFactor = cameraView.MaxZoomFactor;

a picture taken with TakePhotoAsync() returns a solid green picture. In testing other zoom factors I found the following:

1.0x = picture is fine 2.5x = picture is fine 4.0x (MaxZoomFactor) = picture is solid green

Not tested on iOS.

dmkerfont commented 4 months ago

I'm having a different issue, related to the cameraView.ZoomFactor.

Camera.MAUI package version: 1.5.1 dotnet version: 8 android version: 14 device: S22

Using the back cameras (deviceId 0, and 2), both show the following: MinZoomFactor == 1 MaxZoomFactor == 8

When setting cameraView.ZoomFactor to to something between [1-5] the cameraView updates and behaves as expected. For deviceId 0, setting cameraView.ZoomFactor >= 6 causes the display to look as if ZoomFactor was set to 1. Camera continues working, and zoom can be reduced afterwards.

For deviceId 2, setting the cameraView.ZoomFactor >= 6 causes the display to freeze, must close and re-open camera.