Closed Bug 819263 Opened 12 years ago Closed 11 years ago

If we make a picture with the device horizontally, the photo is shown rotates in the gallery

Categories

(Firefox OS Graveyard :: Gaia::Camera, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-basecamp:-)

RESOLVED DUPLICATE of bug 847680
blocking-basecamp -

People

(Reporter: rafael.marquez, Unassigned)

Details

*Procedure Take a photo with the device rotates horizontally *Expected Result The photo is shown successfully in the gallery. *Actual Result If we take a photo with the device horizontally, the photo is shown rotates in the gallery
blocking-basecamp: --- → ?
gecko-beta: e8ded64713ce gaia: a30bbe1f909a052dd2afd08272e438fc8021d14a
Status: NEW → RESOLVED
blocking-basecamp: ? → ---
Closed: 12 years ago
Resolution: --- → WORKSFORME
I tested again and not reproduce the error. I'm testing with the same device and the same build that this morning with which I opened this bug. We can close the bug and if in the future it is reproduced again we can reopened this bug.
It looks like if you tip the upper edge of the phone even _slightly_ towards yourself while it's horizontal, the camera decides the phone is vertical and upside down, and so the pictures get recorded with the wrong orientation data. Reopening, renoming.
Status: RESOLVED → REOPENED
blocking-basecamp: --- → ?
Component: Gaia::Gallery → Gaia::Camera
Hardware: x86_64 → ARM
Resolution: WORKSFORME → ---
blocking-basecamp: ? → -
A little more digging: in the horizontal orientation, e.beta in orientChange() flips from ~0 to ~180 as the upper edge of the phone tips through the vertical towards the user, which sets orientation = 180 (the e.beta > 45) condition.
Rafael, When you say "in the gallery" are you sure you're switching to the Gallery app? The camera app now handles its own previews, so if you just tap on a photo in the filmstrip, you're seeing a preview in camera. Mike: what you're talking about is the camera orientChange() function, right? Camera handles its own orientation because it always wants to keep the shutter button in the same place. I guess the camera's definition of orientation is more sensitive than the device's own definition. Mike: do you know what conditions the device uses to decide to switch orientation? That would help Dale (or I if Dale is busy) make the camera match what gecko does natively.
Yeh this is just the orientating calculations being sensitive, the orientation calculation tries to calculate the orientation from a static set of points which is wrong, it needs to take into account the previous orientation. If I lay my phone flat then the only 'right' orientation is the orientation it was before it was flat. Its a small fix, just a tricky one to get right, I am good taking it
And yeh David is right, I will take a look at what calculations cause the main layour to switch, it does the right thing
(In reply to David Flanagan [:djf] from comment #5) > > Mike: what you're talking about is the camera orientChange() function, > right? Camera handles its own orientation because it always wants to keep > the shutter button in the same place. I guess the camera's definition of > orientation is more sensitive than the device's own definition. I understand. > Mike: do you know what conditions the device uses to decide to switch > orientation? That would help Dale (or I if Dale is busy) make the camera > match what gecko does natively. See comment 4; let me know if you need more information, or my explanation isn't clear.
(In reply to Dale Harvey (:daleharvey) from comment #6) > > Yeh this is just the orientating calculations being sensitive, the > orientation calculation tries to calculate the orientation from a static set > of points which is wrong, it needs to take into account the previous > orientation. If I lay my phone flat then the only 'right' orientation is the > orientation it was before it was flat. Dale, I'm not sure what's available under the hood in B2G, but it seems to me that orientation isn't the right sensor to be using. I noticed e.alpha appears to be a compass (magnetometer) measurement, which is probably why it's ignored, but then what are .beta and .gamma based on? Digging around the Android docs, wouldn't we want something more akin to TYPE_ACCELEROMETER or even TYPE_GRAVITY[1]? 1. http://developer.android.com/guide/topics/sensors/sensors_motion.html
(This is bb- while 817051 is bb+? :)
Status: REOPENED → RESOLVED
Closed: 12 years ago11 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.