裁剪图片

2019-04-29  本文已影响0人  y2015
- (UIImage *)croppedImage:(CGRect)bounds image:(UIImage *)origalImg{
    CGImageRef imageRef = CGImageCreateWithImageInRect([origalImg CGImage], bounds);
    UIImage *croppedImage = [UIImage imageWithCGImage:imageRef];
    CGImageRelease(imageRef);
    return croppedImage;
}
上一篇下一篇

猜你喜欢

热点阅读