开发者

How to store the selected image in library to NSString

开发者 https://www.devze.com 2022-12-21 06:04 出处:网络
I want to get the complete url of selected image from photo library in iphone to NSString. Is it possible

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

精彩评论

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

关注公众号