signalapp / signalapp/Signal-Android

Picture aspect ratio depends on phone screen size

Open
#12,010 8 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

acknowledged camera
Dominant language
Kotlin
Stars
29.4k
Forks
6.9k
PR merge metrics
No merged PRs in 30d

Description


Bug description

When taking a photo, a lot of content is cropped from the picture. Specifically on horizontal mode, the picture is quite narrow.
Problems:

  • This is in generally inconvenient, unnecessarily cropped images = lost information.
  • This might leak information about the device aspect ratio.
Steps to reproduce
  • In a chat conversation I start the add picture from camera function
  • I hold the phone horizontally
    Actual result:
  • The preview is over the whole phone screen, the aspect ratio is quite narrow
  • I hold the phone is vertically
    Actual result:
  • The preview is not over the whole phone screen, there is a black bar on the right (=bottom of the phone if held vertically), but still not the actual aspect ratio of the camera (4:3)

Expected result:

  • The preview is exactly the size of the camera aspect ratio, with a black bar to fill the rest.
Device info

Device: Google Pixel 6 Pro
Android version: 12 (SQ1D.220205.004)
Signal version: 5.32.7

<! --### Link to debug log -->

Maybe somewhat related to https://github.com/signalapp/Signal-Android/issues/8292 and it's many "reopen" issues...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue through the chat conversation's add-picture-from-camera flow on the reported Pixel 6 Pro and Android 12 setup, then trace how the camera preview is sized in each orientation. Done means the preview preserves the camera's 4:3 aspect ratio in both orientations and uses black bars instead of cropping content.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.