iOS图片灰色处理
来源:互联网 发布:上海师范大学网络支付 编辑:程序博客网 时间:2024/04/28 05:56
代码如下
CGColorSpaceRef colorref = CGColorSpaceCreateDeviceGray();CGContextRef ctx = CGBitmapContextCreate(nil, img.size.width, img.size.height, 8, 0, colorref, kCGImageAlphaNone);CGColorSpaceRelease(colorref);CGContextDrawImage(ctx, CGRectMake(0, 0, img.size.width, img.size.height), img.CGImage);UIImage *imgg = [UIImage imageWithCGImage:CGBitmapContextCreateImage(ctx)];CGContextRelease(ctx);
效果如下
–> 原图
–> 灰色图
0 0
- iOS图片灰色处理
- 图片处理成灰色的方法
- iOS开发- UITabBarItem自定义图片(去除灰色)
- 图片处理--处理成灰色图片,高斯模糊
- ios图片处理
- IOS图片处理
- ios图片处理
- IOS图片处理
- ios图片的处理
- IOS图片处理
- iOS 图片拉伸处理
- iOS处理图片
- ios图片处理
- ios 图片处理
- ios 处理图片缩放
- IOS 图片处理
- IOS处理图片旋转
- iOS之图片处理
- AVPlayerViewController使用总结
- SpringMVC-提高篇-DispatcherServlet-servlet.xml
- 认识包装类
- 自定义View实现圆形进度条(有个点在移动)
- hive中UDF、UDTF、UDAF快速上手
- iOS图片灰色处理
- centos安装lnmp
- java开发环境安装
- golang time包使用时注意时区
- JavaScript函数
- C#Socket通信基础方法知识整理
- 最便宜的VPS服务器
- 阿里云服务器被挖矿minerd入侵的解决办法,导致tomcat启动很慢
- 最小m段和问题