NSData *data = UIImageJPEGRepresentation(image, 0.001);
UIImage * preImage = [UIImage imageWithData:data];
[preImage drawInRect:CGRectMake(0, 0, ScreenWidth, ScreenHeight)];
压缩图片分压和缩
如果只压,压到一定比例就不能再压了
所以还要缩
时间: 2024-10-16 07:37:15
NSData *data = UIImageJPEGRepresentation(image, 0.001);
UIImage * preImage = [UIImage imageWithData:data];
[preImage drawInRect:CGRectMake(0, 0, ScreenWidth, ScreenHeight)];
压缩图片分压和缩
如果只压,压到一定比例就不能再压了
所以还要缩