Front facing camera in UIImagePickerController

后端 未结 9 1230
暗喜
暗喜 2020-12-02 06:42

I am developing the front facing camera app in iPad2 by using the UIImagePickerController.

When I capture the image it\'s shows as flipped from left to

9条回答
  •  北海茫月
    2020-12-02 07:22

    You can flip the image from the source image use this

    UIImage *flippedImage = [UIImage imageWithCGImage:picture.CGImage scale:picture.scale orientation:UIImageOrientationLeftMirrored];
    

    Edit: Added swift code

    let flippedImage = UIImage(CGImage: picture.CGImage, scale: picture.scale, orientation:.LeftMirrored)
    

提交回复
热议问题