czen_a
Last Updated: February 25, 2016
·
754
· novalagung

iOS - Crop an Image

CGRect cropRect  = CGRectMake(0, 0, 100, 100);
CGImageRef imageRef = CGImageCreateWithImageInRect([image CGImage], cropRect);
UIImage *croppedImage   = [UIImage imageWithCGImage:imageRef];
CGImageRelease(imageRef);