1 //NSData转换为UIImage
2 NSData *imageData = [NSData dataWithContentsOfFile: imagePath];
3 UIImage *image = [UIImage imageWithData: imageData];
4 
5 //UIImage转换为NSData
6 NSData *imageData = UIImagePNGRepresentation(aimae);

 

相关文章:

  • 2022-12-23
  • 2021-09-04
  • 2022-12-23
  • 2021-10-27
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-17
  • 2022-12-23
  • 2021-11-06
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案