How to get image path from photo library and retrieve its image from photo library in iphone?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/7777282/how-to-get-image-path-from-photo-library-and-how-to-retrieve-the-image-from-phot">How to get image path from photo library and how to retrieve the image from photo library in iphone?</a>  </p>
</blockquote>



<p>I'm new to iphone. In my small application, how to get image path from photo library. I use this following code to getting images and placed in imageview.</p>

<pre><code>-(IBAction) selectimage
{
    UIImagePickerController * picker = [[UIImagePickerController alloc] init];
    picker.delegate = self;
    //picker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
    if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary])
    [self presentModalViewController:picker animated:YES];  
    NSLog(@"UIPicker=%@",picker);
}

- (void)imagePickerController:(UIImagePickerController *)UIPicker didFinishPickingImage:(UIImage *)info editingInfo:(NSDictionary *)dictionary

{
imageView.image=info;
[UIPicker dismissModalViewControllerAnimated:YES];
NSLog(@"UImage path= %@",imageView.image);
}
</code></pre>

<p>Its succefully placed to Imageview. But i cant get its imagepath for storing into DB. I'm using <code>NSLog("Image path= %@",imageview.image);</code> it shows <code>"Image Path= UIImage: 0x6819790"</code> in console. How can i get its path and how to retrieve photos from photo library. </p>

<p>My current process goes like this: UIImagePickerController -> User Chooses Image from Photos -> chosenImage is set to instance of UIImageView -> Now I want to take this image and store it in the DB.</p>

<p>How can i get its image path for store into db and how can retrieve image from db using its imagepath.
Any body help me. Thanks in advance.</p>
