What I am doing is to save an image loaded from any source,(camera / library) and saving it to filesystem in iOS.
What I m stuck is at how I can use that save image..
I m using the following code. Its working it is creating a Test.jpg in Documents Folder.
But Really have no idea how to access this Test.jpg.
NSString *jpgPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/Test.jpg"];
[UIImageJPEGRepresentation(selectedImage.image, 1.0) writeToFile:jpgPath atomically:YES];
NSError *error;
NSFileManager *fileMgr = [NSFileManager defaultManager];
NSString *documentsDirectory = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
Use this method:
let testImage = UIImage(contentsOfFile: filePath)imageNamedlooks for an image with the specified name in the application’s main bundle.