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 ) }; }
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; }
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); }
public static DateTime?ReadDateTime(this BitmapMetadata metadata, string query) { DateTime d; return(TryParseExifDateString(metadata.ReadString(query), out d) ? (DateTime?)d : null); }