Open MrIThompson opened 2 years ago
Hello,
I am using your library in Unity and want to grab the meta details from a photo. It is coming up with a Null Reference.
Anybody know what I am doing wrong? Path does return - "/storage/emulated/0/Android/media/..."
private async void GetMetaData(int index, string path, string width, string height) { Debug.Log(path); await ImageFile.FromFileAsync(path).ContinueWith(t => { var file = t.Result; foreach(var property in file.Properties) { Console.WriteLine(property.Name); } var latTag = file.Properties.Get<GPSLatitudeLongitude>(ExifTag.GPSLatitude); Debug.Log(latTag.ToString()); var longTag = file.Properties.Get<GPSLatitudeLongitude>(ExifTag.GPSLongitude); Debug.Log(longTag.ToString()); var dateTimeTag = file.Properties.Get(ExifTag.DateTime); DateTime dateTime = ((ExifDateTime)dateTimeTag).Value; Debug.Log("Getting MetaData Lat- "+latTag.ToFloat()+", Long- "+longTag.ToFloat()+", DateTime- "+dateTime.ToString("dd/MM/yyyy hh:mm")); SaveMetaData(index, latTag.ToFloat(), longTag.ToFloat(), dateTime.ToString("dd/MM/yyyy hh:mm"), width, height); }); }
Hello,
I am using your library in Unity and want to grab the meta details from a photo. It is coming up with a Null Reference.
Anybody know what I am doing wrong? Path does return - "/storage/emulated/0/Android/media/..."