diff --git a/crates/bl/src/upload/exif_ops.rs b/crates/bl/src/upload/exif_ops.rs index c7e7264..7fc6836 100644 --- a/crates/bl/src/upload/exif_ops.rs +++ b/crates/bl/src/upload/exif_ops.rs @@ -32,6 +32,9 @@ pub fn photo_meta_from_exif(input: Option) -> core_types::PhotoMeta { } } + // extract orientation + meta.orientation = orientation_from_exif(Some(&exif)); + // extract gps // this isn't implemented yet diff --git a/crates/core_types/src/photo.rs b/crates/core_types/src/photo.rs index 17ba2e0..78dca92 100644 --- a/crates/core_types/src/photo.rs +++ b/crates/core_types/src/photo.rs @@ -35,11 +35,13 @@ pub struct Photo { #[derive(Clone, Debug, Default, Deserialize, Serialize)] pub struct PhotoMeta { /// The date and time the photo was taken. - pub date_time: Option, + pub date_time: Option, /// The GPS coordinates where the photo was taken. - pub gps: Option<(f64, f64)>, + pub gps: Option<(f64, f64)>, + /// The original orientation of the photo (uses EXIF orientations). + pub orientation: Option, /// Extra EXIF data. - pub extra: HashMap, + pub extra: HashMap, } /// The artifacts for a photo. Not a table.