UIImage crop
uikit,uiimage,cgimage,crop
let cropRect = CGRect(x: 0, y: 0, width: image.size.width, height: image.size.height)
let imageRef = image.cgImage!.cropping(to: cropRect);
let newImage = UIImage(cgImage: imageRef!, scale: image.scale, orientation: image.imageOrientation)