-(void)saveImageToTemporaryDirectory:(UIImage*)img {
NSLog(@"-(void)saveImageToTemp:(UIImage*)img {");
NSString *tmpDir = NSTemporaryDirectory();
NSString *directoryNameFileName = [tmpDir stringByAppendingPathComponent:@"TMPIMAGE.jpg"];
// AUTO ROTATES????
[UIImageJPEGRepresentation(img, 1.0) writeToFile:directoryNameFileName atomically:YES];
}
-(void)saveImageToDocumentsDirectory:(UIImage*)img {
NSLog(@"-(void)saveImageToDocuments:(UIImage*)img {");
NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDir = [documentPaths objectAtIndex:0];
NSString *directoryNameFileName = [documentsDir stringByAppendingPathComponent:@"SAVED_IMAGE.jpg"];
[UIImageJPEGRepresentation(img, 1.0) writeToFile:directoryNameFileName atomically:YES];
NSError *error;
NSFileManager *fileManager = [NSFileManager defaultManager];
NSLog(@"Documents: %@", [fileManager contentsOfDirectoryAtPath:[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"] error:&error]);
}