ios - Crop a specific area of an UIImage from an UIImagePicker -
This issue is exploding my title.
I want to apply something similar to the camera view. In Instagram I am using an overlay view to customize the format of the camera.
The first issue - I could not make the live scene square. So, I made an idea to cover the part of the live view and create a square.
This solution has led to my second problem.
My closest solution has come from this post:
Is there a way to create a Square? Use the live preview and the picture or can I create a square from a part of the scryeen that I have lost without distortion or quality.
Regards
Live camera feeds are a great framework for processing. For example, to create square video feeds with rectangular camera input:
GPUImageStillCamera * camera = [[GPUImageStillCamera Alloc] initWithSessionPreset: AVCaptureSessionPreset1280x720 Camera status: AVCaptureDevicePositionBack]; Camera.outputImageOrientation = UIInterfaceOrientationPortrait; // 720/1280 = 0.5625 GPUImageCropFilter * ClassCrop = [[GPUImageCropFilter alloc] initWithCropRegion: CGRectMake (0.0, 0.21875, 1.0, 0.5625)]; [Camera Adtogs: SquareCrop]; [SquareCorp add target: self.imageView]; [Camera StartCameraCapture];
You will need to read the GPUImage document to learn how to set up Framework properly, but once you learn to use it, it is quite powerful.
Comments
Post a Comment