info: improved some xmp display
This commit is contained in:
parent
4abc9c9844
commit
4e441e8491
2 changed files with 23 additions and 6 deletions
|
@ -26,6 +26,7 @@ class XMP {
|
||||||
'GPano': 'Google Panorama',
|
'GPano': 'Google Panorama',
|
||||||
'illustrator': 'Illustrator',
|
'illustrator': 'Illustrator',
|
||||||
'Iptc4xmpCore': 'IPTC Core',
|
'Iptc4xmpCore': 'IPTC Core',
|
||||||
|
'Iptc4xmpExt': 'IPTC Extension',
|
||||||
'lr': 'Lightroom',
|
'lr': 'Lightroom',
|
||||||
'MicrosoftPhoto': 'Microsoft Photo',
|
'MicrosoftPhoto': 'Microsoft Photo',
|
||||||
'mwg-rs': 'Regions',
|
'mwg-rs': 'Regions',
|
||||||
|
|
|
@ -6,9 +6,13 @@ class XmpCrsNamespace extends XmpNamespace {
|
||||||
static const ns = 'crs';
|
static const ns = 'crs';
|
||||||
|
|
||||||
static final cgbcPattern = RegExp(ns + r':CircularGradientBasedCorrections\[(\d+)\]/(.*)');
|
static final cgbcPattern = RegExp(ns + r':CircularGradientBasedCorrections\[(\d+)\]/(.*)');
|
||||||
|
static final gbcPattern = RegExp(ns + r':GradientBasedCorrections\[(\d+)\]/(.*)');
|
||||||
|
static final pbcPattern = RegExp(ns + r':PaintBasedCorrections\[(\d+)\]/(.*)');
|
||||||
static final lookPattern = RegExp(ns + r':Look/(.*)');
|
static final lookPattern = RegExp(ns + r':Look/(.*)');
|
||||||
|
|
||||||
final cgbc = <int, Map<String, String>>{};
|
final cgbc = <int, Map<String, String>>{};
|
||||||
|
final gbc = <int, Map<String, String>>{};
|
||||||
|
final pbc = <int, Map<String, String>>{};
|
||||||
final look = <String, String>{};
|
final look = <String, String>{};
|
||||||
|
|
||||||
XmpCrsNamespace(Map<String, String> rawProps) : super(ns, rawProps);
|
XmpCrsNamespace(Map<String, String> rawProps) : super(ns, rawProps);
|
||||||
|
@ -16,21 +20,33 @@ class XmpCrsNamespace extends XmpNamespace {
|
||||||
@override
|
@override
|
||||||
bool extractData(XmpProp prop) {
|
bool extractData(XmpProp prop) {
|
||||||
final hasStructs = extractStruct(prop, lookPattern, look);
|
final hasStructs = extractStruct(prop, lookPattern, look);
|
||||||
final hasIndexedStructs = extractIndexedStruct(prop, cgbcPattern, cgbc);
|
var hasIndexedStructs = extractIndexedStruct(prop, cgbcPattern, cgbc);
|
||||||
|
hasIndexedStructs |= extractIndexedStruct(prop, gbcPattern, gbc);
|
||||||
|
hasIndexedStructs |= extractIndexedStruct(prop, pbcPattern, pbc);
|
||||||
return hasStructs || hasIndexedStructs;
|
return hasStructs || hasIndexedStructs;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
List<Widget> buildFromExtractedData() => [
|
List<Widget> buildFromExtractedData() => [
|
||||||
if (look.isNotEmpty)
|
|
||||||
XmpStructCard(
|
|
||||||
title: 'Look',
|
|
||||||
struct: look,
|
|
||||||
),
|
|
||||||
if (cgbc.isNotEmpty)
|
if (cgbc.isNotEmpty)
|
||||||
XmpStructArrayCard(
|
XmpStructArrayCard(
|
||||||
title: 'Circular Gradient Based Corrections',
|
title: 'Circular Gradient Based Corrections',
|
||||||
structByIndex: cgbc,
|
structByIndex: cgbc,
|
||||||
),
|
),
|
||||||
|
if (gbc.isNotEmpty)
|
||||||
|
XmpStructArrayCard(
|
||||||
|
title: 'Gradient Based Corrections',
|
||||||
|
structByIndex: gbc,
|
||||||
|
),
|
||||||
|
if (look.isNotEmpty)
|
||||||
|
XmpStructCard(
|
||||||
|
title: 'Look',
|
||||||
|
struct: look,
|
||||||
|
),
|
||||||
|
if (pbc.isNotEmpty)
|
||||||
|
XmpStructArrayCard(
|
||||||
|
title: 'Paint Based Corrections',
|
||||||
|
structByIndex: pbc,
|
||||||
|
),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue