2010-10-13 4 views
1

Je veux obtenir le chemin d'image des albums photo de l'iPhone. et aussi j'ai besoin de l'extension de cette image avec leur nom.Chemin et extension de l'image

+0

double possible de [Accès Chemin d'image] (http://stackoverflow.com/questions/3922241/accessing-image-path) – willcodejavaforfood

Répondre

1
newFilePath = [NSHomeDirectory() 
    stringByAppendingPathComponent: textFieldNormalFile_name.text]; 
//newFilePath = [NSTemporaryDirectory() stringByAppendingPathComponent: @"ChosenPic.jpg"]; 
imageData = UIImageJPEGRepresentation(img, 1.0); 
if (imageData != nil) { 
    NSLog(@"HERE [%@]", newFilePath); 
    [imageData writeToFile:newFilePath atomically:YES]; 
} 
image.image =[UIImage imageNamed:newFilePath]; 
NSLog(@"newFilePath:%@",newFilePath); 
path.text =[NSString stringWithFormat:newFilePath]; 
NSLog(@"path.text :%@",path.text); 
+0

Il travaille .. :) – sandy