ubports / ubuntu-touch

Ubuntu Touch's issue inbox is now migrated to GitLab.
https://gitlab.com/ubports/ubuntu-touch
1.29k stars 109 forks source link

Picture orientation doesn't work correctly in Camera app when rotation is locked #1039

Closed kugiigi closed 3 years ago

kugiigi commented 5 years ago

Steps to reproduce

  1. Lock the orientation to portrait via the rotation indicator.
  2. Open the camera app.
  3. Take a landscape picture. (take picture while the phone is in landscape)

Expected behavior

The picture taken should be in landscape.

Actual behavior

The picture is in portrait.

Arc676 commented 5 years ago

Why should it be expected that the camera app would ignore the rotation lock? If the device is locked in portrait mode, doesn't it make sense that the camera app would also be in portrait mode, regardless of the device's actual orientation (since that's the point of a rotation lock)?

Or are the expected and actual behaviors inverted?

kugiigi commented 5 years ago

The issue isn't really about the orientation of the camera app. It is about the orientation of the pictures taken by the camera app. In my opinion, the picture orientation should always be automatic regardless of the rotation lock. Disabling the rotation lock when you want to take a landscape picture isn't a good user experience. I believe the behavior before was correct based on my expectation.

Flohack74 commented 5 years ago

Hmm I dont know other phone vendors but as I understand our usage of sensors I think we can have only a lock for everything. If you got an example from Android where this works it would be great.

kugiigi commented 5 years ago

It;s a great timing that I have an old UT version on my MX4 right now. I can confirm that the camera app behaves like what I'm saying here. I swear I don't have this issue before and maybe started around OTA-5? I would say a separate orientation lock setting in the camera app would be better. I don't mind the UI not rotating as long as the picture taken have the correct orientation.

tydell commented 5 years ago

I can confirm that before it worked like kugiigi described it. A year ago i think with my BQ E4.5 (now it is broken and I use N5) it was possible to take a landscape photo with rotation locked as a portrait. And then gallery app could show this photo as landscape one. Now photos are taken with the same orientation as locked rotation.

james-lyon commented 5 years ago

I can confirm this too, also on a BQ E4.5

jezek commented 5 years ago

I think, camera picture orientation should be lockable. Let's say, I have a portrait painting, which is not on the wall, but somewhere in the corner, incorrectly rotated (in landscape). If I can't touch the painting (rotate it correctly) and the camera app would work like this issue demand, there is no possibility to take the picture in portrait mode, cause the phone autorotate it always.

Or maybe there should be a separate lock in camera app settings, but then there should be some visual indicator, which rotation is currently used.

Currently, the camera screen orientation indicates, which picture rotation is used, thus it can be locked by global orientation lock. If you want autorotate, unlock your screen, if not then lock it. So I think now it's working ok, as expected.

kugiigi commented 5 years ago

I'd go for a quick settings in the camera app orientation. Most of the time auto rotation os preferred when talking a picture and locking camera orientation is done no too often. In my opinion, it's still a bad UX where you always have to unlock global auto rotate whenever you want to take a picture in different orientations.

jezek commented 5 years ago

@kugiigi You are right. There should be a picture orientation option/selector in camera app.

Also, I'd like to suggest, that some icon/text indicator for currently used picture orientation in the app would be useful too and solve all confusions.

tydell commented 5 years ago

Currently, the camera screen orientation indicates, which picture rotation is used, thus it can be locked by global orientation lock. If you want autorotate, unlock your screen, if not then lock it. So I think now it's working ok, as expected.

I think it doesn't make sense to unlock screnn when I want to take a photo and after that lock it again. I wrote, that on my BQ E4.5 it was automatic, phone was locked in potrait mode, but every photo I made in potrait or landscape mode was really made as potrait or landscape photo. I didn't need to unlock global orientation, it just worked without it. I think it should be expected like that.

I have some old revision of UT on my BQ E4.5, but it doesn't work now because I need to replace usb/charging port. Then I will check if it still works that way.

MichaelTunnell commented 5 years ago

I came to this repo specifically for this issue. Rotation Lock should not be forced at all times in my opinion. The Camera app and Video Playback should have exception to the lock at all times. It makes sense for the rotation of the camera and video playback to ignore the rotation lock because that is the most common usage of video recording and playback . . . not most common, should be a requirement, vertical video is vile.

Anyway, if possible I think a good solution to this would be to somehow have an exception so that the Camera, Media Player and maybe stuff like YouTube apps can ignore the Rotation Lock.

I prefer to have my phone always in Portrait no matter what but some stuff shouldnt be locked.

james-lyon commented 5 years ago

+1 and just to reiterate, this is new(ish) behaviour. @tydell did you manage to check the older version of UT yet?

Flohack74 commented 5 years ago

Could we live with a special "policy" or config in the app manifest that says "rotation_override? TBH I still dont know how hard this will be to hack into the system (Currently everything is locked so also all child windows of unity8 cannot rotate freely. Its nothing that the App could enforce right now) #

kugiigi commented 5 years ago

I've just tried this in the edge channel and I can confirm that this issue is "fixed" there. Meaning, even if you lock the orientation to portrait, you can still take photos in portrait or landscape. This is how it behaved in the previous versions...I believe vivid. By the way, the camera app doesn't really rotate its UI when orientation is locked, but the picture taken corresponds to the current physical orientation. I would think it just reads the sensors.

Moving forward though, I would agree that it'll be better if the whole camera app has total exception from the orientation lock so that the UI also adjusts. As for the media player (a bit off-topic here), I would say having a dedicated button to change orientation will do it. No need for exception.

kugiigi commented 5 years ago

Update: I tried in the latest devel and it is fixed there as well. Not sure if someone intentionally fixed this or it was an effect some other modifications in the system :)

Danfro commented 5 years ago

I did have it earlier this year. It really makes you cry when recording a video in landscape (lock set on portrait) and on the laptop that video gets turned by 90° and is portrait mode. :laughing:

But I can confirm that with current RC (2019-W27) this issue can not be reproduced anymore. If you ask me this issue could be closed. This would apply to the issue I created with camera app as well.

kugiigi commented 3 years ago

This has been fixed years ago LOL