把UIImage 转换为NSData,然后拿到NSData的大小

NSData * imageData = UIImageJPEGRepresentation(image,1);

length = [imageData length]/1000;

NSLog(@"image-kb:%d kb,image-M:%d M", length, length/1024);

 

相关文章:

  • 2021-06-08
  • 2022-01-26
  • 2021-11-07
  • 2021-06-03
  • 2021-08-01
  • 2021-10-30
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-23
相关资源
相似解决方案