iOS:压缩图片详解手机开发
2023-06-13 09:20:12 时间
UIImage*img= [self imageWithImageSimple:image scaledToSize:CGSizeMake(210.0, 210.0)];//压缩图片 - (UIImage*)imageWithImageSimple:(UIImage*)image scaledToSize:(CGSize)newSize // Create a graphics image context UIGraphicsBeginImageContext(newSize); // Tell the old image to draw in this newcontext, with the desired // new size [image drawInRect:CGRectMake(0,0,newSize.width,newSize.height)]; // Get the new image from the context UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext(); // End the context UIGraphicsEndImageContext(); // Return the new image. return newImage; }
5191.html
app程序应用开发手机开发无线开发移动端开发相关文章
- iOS端数据库解决方案分析详解手机开发
- iOS常见文件及程序的启动原理详解手机开发
- iOS设备是否越狱的判断代码详解手机开发
- iOS获取汉字首字母详解手机开发
- iOS通过按钮点击异步加载图片代码详解手机开发
- iOS 时间类常用方法详解手机开发
- iOS发送邮件的代码详解手机开发
- iOS用ASIHttpRequest上传详解手机开发
- IOS设置UIView的边框为圆角详解手机开发
- ios 时间类转化为字符串详解手机开发
- iOS NSFileManeger 计算文件是否超时,和计算文件夹下文件的总大小详解手机开发
- IOS 图片上传处理 图片压缩 图片处理详解手机开发
- ios网络编程详解手机开发
- iOS隐藏键盘的代码详解手机开发
- iOS相应触屏事件代码详解手机开发
- ios常用动画详解手机开发
- iOS开发系列课程(03) — UIView详解手机开发
- iOS 11多项重大功能流出:Apple Pay或支持点对点支付详解手机开发
- iOS使用自签名证书实现HTTPS请求详解手机开发
- ios入门之界面基础详解手机开发
- iOS开发UI篇—自定义layer详解手机开发
- iOS—-OC特性-特殊功能宏详解手机开发
- iOS-数据加密-MD5加密详解手机开发