Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 05-11-2011, 12:59 PM   #1 (permalink)
Registered Member
 
franium's Avatar
 
Join Date: Nov 2010
Posts: 68
franium is on a distinguished road
Default How retrieve the url of an image taken on the fly and saved in the gallery?

I allow the user to take a photo on the fly with the camera. When the user clicks on the "use" button, I save the taken image in the photo roll. After saving it, I would to retrieve the corresponding NSURL as the user had selected it.
I should find a way to automatically select it such that

Code:
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
is called again and I can use the UIImagePickerControllerReferenceURL key to retrieve the corresponding url.
How could I do?

Code:
NSURL *imageUrl = [info valueForKey:@"UIImagePickerControllerReferenceURL"];
works when the user select the image directly from the gallery.
franium is offline   Reply With Quote
Old 05-11-2011, 01:45 PM   #2 (permalink)
Reading the Documentation
 
baja_yu's Avatar
 
Join Date: Sep 2010
Location: 45.255019,19.844908
Posts: 5,414
baja_yu has a spectacular aura about
Default

I'm not sure you'll be able to do that other then presenting a new picker. Why do you need it?
baja_yu is offline   Reply With Quote
Old 05-11-2011, 02:41 PM   #3 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 24
Posts: 3,983
smithdale87 is on a distinguished road
Send a message via AIM to smithdale87
Default

Yea, what do you need the url for ?
smithdale87 is offline   Reply With Quote
Old 05-11-2011, 03:49 PM   #4 (permalink)
Registered Member
 
franium's Avatar
 
Join Date: Nov 2010
Posts: 68
franium is on a distinguished road
Default

I allow the user to choose an image from the gallery or take a photo with the camera. I would to save the image path in both cases (I use a sqlite3 database) so that I can use it to display the image in a second moment.

In the first case, I succeed in saving the url using the UIImagePickerControllerReferenceURL key. But how can I do in the second case?
franium is offline   Reply With Quote
Old 05-11-2011, 03:52 PM   #5 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 24
Posts: 3,983
smithdale87 is on a distinguished road
Send a message via AIM to smithdale87
Default

You could just save the camera image to the Documents directory and put that path in your database.
smithdale87 is offline   Reply With Quote
Old 05-11-2011, 04:03 PM   #6 (permalink)
Registered Member
 
franium's Avatar
 
Join Date: Nov 2010
Posts: 68
franium is on a distinguished road
Default

Quote:
Originally Posted by smithdale87 View Post
You could just save the camera image to the Documents directory and put that path in your database.
Yes, I know it. But my idea was that the user could find the taken images in the camera roll. And I wouldn't to duplicate the images.
Is there a way to recall the
Code:
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
as the user had selected the taken image (when the saving of the taken image is finished)?
franium is offline   Reply With Quote
Reply

Bookmarks

Tags
camera roll, images, iphone, uiimagepicker, url

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 360
7 members and 353 guests
doffing81, dre, iOS.Lover, Kirkout, MikaelBartlett, oztemel, PlutoPrime
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,663
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, LezB44
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:02 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0