I use UIImagePickerController to select an image. i get following keys from info class.
UIImagePickerControllerOriginalImage = MonoTouch.UIKit.UIImage
UIImagePickerControllerReferenceURL = assets-library://asset/asset.PNG?id=1000000001&ext=PNG
UIImagePickerControllerMediaType = public.image
i can not use reference url to use this image later. what can i do to use this reference?
imageURL = e.Info[new NSString ("UIImagePickerControllerReferenceURL")].ToString ();
imageBackground = UIImage.FromFile (imageURL);
I’m pretty sure iOS doesn’t allow you direct access to the image file on purpose. Rather it creates a copy of the image (in the form of
UIImagePickerControllerOriginalImage). So in order to get aUIImageobject, you’ll be better off using:EDIT
you could try saving the
UIImageto your apps documents area then picking it up again. So something along the lines of:I haven’t been able to verify this works but it should give you a starting point. You can then access the file later on in the app. Just remember to delete the file once you’ve finished with it!