search

Home  >  Q&A  >  body text

objective-c - ios 给七牛上传图片,拍的照片2M左右,通过代码拿到的照片大小是5M多为什么呢?

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

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

ringa_leeringa_lee2795 days ago649

reply all(1)I'll reply

  • 伊谢尔伦

    伊谢尔伦2017-04-24 09:13:56

    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....).

    reply
    0
  • Cancelreply