iPhone4使用前置摄像头拍照
我想用 iPhone4 的前置摄像头拍照。 我的问题是拍摄后的照片是镜像的。 所以我想在预览上应用镜像变换,以便以与预览相同的方式呈现镜头。
这是我使用的代码,但它不起作用,转换不镜像,它只是旋转图片,我不明白为什么会发生这种情况。
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
imagePicker.delegate = self;
imagePicker.sourceType=UIImagePickerControllerSourceTypeCamera;
imagePicker.cameraDevice=UIImagePickerControllerCameraDeviceFront;
imagePicker.cameraViewTransform=CGAffineTransformScale(CGAffineTransformIdentity, -1,1)
[self presentModalViewController:imagePicker animated:YES];
[imagePicker release];
怎么了?
感谢大家。
I want to take a picture from the front camera from an iPhone4.
My problem is that the taken picture is mirrored after the shot.
So I thought to apply a mirror transformation on the preview in order to present the shot in the same way as the preview is.
This is the code that I use, but it doesn't work, the transformation don't mirror, it just rotate the picture, and I don't understand why it happens.
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
imagePicker.delegate = self;
imagePicker.sourceType=UIImagePickerControllerSourceTypeCamera;
imagePicker.cameraDevice=UIImagePickerControllerCameraDeviceFront;
imagePicker.cameraViewTransform=CGAffineTransformScale(CGAffineTransformIdentity, -1,1)
[self presentModalViewController:imagePicker animated:YES];
[imagePicker release];
What's wrong?
Thanks to all.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论