UIImage NSData 相互转化

//UIImage 转为 NSData
    NSData *imageData = UIImagePNGRepresentation(aImage);
//NSData 转为 UIImage
    UIImage *newImage = [UIImage imageWithData:imageData];
原文地址:https://www.cnblogs.com/shidaying/p/4203262.html