Accessing Images with File Path

Praveen_Kumar

New member
May 9, 2012
3
0
0
Visit site
I tried using the path returned by e.OriginalFileName of PhotoChooserTask to set Source of an Image and it seems to be working.

image1.Source = new BitmapImage(new Uri(e.OriginalFileName));

but what I actually want is to be able to get filepaths of more than one image at a time.
Is it Possible?

Are you sure about the Permission?:dry
 
Last edited:

rbrunner

New member
Feb 26, 2012
112
0
0
Visit site
Interesting

Hmm, looks as if I was a little too fast with my answer, and the usual super-tight WP7 security system has an exception here, probably because it would not make sense to copy the pictures into the app's isolated storage, so read access is granted to the original location.

Found this thread which might be interesting, especially the MediaLibrary info which may be the basis of your very own picture selection mechanism:
Get image file name from PhotoChooserTask - App Hub Forums
 

Praveen_Kumar

New member
May 9, 2012
3
0
0
Visit site
I have already seen the above thread. What I was looking for is to retrieve File path not file name.

Here is the exact requirement:
I want to create a custom UI and allow the user to select multiple Images(which cannot be done by PhotoChooserTask) from MediaLibrary. Once the user selects I want to retrieve the File paths(tricky part) of all the images selected and store them as Strings for later use.

Any help regarding this will be appreciated.
Thank you.:)
 

rbrunner

New member
Feb 26, 2012
112
0
0
Visit site
Does not seem to work

You are right, Picture.Name is only the file name, not a complete path, checked myself now to be sure.

Probably you have also seen this on StackOverflow already.

Looks all mixed-up and pretty hopeless to me. If you, I and a couple of other people have not found a way so far, there probably isn't any to do what you want - the WP7 API really is still imature and full of holes waiting to be filled.

I personally try to take such things as an intellectual challenge: Given the many things that are not possible (in your case selecting multiple pictures together), what can I manage to achieve despite these limitations?
 

Members online

Forum statistics

Threads
322,736
Messages
2,242,598
Members
427,978
Latest member
Duouser3