Aspect ratio / cropping issues when taking a picture through the app
- [x] I have searched open and closed issues for duplicates
- [x] I am submitting a bug report for existing functionality that does not work as intended
- [x] I have read https://github.com/signalapp/Signal-Android/wiki/Submitting-useful-bug-reports
- [x] This isn't a feature request or a discussion topic
Bug description
When taking a picture using Signal's built-in camera feature the field of view is narrower than the phone's native camera app. In addition, once the picture is taken, the resulting image is further distorted along the x-axis (portrait orientation.)
Steps to reproduce
- Open a conversation
- Press the camera icon in the text input area
- Press the button to take a picture
Actual result: The viewfinder has a narrow field of view compared to the native camera app, and the captured image does not match what is shown in the viewfinder. This bug is present when using either the front camera or the rear camera. Expected result: The viewfinder shows the entire field of view available to the camera and the captured image matches what is shown in the viewfinder.
It's worth noting that the Pixel 3 has two front facing cameras, one of which has a wide angle lens.
Screenshots
None available
Device info
Device: Google Pixel 3 Android version: 9 Signal version: 4.29.4
Link to debug log
https://debuglogs.org/cce520452a627c33512db3672978ff0467442cb4a0b62d2df12fa75f84550814
I noticed this on my Pixel 3 as well.
To your first point, we basically center-crop the camera preview so it fills the entire screen. This means it will always be a subset of the camera's actual preview, but that's fine, it's intended.
Of course the captured image being distorted is a bug. From the technical side, it's actually pretty annoying. TextureView#getBitmap() is inconsistent between devices as to whether it applies it's transformation to the bitmap, and there's no way to tell what it's doing. I thought it was simply an Android P vs non-Android-P thing, but it turns out it's more complicated than that. Honestly, there's no quick fix, and the actual solution will involve me re-writing the image capture in a more substantial way.
I have the same issue on the Huawei P20 Lite when taking a picture from inside the app just with the front camera. It was OK when introducing the new "taking pictures" features with the possibility to add text and notes to them but got disrupted during an update. I reported it via the the "Google Beta program" and got the response that the problem is being worked on but even in the latest beta version (Signal 4.30.7) it's still a problem. Android: 8.0.0.162 (C432)
I tentatively think this is fixed in version 4.43.2 on my Samsung S8
Seems to be fixed with that version on my Samsung Note8 as well.
\(ˆ˚ˆ)/
This is still happening to me (exactly as described in the report) on my Xperia XZ1 Compact.
Still happening on OnePlus 6T. 😟
This also is happening on my Galaxy S7 running android 8.0.0
Still encountering the problem on my Samsung Galaxy S6.
Signal App v5.3.12 Android 7.0
Also happening on Galaxy J7 Pro
Also happening on iPhone 13