Signal-iOS icon indicating copy to clipboard operation
Signal-iOS copied to clipboard

Camera zoom issue

Open mrarrow82 opened this issue 6 years ago • 16 comments

  • [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] This isn't a feature request or a discussion topic

Bug description

When using the camera it uses the telephoto lens without any option to change.

Steps to reproduce

open a conversation and click the camera icon

Actual result: The viewfinder shows up as expected but it uses the telephoto lens (not that useful) Expected result: It should default to the normal 1x lens and also show options to choose lens. Most new iPhones have 2 or 3 lenses and it would be nice to use them.

Device info

Device: iPhone 11 Pro Max

iOS version: 13.3.1

Signal version: 3.6.1.4

mrarrow82 avatar Mar 10 '20 11:03 mrarrow82

I also noted that if i switch to the front camera and then back again the zoom changes but it's not the full 1x <-> 2x zoom change as in the stock camera app.

mrarrow82 avatar Mar 10 '20 11:03 mrarrow82

This is still true on Signal 3.8.4.3 iOS 13.4.1

mrarrow82 avatar May 24 '20 08:05 mrarrow82

This is still true on Signal 5.15.1.3, iOS 14.6, iPhone 12 Pro Max

darkBuddha avatar Jul 14 '21 09:07 darkBuddha

Still true on 5.21.0, iOS 15.0.0, iPhone 13 Pro... and with the 3x telephoto on the 13 Pro, this is increasingly problematic.

MalcolmDwyer avatar Sep 27 '21 14:09 MalcolmDwyer

Still issue on iPhone 11 Pro Max, iOS 15.0, Signal version 5.21.0.54

AntonioALEA1996 avatar Sep 27 '21 14:09 AntonioALEA1996

Another strange zoom issue happens when I switch between the back and front camera. In the video, notice that first the plate is precisely in the frame. I the switch to the front camera without moving the phone and then back to the main camera. Notice that the plate is now zoomed out a bit!

https://youtube.com/shorts/l5dWu0z8cI0?feature=share

mrarrow82 avatar Sep 27 '21 15:09 mrarrow82

Still issue for 5.21.4.6 and iPhone 11 Pro 🙄

Bentipa avatar Oct 17 '21 16:10 Bentipa

So I'm not able to fix this myself, however, I believe I can explain the issue. Interesting to note, WhatsApp also suffers from the same issue.

It looks like photos are captured through a video session:

  • https://github.com/signalapp/Signal-iOS/blob/b2091915c597c3f6b582c0d478460c7d6c522cb6/Signal/src/ViewControllers/Photos/PhotoCaptureViewController.swift#L534
  • https://github.com/signalapp/Signal-iOS/blob/b2091915c597c3f6b582c0d478460c7d6c522cb6/Signal/src/ViewControllers/Photos/PhotoCapture.swift#L159

Video sessions are more zoomed in than camera sessions (due to image stabilization?):

  • https://www.reddit.com/r/Nexus6P/comments/3s5ax5/videocamera_problem_video_is_zoomed_in_way_more/
  • https://www.reddit.com/r/NoStupidQuestions/comments/7qpx7h/how_come_the_video_mode_on_iphones_are_slightly/

You can verify this by switching from camera mode to video mode in the stock camera app. If you switch to video mode, you'll see that it's the the same output on the screen as you see from within the Signal app.

What's odd is on my phone (XS), it chooses the wide angle lens during my testing. @herrfisk are you positive it's using the telephoto lens of your device? When I test with my finger I am 100% certain it's using the wide angle lens. It's possible that this has to do with lighting?

  • https://www.reddit.com/r/apple/comments/qana44/its_crazy_how_we_now_have_all_of_this_creative/
  • https://forums.macrumors.com/threads/telephoto-switching-to-main-camera-in-low-light-13-pro.2313595/

Looking at the code, the expected behavior appears to default fo the wide angle lens :

  • https://github.com/signalapp/Signal-iOS/blob/b2091915c597c3f6b582c0d478460c7d6c522cb6/Signal/src/ViewControllers/Photos/PhotoCapture.swift#L1151
  • https://developer.apple.com/documentation/avfoundation/avcapturedevice/1386589-default

2wyck3d avatar Dec 28 '21 03:12 2wyck3d

This would explain the bad quality. Weird decision!

I tested on iPhone 12 Pro Max, it uses the wide angle lens (standard lens) in video mode.

darkBuddha avatar Dec 28 '21 08:12 darkBuddha

This is my only gripe with Signal really! Wish we could use the regular camera instead of the video mode.

johnmahlon avatar Jan 26 '22 21:01 johnmahlon

It does now start using the the correct lens (1x instead of 2.5x) on iPhone 12 Pro Max, but still using video mode. Still a great improvement!

darkBuddha avatar Mar 21 '22 06:03 darkBuddha

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.

stale[bot] avatar May 20 '22 13:05 stale[bot]

I agree with @darkBuddha it is somehow fixed as you can now switch between the lenses, but the initial (1x) lense is still "zoomed in". At least more than the default camera apps 1x (iPhone 11Pro)

Bentipa avatar May 20 '22 13:05 Bentipa

Agreed... lens choice is good now, but all three settings are still cropped compared with the built-in iOS camera app because it's always using video mode. (The crops match with the built-in app does in video mode). I guess it's the design choice in Signal to use tap for photo, and press-and-hold for video instead of a separate toggle...but that choice seems to be constraining because of the crop in video mode.

MalcolmDwyer avatar May 20 '22 14:05 MalcolmDwyer

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.

stale[bot] avatar Aug 31 '22 10:08 stale[bot]

This issue has been closed due to inactivity.

stale[bot] avatar Sep 07 '22 11:09 stale[bot]