[niepce] Issue #2 - Add more Exif properties
- From: Hubert Figuière <hub src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [niepce] Issue #2 - Add more Exif properties
- Date: Fri, 21 Dec 2018 16:48:50 +0000 (UTC)
commit 7b94b352356134a5494d90269440e5be9cb53b52
Author: Hubert Figuière <hub figuiere net>
Date: Fri Dec 21 11:44:28 2018 -0500
Issue #2 - Add more Exif properties
https://gitlab.gnome.org/GNOME/niepce/issues/2
src/fwk/utils/exempi.rs | 1 +
src/fwk/utils/exiv2.rs | 18 ++++++++++++++----
2 files changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/src/fwk/utils/exempi.rs b/src/fwk/utils/exempi.rs
index d5fc77b..df02194 100644
--- a/src/fwk/utils/exempi.rs
+++ b/src/fwk/utils/exempi.rs
@@ -36,6 +36,7 @@ const UFRAW_INTEROP_NS_PREFIX: &str = "ufrint";
pub const NS_TIFF: &str = "http://ns.adobe.com/tiff/1.0/";
pub const NS_XAP: &str = "http://ns.adobe.com/xap/1.0/";
pub const NS_EXIF: &str = "http://ns.adobe.com/exif/1.0/";
+pub const NS_EXIF_EX: &str = "http://cipa.jp/exif/1.0/";
pub const NS_DC: &str = "http://purl.org/dc/elements/1.1/";
pub const NS_AUX: &str = "http://ns.adobe.com/exif/1.0/aux/";
diff --git a/src/fwk/utils/exiv2.rs b/src/fwk/utils/exiv2.rs
index 108538b..5f07b73 100644
--- a/src/fwk/utils/exiv2.rs
+++ b/src/fwk/utils/exiv2.rs
@@ -23,7 +23,7 @@ use std::collections::HashMap;
use exempi;
use rexiv2;
-use super::exempi::{Flash, XmpMeta, NS_TIFF, NS_EXIF, NS_XAP, NS_AUX, xmp_date_from_exif};
+use super::exempi::{Flash, XmpMeta, NS_TIFF, NS_EXIF, NS_EXIF_EX, NS_XAP, xmp_date_from_exif};
/// Property conversion rules
#[derive(Clone, Copy, Debug)]
@@ -58,7 +58,10 @@ lazy_static! {
("Exif.Image.Make", (NS_TIFF, "Make", Conversion::None)),
("Exif.Image.Model", (NS_TIFF, "Model", Conversion::None)),
("Exif.Image.Orientation", (NS_TIFF, "Orientation", Conversion::None)),
+ ("Exif.Image.Software", (NS_TIFF, "Software", Conversion::None)),
("Exif.Photo.ApertureValue", (NS_EXIF, "ApertureValue", Conversion::None)),
+ ("Exif.Photo.BodySerialNumber", (NS_EXIF_EX, "BodySerialNumber", Conversion::None)),
+ ("Exif.Photo.CameraOwnerName", (NS_EXIF_EX, "CameraOwnerName", Conversion::None)),
("Exif.Photo.ColorSpace", (NS_EXIF, "ColorSpace", Conversion::None)),
("Exif.Photo.DateTimeOriginal", (NS_EXIF, "DateTimeOriginal", Conversion::ExifDate)),
("Exif.Photo.DateTimeDigitized", (NS_XAP, "CreateDate", Conversion::ExifDate)),
@@ -69,7 +72,12 @@ lazy_static! {
("Exif.Photo.FNumber", (NS_EXIF, "FNumber", Conversion::None)),
("Exif.Photo.Flash", (NS_EXIF, "Flash", Conversion::Flash)),
("Exif.Photo.FocalLength", (NS_EXIF, "FocalLength", Conversion::None)),
+ ("Exif.Photo.FocalLengthIn35mmFilm", (NS_EXIF, "FocalLengthIn35mmFilm", Conversion::None)),
("Exif.Photo.ISOSpeedRatings", (NS_EXIF, "ISOSpeedRatings", Conversion::None)),
+ ("Exif.Photo.LensMake", (NS_EXIF_EX, "LensMake", Conversion::None)),
+ ("Exif.Photo.LensModel", (NS_EXIF_EX, "LensModel", Conversion::None)),
+ ("Exif.Photo.LensSerialNumber", (NS_EXIF_EX, "LensSerialNumber", Conversion::None)),
+ ("Exif.Photo.LensSpecification", (NS_EXIF_EX, "LensSpecification", Conversion::None)),
("Exif.Photo.LightSource", (NS_EXIF, "LightSource", Conversion::None)),
("Exif.Photo.MeteringMode", (NS_EXIF, "MeteringMode", Conversion::None)),
("Exif.Photo.SceneCaptureType", (NS_EXIF, "SceneCaptureType", Conversion::None)),
@@ -77,10 +85,12 @@ lazy_static! {
("Exif.Photo.UserComment", (NS_EXIF, "UserComment", Conversion::None)),
("Exif.Photo.WhiteBalance", (NS_EXIF, "WhiteBalance", Conversion::None)),
- ("Exif.Canon.LensModel", (NS_AUX, "Lens", Conversion::None)),
+ ("Exif.Canon.LensModel", (NS_EXIF_EX, "LensModel", Conversion::None)),
- ("Exif.OlympusEq.LensModel", (NS_AUX, "Lens", Conversion::None)),
- ("Exif.OlympusEq.LensSerialNumber", (NS_AUX, "LensSerialNumber", Conversion::None))
+ ("Exif.OlympusEq.LensModel", (NS_EXIF_EX, "LensModel", Conversion::None)),
+ ("Exif.OlympusEq.LensSerialNumber", (NS_EXIF_EX, "LensSerialNumber", Conversion::None)),
+
+ ("Exif.Pentax.LensType", (NS_EXIF_EX, "LensModel", Conversion::None))
].iter().cloned().collect()
};
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]