ios - 拍照后在 UIImagePickerController 上显示预览图像
<p><p>我有下一个代码来拍照:</p>
<pre><code> UIImagePickerController * picker = [ init];
picker.view.tag = 2;
picker.delegate = self;
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
picker.cameraCaptureMode = UIImagePickerControllerCameraCaptureModePhoto;
picker.cameraDevice = UIImagePickerControllerCameraDeviceFront;
;
</code></pre>
<p>这段代码打开相机应用程序并拍照,问题是:拍照时自动显示预览,但显示的是镜像,我怎样才能显示原样?我想我错过了一个参数,但我没有运气用谷歌搜索它。</p></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>这是前置摄像头的标准行为。如果您尝试使用内置相机应用拍照,它不会显示镜像的预览图像,但会将图像保存为镜像图像。</p>
<p>您需要在图像选择器 View 上应用转换以实现您想要的效果。请看这里:</p>
<p> <a href="https://stackoverflow.com/questions/9255633/front-facing-camera-in-uiimagepickercontroller" rel="noreferrer noopener nofollow">Front facing camera in UIImagePickerController</a> </p></p>
<p style="font-size: 20px;">关于ios - 拍照后在 UIImagePickerController 上显示预览图像,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/20306862/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/20306862/
</a>
</p>
页:
[1]