Open brettnguyen opened 2 years ago
Same here!
@jfversluis @sthewissen @jsuarezruiz Any update planned to fix this bug in android? It's a stopper to create powerful components
any update on this issue?
For the image I think I made a fix, check out #1695
@Juanoxt890 @pictos is there a fix for this issue? Will @jfversluis fix also work for previewed videos too? Can I get any answer?
In my case I got a personal solution for this issue in the CameraFragment.android.cs in Views/CameraView/Android. The method GetCaptureOrientation set a frontOffset when you are using a front camera to record videos, but in my opinion usually the front camera is in the top center of the device dont need apply 90 degree.
I changed 90 degree to 0 when it's using a front camera. That worked for me.
Any update on when this will get fixed? still have the issue where it saves wrong even though the preview of the image looks fine. The top image is the cameraview preview and the bottom one is loaded in after the image gets saved. It really just does not make sense to me, must just be a sensor issue that permeates androids or something. @jfversluis
@BrendanHadley I believe @jfversluis has a potential fix added at #1871 but was hoping for someone to verify it solves the issue. Are you able to assist him?
I have this issue when recording video
I am seeing the same thing. This is the only bug holding up my app I’m working on. I am willing to test any fixes I’d anybody needs help. Thanks!
I think I have an actual fix for this. What is the process of committing it?
I changed the function GetCaptureOrientation in the Android Views.CameraFragment to and it works :)
I think I have an actual fix for this. What is the process of comitting it?
Have you checked out the PR at #1871? It contains fixes for rotation issues with photos. I believe @jfversluis was hoping to gain confidence from people testing it in their apps to know that it solves their issues
I think I have an actual fix for this. What is the process of comitting it?
Have you checked out the PR at #1871? It contains fixes for rotation issues with photos. I believe @jfversluis was hoping to gain confidence from people testing it in their apps to know that it solves their issues
Looking at his change it appears as if he just fixed the photos and it appears to be just rotating the captured image after the fact. The better approach would be to set the correct orientation when saving the image. That is what I am doing. My fix only works with video files though at the moment.
I think I have an actual fix for this. What is the process of comitting it?
Have you checked out the PR at #1871? It contains fixes for rotation issues with photos. I believe @jfversluis was hoping to gain confidence from people testing it in their apps to know that it solves their issues
Looking at his change it appears as if he just fixed the photos and it appears to be just rotating the captured image after the fact. The better approach would be to set the correct orientation when saving the image. That is what I am doing. My fix only works with video files though at the moment.
If there is a better to do it then I'm keen to see it :).
As for your solution/issue, have you tested on a Samsung device as well as another Android device? I have experienced that Samsung devices don't typically respond to the same fix as other android devices.
I think I have an actual fix for this. What is the process of comitting it?
Have you checked out the PR at #1871? It contains fixes for rotation issues with photos. I believe @jfversluis was hoping to gain confidence from people testing it in their apps to know that it solves their issues
Looking at his change it appears as if he just fixed the photos and it appears to be just rotating the captured image after the fact. The better approach would be to set the correct orientation when saving the image. That is what I am doing. My fix only works with video files though at the moment.
If there is a better to do it then I'm keen to see it :).
As for your solution/issue, have you tested on a Samsung device as well as another Android device? I have experienced that Samsung devices don't typically respond to the same fix as other android devices.
Would the Nexus 10 emulator be good enough to test on? I didn't mean any offense. I was just thinking that surely Android has a way to correct the rotation on photos similar to how you can with video so you didn't have to essentially write the image twice?
So the front calc was off actually. Here is the correct one:
int GetCaptureOrientation() { var screenRotation = GetDisplayRotationDegrees(); var sign = cameraType == LensFacing.Front ? 1 : -1; var result = (sensorOrientation - screenRotation * sign + 360) % 360; return result; }
The calculation is specified here:
https://developer.android.com/training/camera2/camera-preview
looks like the other issue is due to GetDisplayRotationDegrees always returning 0. I think it has something to do with the sample app being set to always display in portrait mode?
Description
Images and videos appear sideways when taken on android. Rotation for where the image or video preview display on the xaml or .cs don’t correct the output nor does putting rotation in the captured media.
Stack Trace
Link to Reproduction Sample
Steps to Reproduce
Expected Behavior
Not rotated
Actual Behavior
Rotated 90 degrees or sideways
Basic Information
Workaround
Bitmap so can be used to correct the images not videos
Reproduction imagery