internal ExifGpsData Parse( BitmapMetadata metadata )
 {
     return new ExifGpsData
     {
         GpsVersion = ParseGpsVersion( metadata ),
         ProcessingMethod = metadata.ReadString( ProcessingMethodQuery ),
         MeasureMode = ParseMeasureMode( metadata ),
         Latitude = ParseLatitude( metadata ),
         Longitude = ParseLongitude( metadata ),
         Altitude = ParseAltitude( metadata )
     };
 }
Example #2
0
 internal ExifGpsData Parse(BitmapMetadata metadata)
 {
     return(new ExifGpsData
     {
         GpsVersion = ParseGpsVersion(metadata),
         ProcessingMethod = metadata.ReadString(ProcessingMethodQuery),
         MeasureMode = ParseMeasureMode(metadata),
         Latitude = ParseLatitude(metadata),
         Longitude = ParseLongitude(metadata),
         Altitude = ParseAltitude(metadata)
     });
 }
        private static double? ParseCoordinate( BitmapMetadata metadata, string coordinateQuery, string directionQuery, string invertDirection )
        {
            var coordinates = metadata.ReadULongArray( coordinateQuery );
            if ( coordinates != null )
            {
                var coordinate = ConvertCoordinate( coordinates );

                var direction = metadata.ReadString( directionQuery );
                if ( direction == invertDirection )
                {
                    coordinate = -coordinate;
                }

                return coordinate;
            }

            return null;
        }
Example #4
0
        private static double?ParseCoordinate(BitmapMetadata metadata, string coordinateQuery, string directionQuery, string invertDirection)
        {
            var coordinates = metadata.ReadULongArray(coordinateQuery);

            if (coordinates != null)
            {
                var coordinate = ConvertCoordinate(coordinates);

                var direction = metadata.ReadString(directionQuery);
                if (direction == invertDirection)
                {
                    coordinate = -coordinate;
                }

                return(coordinate);
            }

            return(null);
        }
Example #5
0
        public static DateTime?ReadDateTime(this BitmapMetadata metadata, string query)
        {
            DateTime d;

            return(TryParseExifDateString(metadata.ReadString(query), out d) ? (DateTime?)d : null);
        }