我正在开发相机应用程序。我正在为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是否想要使用另一个类来捕获闪光灯图像? –