首页 > 学院 > 开发设计 > 正文

图片分割

2019-11-14 19:15:25
字体:
来源:转载
供稿:网友

- (UIImage *)clipImage: (UIImage *)image inRect: (CGRect) rect

{//返回image中rect范围内的图片

    CGImageRef imageRef = CGImageCreateWithImageInRect(image.CGImage, rect);

    UIImage *subImage = [UIImage imageWithCGImage:imageRef];

    return subImage;

}


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表