I took a screenshot of the overlay image with the background camera controller. But the background camera controller layer is hidden when taking a photo
code:
CGRCT rect = [previewView bounds]; UIGraphicsBeginImageContext (rect.size); CGContextRef Reference = UIGraphicsGetCurrentContext (); [PreviewView.layer renderInContext: reference]; UIImage * img = UIGraphicsGetImageFromCurrentImageContext (); UIGraphicsEndImageContext (); UIImageWriteToSavedPhotosAlbum (IMG, zero, zero, zero);
The camera preview layer is not a common collar and is not taken into account with the render In the context of In reference, only one type of CALayer works with a screenshot directly from the camera buffer directly in the most effective way.
No comments:
Post a Comment