我正在開發相機應用程序。我正在爲10.x設備使用AVCapturePhotoOutput,對於10.x設備使用AVCaptureStillImageOutput。問題在拍攝照片時使用AVCapturePhotoOutput拍攝wtth閃光燈
我使用下面的拍攝設置,同時捕捉照片
let settings = AVCapturePhotoSettings()
let previewPixelType = settings.availablePreviewPhotoPixelFormatTypes.first!
let previewFormat = [kCVPixelBufferPixelFormatTypeKey as String: previewPixelType,
kCVPixelBufferWidthKey as String: 1080,
kCVPixelBufferHeightKey as String: 1080,
]
settings.previewPhotoFormat = previewFormat
settings.isHighResolutionPhotoEnabled = true
settings.flashMode = .on
settings.isAutoStillImageStabilizationEnabled = true
self.captureOutputPhoto?.capturePhoto(with: settings, delegate: self)
,當我嘗試使用上面設置
captureOutput:didFinishProcessingPhotoSampleBuffer:previewPhotoSampleBuffer:resolvedSettings:bracketSettings:error
上述委託拍攝的照片會拋出錯誤第一次。我是AVCapturePhotoSettings的初學者。每次使用閃光模式拍攝成功的照片後都會出現問題。
您是否可以複製並粘貼您收到的錯誤消息? – gwinyai
我得到同樣的錯誤。錯誤代碼-16005錯誤descritption:操作無法完成。這個錯誤發生在每次成功捕獲圖像時閃光模式設置爲 – 2017-06-06 03:31:32
@Dhaval是否想要使用另一個類來捕獲閃光燈圖像? –