signalapp / Signal-iOS

A private messenger for iOS.
https://signal.org
GNU Affero General Public License v3.0
10.74k stars 3k forks source link

Photo taken in landscape mode didn't rotate when sent #4334

Closed BioTeckna closed 1 year ago

BioTeckna commented 4 years ago

Bug description

This issue happens on my wife's iPhone SE (I was not able to reproduce on my iPhone XR). When a picture is taken horizontally from the Signal App , it doesn't rotate as it should when being sent.

Normally, if the user takes a picture horizontally, on the next screen it rotates and it's possible to write a comment about the picture. On this screen the photo hasn't rotated correctly and is being send with the wrong orientation.

Steps to reproduce

Actual result: Picture is taken oriented 90° incorrectly

Expected result: The picture should have rotated so we can see it in portrait mode

Screenshots

IMG_9548

Device info

Device: iPhone SE

iOS version: 13.2.3

Signal version: 3.0.6.0

The App isn't crashing so I don't know if I should provide some logs for this issue ?

denver-s commented 4 years ago

I cannot replicate this behavior with iPhone 8 Plus (Signal 3.0.6.0).

BioTeckna commented 4 years ago

I have more information: This only happens if the phone rotation is disabled. To reproduce, make sure the phone rotation is disabled and then follow the "Steps to reproduce" part.

The question is: when phone rotation is locked, is it expected that pictures don't rotate? In order to compare with other chat apps, whatsapp, viber and telegram do rotate the picture even if the phone rotation is disabled. If it's expected and by design, we can close this issue.

michaelkirk-signal commented 4 years ago

Thanks for reporting. I've been able to reproduce and am taking a look.

Disabling device rotation is key to reproducing the bug, since we've been using the device orientation to determine how to rotate the camera.

rabbidiesel commented 3 years ago

Hi There,

This issue still persists.

iPhone 12 pro, iOS 14.3

rhmarras commented 3 years ago

Issue persists. Motorola One Hyper with v5.3.10 Android 10 - screen orientation locked in portrait. photos taken in landscape appear locked in portrait (thus making the picture not autorotated and with the not-intended orientation) - thank you

tyctor commented 3 years ago

On Iphone SE, photos from front camera (selfie) are wrongly rotated top is from back camera, bottom is from front camera Screenshot from 2021-04-12 10-56-19

EbonyBirch commented 3 years ago

Signal's the only app I believe that doesn't automatically rotate images. I'm on Android 10 (Mi 9 Lite), I can confirm that this bug still does exist. I've checked that recently and if I take a picture with built-in app, whether I rotate phone from vertical position 90 degrees right or left, the image taken is displayed horizontally, so there's some kind of detection how's the phone positioned via accelerometer readings and has nothing to do with the screen rotation function.

BioTeckna commented 3 years ago

Agreed

Le mar. 13 avr. 2021 à 08:51, EbonyBirch @.***> a écrit :

Signal's the only app I believe that doesn't automatically rotate images. I'm on Android 10 (Mi 9 Lite), I can confirm that this bug still does exist. I've checked that recently and if I take a picture with built-in app, whether I rotate phone from vertical position 90 degrees right or left, the image taken is displayed horizontally, so there's some kind of detection how's the phone positioned via accelerometer readings and has nothing to do with the screen rotation function.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/signalapp/Signal-iOS/issues/4334#issuecomment-818487744, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA6CURXGA2QGXGX2UPMZYDTTIPSXTANCNFSM4JZSG7PQ .

cravend commented 3 years ago

Just wanted to confirm it's affecting my iPhone 12 Pro! (I was about to make a new issue but realised it was a duplicate of this). Same as above, it's related to "rotation lock" being enabled on the device.

I assume it's partially due to the fact that signal has its own camera implemented. However, other apps that have their own cameras (e.g. Halide) rotate as expected, so Apple must provide some sort of API to bypass rotation lock. I'd like to help more but my Swift skills are sorely lacking.

stale[bot] commented 2 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

BioTeckna commented 2 years ago

Yep, the issue still happen. If rotation is locked, taking pictures isn’t rotating

Le dim. 23 janv. 2022 à 11:03, stale[bot] @.***> a écrit :

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

— Reply to this email directly, view it on GitHub https://github.com/signalapp/Signal-iOS/issues/4334#issuecomment-1019451252, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA6CURRVI2CMEKOQ3AKNAW3UXPHAJANCNFSM4JZSG7PQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

tyctor commented 2 years ago

yes when rotation is locked image is not rotating, but i am not sure if it should (user choosen rotation lock can be interpreted variously) and also now there is edit option, so image can be rotated as needed so for me this is ok :+1:

EbonyBirch commented 2 years ago

yes when rotation is locked image is not rotating, but i am not sure if it should (user choosen rotation lock can be interpreted variously) and also now there is edit option, so image can be rotated as needed so for me this is ok 👍

"Edit" option should be there for a situation where you want to rotate the image for some reason, not to fix something that's confirmed not working as it should. They could do it in WhatsApp properly, so why doesn't that work here? Signal is basically a better, more secure WA.

kNsja5w commented 2 years ago

It's still a thing. Please fix this issue, it's a ticket on the community as well and hasn't been solved yet. https://community.signalusers.org/t/auto-rotate-image-when-taken-horizontally/15528/10

stale[bot] commented 2 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

cravend commented 2 years ago

This issue is still relevant

stale[bot] commented 2 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

larstobi commented 2 years ago

This is still relevant.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

cravend commented 2 years ago

still relevant!

andrew-hill commented 2 years ago

Still relevant on Signal 5.49.0.13 and iOS 15.6.1.

And this is definitely unexpected behaviour. I disagree with tyctor's comment that rotation lock might imply you want to lock the picture orientation. The rotation lock's purpose is to keep the user interface in portrait mode. It is not touted as a camera function. Other messaging apps rotate images accordingly, and I'm actually a little surprised the orientation of the photo isn't handled by iOS. Is it possible Signal is doing something unnecessary with the camera UI to create the problem?

newhinton commented 1 year ago

This has also been an issue on android, but it has been fixed there: https://github.com/signalapp/Signal-Android/issues/8611

The fix: https://github.com/signalapp/Signal-Android/commit/9c7c94b2d423f6abf450702491f0d6090ac6f025 (Obviously it doesn't apply to ios, but for documentations-sake) It was just allowed to rotate the camera-ui regardless of the lock. This automatically "fixes" the orientation of the image, just by allowing it to rotate.

Since android correctly handles this usecase, ios should follow this behaviour to keep it equal featurewise.

Edit:

Taking a peak at apple's documentation, it seems one cannot simply ignore the screen orientation. However, uideviceorientation seems to provide the current orientation, and could be applied to the resulting photo. (Disclaimer: i am not a swift developer.)

afa93001d48a commented 1 year ago

Looks like this was fixed in 5.59 which is publicly available now? My iPhone 13 correctly keeps orientation of photos regardless of orientation lock.

https://github.com/signalapp/Signal-iOS/commit/2dd12d8566563aa5451389f45d4db9c23e26258a

wikir01 commented 1 year ago

Looks like this was fixed in 5.59 which is publicly available now? My iPhone 13 correctly keeps orientation of photos regardless of orientation lock.

2dd12d8

Yup, I just tried on my 14 and it works too. I guess this issue is fixed now 👏

EvanHahn-Signal commented 1 year ago

Closing because this is fixed! Please open a new issue if you encounter other problems.