Exemplo n.º 1
0
 //Get image GPS coordinates from database by ID
 public JsonResult GetImageGPS(string Id)
 {
     try
     {
         int id = Int32.Parse(Id);
         var database = new AccessToDatabase();
         var img = database.GetImageData(id);
         var exifdata = new GetExifData();
         return Json(exifdata.GetGPS(img), JsonRequestBehavior.AllowGet);
     }
     catch(Exception)
     {
         return null;
     }
 }
Exemplo n.º 2
0
 // Get Full image EXIF information from database by ID
 public JsonResult GetImageInfo(string Id)
 {
     try
     {
         List<JSONDataFormat> data = new List<JSONDataFormat>();
         int id = Int32.Parse(Id);
         var database = new AccessToDatabase();
         var img = database.GetImageData(id);
         data.Add(new JSONDataFormat { parameter = "IMAGE INFO FROM DATABASE", data = null });
         data.Add(new JSONDataFormat { parameter = "Load Date: ", data = img.load_date });
         data.Add(new JSONDataFormat { parameter = "Change Date: ", data = img.change_date });
         var exifdata = new GetExifData();
         data.AddRange(exifdata.GetFullEXIF(img));
         return Json(data, JsonRequestBehavior.AllowGet);
     }
     catch (Exception)
     {
         return null;
     }
 }