diff --git a/lib/utils/xmp_utils.dart b/lib/utils/xmp_utils.dart index f660e51d6..bc7c767a0 100644 --- a/lib/utils/xmp_utils.dart +++ b/lib/utils/xmp_utils.dart @@ -23,6 +23,7 @@ class Namespaces { static const exif = 'http://ns.adobe.com/exif/1.0/'; static const exifAux = 'http://ns.adobe.com/exif/1.0/aux/'; static const exifEx = 'http://cipa.jp/exif/1.0/'; + static const fstop = 'http://www.fstopapp.com/xmp/'; static const gAudio = 'http://ns.google.com/photos/1.0/audio/'; static const gCamera = 'http://ns.google.com/photos/1.0/camera/'; static const gContainer = 'http://ns.google.com/photos/1.0/container/'; @@ -77,6 +78,7 @@ class Namespaces { static const xmpNote = 'http://ns.adobe.com/xmp/note/'; static const xmpRights = 'http://ns.adobe.com/xap/1.0/rights/'; static const xmpTPg = 'http://ns.adobe.com/xap/1.0/t/pg/'; + static const xperiaCamera = 'http://xmlns.sony.net/xperia/camera/1.0/'; // cf https://exiftool.org/TagNames/XMP.html static const Map nsTitles = { @@ -97,6 +99,7 @@ class Namespaces { dwc: 'Darwin Core', exif: 'Exif', exifEx: 'Exif Ex', + fstop: 'F-Stop', gAudio: 'Google Audio', gCamera: 'Google Camera', gContainer: 'Google Container', @@ -138,6 +141,7 @@ class Namespaces { xmpNote: 'Note', xmpRights: 'Rights Management', xmpTPg: 'Paged-Text', + xperiaCamera: 'Xperia Camera', }; static final defaultPrefixes = { diff --git a/lib/widgets/viewer/info/metadata/xmp_namespaces.dart b/lib/widgets/viewer/info/metadata/xmp_namespaces.dart index 7264a8c40..b15aba839 100644 --- a/lib/widgets/viewer/info/metadata/xmp_namespaces.dart +++ b/lib/widgets/viewer/info/metadata/xmp_namespaces.dart @@ -78,6 +78,8 @@ class XmpNamespace extends Equatable { return XmpBasicNamespace(schemaRegistryPrefixes: schemaRegistryPrefixes, rawProps: rawProps); case Namespaces.xmpMM: return XmpMMNamespace(schemaRegistryPrefixes: schemaRegistryPrefixes, rawProps: rawProps); + case Namespaces.xperiaCamera: + return XmpXperiaCameraNamespace(schemaRegistryPrefixes: schemaRegistryPrefixes, rawProps: rawProps); default: return XmpNamespace(nsUri: nsUri, schemaRegistryPrefixes: schemaRegistryPrefixes, rawProps: rawProps); } diff --git a/lib/widgets/viewer/info/metadata/xmp_ns/misc.dart b/lib/widgets/viewer/info/metadata/xmp_ns/misc.dart index a47ffccd3..77c0530c3 100644 --- a/lib/widgets/viewer/info/metadata/xmp_ns/misc.dart +++ b/lib/widgets/viewer/info/metadata/xmp_ns/misc.dart @@ -102,3 +102,12 @@ class XmpMMNamespace extends XmpNamespace { ), ]; } + +class XmpXperiaCameraNamespace extends XmpNamespace { + XmpXperiaCameraNamespace({required super.schemaRegistryPrefixes, required super.rawProps}) : super(nsUri: Namespaces.xperiaCamera); + + @override + late final List cards = [ + XmpCardData(RegExp(nsPrefix + r'Face\[(\d+)\]/(.*)')), + ]; +}