开发者

How to store the selected image in library to NSString

I want to get the complete url of selected image from photo library in iphone to NSString.

Is it possible

My code is

    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*/

Please h开发者_如何学JAVAelp


So you want to send an image from UIImagePickerController to a ftp server. In your delegate method, take the in UIImagePickerControllerOriginalImage, which is a UIImage object, and call UIImageJPEGRepresentation() to create a JPEG file. Then you can send the JPEG file to your ftp server.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜