开发者

Path and extension of image

I want to get the Path a of image of the p开发者_如何学编程hoto albums from the iPhone device. and also i need the extension of that image with their name.


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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜