[shotwell] Do not make GPS altitude mandatory



commit f0ebdc55617e4be9c48bb964428e03576e4e87a2
Author: Jens Georg <mail jensge org>
Date:   Wed Sep 7 22:44:44 2022 +0200

    Do not make GPS altitude mandatory
    
    Fixes #4989

 src/photos/PhotoMetadata.vala | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/src/photos/PhotoMetadata.vala b/src/photos/PhotoMetadata.vala
index 9dcdf1b8..27c14c80 100644
--- a/src/photos/PhotoMetadata.vala
+++ b/src/photos/PhotoMetadata.vala
@@ -1162,12 +1162,17 @@ public class PhotoMetadata : MediaMetadata {
     
     public bool get_gps(out double longitude, out string long_ref, out double latitude, out string lat_ref,
         out double altitude) {
-        if (!exiv2.get_gps_info(out longitude, out latitude, out altitude)) {
+        longitude = 0.0;
+        latitude = 0.0;
+        altitude = 0.0;
+        if (!exiv2.get_gps_longitude(out longitude) || !exiv2.get_gps_latitude(out latitude)) {
             long_ref = null;
             lat_ref = null;
             
             return false;
         }
+
+        exiv2.get_gps_altitude(out altitude);
         
         long_ref = get_string("Exif.GPSInfo.GPSLongitudeRef");
         lat_ref = get_string("Exif.GPSInfo.GPSLatitudeRef");


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]