NSData与UIImage之间的转换

NSData与UIImage之间的转换
NSData *imageData = [NSData dataWithContentsOfFile: imagePath];
UIImage *aimage = [UIImage imageWithData: imageData];
//UIImage-> NSData
NSData *imageData = UIImagePNGRepresentation(aimae);

posted @ 2014-04-16 23:33  andy_shen  阅读(141)  评论(0编辑  收藏  举报