Improve photo quality with enhanced AVCapturePhotoOutput settings#6135
Improve photo quality with enhanced AVCapturePhotoOutput settings#6135whispem wants to merge 1 commit into
Conversation
| var flashMode: AVCaptureDevice.FlashMode = .off | ||
|
|
||
| init() { | ||
| init() { |
There was a problem hiding this comment.
nit: seems there are some formatting errors
There was a problem hiding this comment.
Thanks @ianrahmin for catching that! I see the indentation issues on lines 1490 and 1509. I'll fix the formatting to match Signal's style (4 spaces) and push an update. Apologies for the oversight!
| avCaptureConnection.videoOrientation = captureOrientation | ||
|
|
||
| let photoSettings = AVCapturePhotoSettings() | ||
| let photoSettings = AVCapturePhotoSettings() |
|
Can you the indentation commit into the main commit :) |
- Set maxPhotoQualityPrioritization to .quality for AVCapturePhotoOutput - Set photoQualityPrioritization to .quality for each photo capture - Enable automatic red-eye reduction when supported Addresses issue signalapp#6098
fabdbb0 to
85a02fa
Compare
Done! |
|
This PR 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. |
|
This looks good to go |
|
This PR 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. |
Summary
This PR improves photo quality in Signal's custom camera by leveraging iOS computational photography APIs available through AVFoundation.
Changes
maxPhotoQualityPrioritizationto.qualityon AVCapturePhotoOutput initializationphotoQualityPrioritizationto.qualityfor each photo captureMotivation
Addresses #6098 - Users reported that photos taken with Signal's custom camera are significantly lower quality compared to the native iOS Camera app. While the custom camera cannot access all features like Night Mode, Portrait Mode, or Cinematic Mode (which require UIImagePickerController), these improvements maximize photo quality using the available AVFoundation APIs.
Technical Details
@available(iOS 13.0, *)checks for quality prioritization APIsphotoQualityPrioritization = .qualityenables better image processing including:Testing
Limitations
This approach improves quality within the custom camera architecture but doesn't provide access to advanced modes like Night Mode or Portrait Mode, which would require adopting UIImagePickerController (a larger architectural change as noted in #6098).
Fixes #6098