Tag: 图片捕获

为什么AVCaptureVideoOrientation风景模式导致颠倒的静止图像?

我正在使用AVFoundation类来实现我的应用程序中的自定义相机。 我只是捕捉静止图像,而不是video。 我有一切工作,但是被某些东西困住了。 当拍摄静止图像时,我会考虑设备方向,并适当地设置video连接的video方向。 代码片段: // set the videoOrientation based on the device orientation to // ensure the pic is right side up for all orientations AVCaptureVideoOrientation videoOrientation; switch ([UIDevice currentDevice].orientation) { case UIDeviceOrientationLandscapeLeft: // Not clear why but the landscape orientations are reversed // if I use AVCaptureVideoOrientationLandscapeLeft here the pic ends up upside […]