objective-c - ios 给七牛上传图片,拍的照片2M左右,通过代码拿到的照片大小是5M多为什么呢?
ringa_lee
ringa_lee 2017-04-24 09:11:56
0
1
588

给七牛上传图片,手机里面拍的图片就2M多,但是用这个方法

NSData *imgData = UIImageJPEGRepresentation(img, 1.0); NSLog(@"压缩Size of Image(bytes):%d",[imgData length]);
查看就5M多,怎么回事啊?而且七牛必须nsdata 才能上传。。求指导

ringa_lee
ringa_lee

ringa_lee

reply all(1)
伊谢尔伦

Resources can be uploaded to Qiniu without compression, and the upload traffic is not charged. In addition, when accessing image resources, you can use Qiniu's image processing to access thumbnails of the images (http://developer.qiniu.com/docs/v6/ api/reference/fop/image/imageview2.... and http://developer.qiniu.com/docs/v6/api/reference/fop/image/imagemogr2....).

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!