While saving a PNG image using NSData writetofile saves corrupted data on the iphone disk
- by jAmi
I have a number of images (PNG,GIF and JPG) in my Application Resource Bundle.
I want some images to be saved in my Documents Directory so i use :
imgPath=[documentsDirectoryPath stringByAppendingPathComponent:@"myImage.png"];
if (![fileMgr fileExistsAtPath:imgPath]) {
[[fileMgr contentsAtPath:[[NSBundle mainBundle]…