Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Xamarin Forms GeoTag Camera iOS/Android

$
0
0

Hi all,

I am having trouble trying to save an image in iOS with metadata (GPS data) information.
Using the ALAssets library I am able to save the image w/ metadata to the photos library.

 var photo = obj.ValueForKey(new NSString("UIImagePickerControllerOriginalImage")) as UIImage;
 var meta = obj.ValueForKey(new NSString("UIImagePickerControllerMediaMetadata")) as NSDictionary;
 library.WriteImageToSavedPhotosAlbum(photo.CGImage, meta)

I then enumerate through the assets and retrieve the image with
UIImage image = UIImage.FromImage(asset.DefaultRepresentation.GetImage());
NSData data = image.AsJPEG();
data.Save(documentsDirectory, true);
This way the image is saved in the documents Directory but It appears there is no metadata (GPS data , lat, long) of the image when I view it.

Can someone provide some insight on this, basically I need the image saved to my documents directory on the app.


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>