mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Fix captured photo quality
This commit is contained in:
@@ -96,6 +96,10 @@ final class CameraOutput: NSObject {
|
||||
|
||||
super.init()
|
||||
|
||||
if #available(iOS 13.0, *) {
|
||||
self.photoOutput.maxPhotoQualityPrioritization = .balanced
|
||||
}
|
||||
|
||||
self.videoOutput.alwaysDiscardsLateVideoFrames = false
|
||||
self.videoOutput.videoSettings = [kCVPixelBufferPixelFormatTypeKey: kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange] as [String : Any]
|
||||
}
|
||||
@@ -246,12 +250,8 @@ final class CameraOutput: NSObject {
|
||||
settings.previewPhotoFormat = [kCVPixelBufferPixelFormatTypeKey as String: previewPhotoPixelFormatType]
|
||||
}
|
||||
if #available(iOS 13.0, *) {
|
||||
if self.exclusive {
|
||||
if self.photoOutput.maxPhotoQualityPrioritization != .speed {
|
||||
settings.photoQualityPrioritization = .balanced
|
||||
} else {
|
||||
settings.photoQualityPrioritization = .speed
|
||||
}
|
||||
if self.photoOutput.maxPhotoQualityPrioritization != .speed {
|
||||
settings.photoQualityPrioritization = .balanced
|
||||
} else {
|
||||
settings.photoQualityPrioritization = .speed
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user