我想从iphone中的照片库中获取所选图像的完整网址到NSString。
是否可能
我的代码是
NSString * filePath;
UIImagePickerController * picker;
picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
[self presentModalViewController:picker animated:YES];
filePath = /* Here i ant to get the complete url of selected image*/
请帮忙
答案 0 :(得分:1)
因此,您希望将图像从UIImagePickerController发送到ftp服务器。在您的委托方法中,选择UIImagePickerControllerOriginalImage
,即UIImage
个对象,然后调用UIImageJPEGRepresentation()
创建JPEG文件。然后,您可以将JPEG文件发送到您的ftp服务器。