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