首页 > 代码库 > iOS:获取图片Alpha图片
iOS:获取图片Alpha图片
-(void)createImages { // Load the alpha image, which is just the same Ship.png image used in the clipping demo NSString *imagePath = [[NSBundle mainBundle] pathForResource:@"Ship.png" ofType:nil]; UIImage *img = [UIImage imageWithContentsOfFile:imagePath]; _alphaImage = CGImageRetain(img.CGImage); // To show the difference with an image mask, we take the above image and process it to extract // the alpha channel as a mask. // Allocate data NSMutableData *data = http://www.mamicode.com/[NSMutableData dataWithLength:90 * 90 * 1];>
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。