xamarin / XamarinCommunityToolkit

The Xamarin Community Toolkit is a collection of Animations, Behaviors, Converters, and Effects for mobile development with Xamarin.Forms. It simplifies and demonstrates common developer tasks building iOS, Android, and UWP apps with Xamarin.Forms.
MIT License
1.58k stars 471 forks source link

[Bug] Android : CameraView returns an empty image when orientation is forced to portrait #1585

Open vd3d opened 3 years ago

vd3d commented 3 years ago

Description

Imagine the 2 following situations: 1) I use the CameraView and shot an image. It works perfectly, I got an image (approx. 500k returned) 2) The same scenario, but I fix the application orientation. The image is empty (only 4K returned)

I fix the orientation on Android like this:

((Activity)Forms.Context).RequestedOrientation = ScreenOrientation.Portrait;

I have only test in the Android emulator for now.

GUOLDEV commented 3 years ago

Hi @vd3d, I have tested it on Android and it works fine for me, so could you please provide some code? About the empty image, 4K is definitely not an empty image, so did you check the image showing it as a preview for example? There is a known issue #1583 with the CameraView orientation but it is iOS only, but it can be related.

GUOLDEV commented 2 years ago

Hi @vd3d, I think the issue is already fixed on the latest Main branch, it would be great if you could confirm 👍

GUOLDEV commented 2 years ago

@jfversluis @pictos could you please add CameraView label to this issue as well?