1 //NSData转换为UIImage2 NSData *imageData = [NSData dataWithContentsOfFile: imagePath];3 UIImage *image = [UIImage imageWithData: imageData];4 5 //UIImage转换为NSData6 NSData *imageData = UIImagePNGRepresentation(aimae);
本文共 282 字,大约阅读时间需要 1 分钟。
1 //NSData转换为UIImage2 NSData *imageData = [NSData dataWithContentsOfFile: imagePath];3 UIImage *image = [UIImage imageWithData: imageData];4 5 //UIImage转换为NSData6 NSData *imageData = UIImagePNGRepresentation(aimae);
转载于:https://www.cnblogs.com/wxy325/archive/2013/03/06/2946971.html