CGImageCreateWithImageInRect not Cropping Correctly
问题 I'm having a hell of a time using CGImageCreateWithImageInRect to crop a photo. My app has the user move / enlarge an image till it fills a 316 x 316 view, then I want it to crop off any area outside the box and save the image as a UIImage. I determine the crop origin by taking the absolute value of the x and y imageview origin as that brings me back to 0,0 of the view / box that contains the imageview. Below is the code: CGRect croppedRect = CGRectMake(fabs(widthDistanceToOrigin), fabs