美文网首页
裁剪图片

裁剪图片

作者: y2015 | 来源:发表于2019-04-29 14:32 被阅读0次
- (UIImage *)croppedImage:(CGRect)bounds image:(UIImage *)origalImg{
    CGImageRef imageRef = CGImageCreateWithImageInRect([origalImg CGImage], bounds);
    UIImage *croppedImage = [UIImage imageWithCGImage:imageRef];
    CGImageRelease(imageRef);
    return croppedImage;
}

相关文章

网友评论

      本文标题:裁剪图片

      本文链接:https://www.haomeiwen.com/subject/tvyhgttx.html