I have a AVCaptureVideoPreviewLayer that needs to be cut so that it sits nicely onto my image that has parts that are transparent that need to be seen.
What is the best / efficient way to cut a shape out of the AVCaptureVideoPreviewLayer?
I have managed to get the correct shape using a CAShapeLayer but it seems AVCaptureVideoPreviewLayer doesn't have a Path property to do the same.
cameraLayer = [[CAShapeLayer layer] retain];
CGRect rect = CGRectMake(64, 32, 190 , 152);
CGMutablePathRef path = CGPathCreateMutable();
CGPathAddEllipseInRect(path, NULL, rect);
cameraLayer.path = path;
CGPathRelease(path);
*edit if it is possible to cut a shape out of a UIView or Imageview i should be able to do what i want aswell
Thanks