在1080 x 1440的预览中显示;使用以下代码在iPhone 8 Plus上获取最大分辨率(3024 x 4032)和质量的照片:
capturePhotoOutput?.capturePhoto(with: configurePhotoSettings(), delegate: self)
使用照片设置:
private func configurePhotoSettings() -> AVCapturePhotoSettings {
let photoSettings = AVCapturePhotoSettings()
photoSettings.isHighResolutionPhotoEnabled = true
photoSettings.isAutoStillImageStabilizationEnabled = (capturePhotoOutput?.isStillImageStabilizationSupported)!
photoSettings.isAutoDualCameraFusionEnabled = (capturePhotoOutput?.isDualCameraFusionSupported)!
return photoSettings
}
我希望能够像连续拍摄模式一样,将照片处理并预览。但是,即使在didFinishProcessingPhoto
中什么都不做,每次预览时都会短暂地冻结。
我正在寻找解决方案,以使捕获更加平滑,或许可以在后台线程中实现,但目前卡住了..