<Error>: ImageIO: CGImageR

2015-09-09  本文已影响255人  TEASON

BUG出现描述
: ImageIO: CGImageReadCreateDataWithMappedFile 'open' failed '路径'
error = 2 (No such file or directory)

[BUG原因]
原因:保存时,图片已被删除
解决方案:从路径读取图片后,先转换成NSData,再生成一张新的image.

UIImage*tempImage = [[UIImagealloc]initWithContentsOfFile:path];
NSData*tempData = UIImageJPEGRepresentation(tempImage,1.0);
UIImage*newImage = [UIImageimageWithData:coverData];
上一篇下一篇

猜你喜欢

热点阅读