summaryrefslogtreecommitdiff
path: root/config_files
diff options
context:
space:
mode:
authorexiftool <exiftool@users.sourceforge.net>2021-06-09 12:48:40 -0400
committerexiftool <exiftool@users.sourceforge.net>2021-06-09 12:48:40 -0400
commit3793c3b76cfeb9f3845c3d8ab96bba6f03828b1f (patch)
tree58906d374007eb1a69b5fc3226a27c9db0b40226 /config_files
parentbd14871e8a3bc2b15ea2e3d5dd22bec4f50a6a40 (diff)
Update to 12.27
Diffstat (limited to 'config_files')
-rw-r--r--config_files/convert_regions.config39
1 files changed, 25 insertions, 14 deletions
diff --git a/config_files/convert_regions.config b/config_files/convert_regions.config
index 0384395e..481b96f1 100644
--- a/config_files/convert_regions.config
+++ b/config_files/convert_regions.config
@@ -7,15 +7,15 @@
#
# Usage: 1) Convert from MP WLPG or IPTC regions to MWG regions:
#
-# exiftool -config convert_regions.config "-regioninfo<myregion" FILE
+# exiftool -config convert_regions.config "-RegionInfo<MPRegion2MWGRegion" FILE
#
# 2) Convert from MWG or IPTC to MP WLPG regions:
#
-# exiftool -config convert_regions.config "-regioninfomp<myregionmp" FILE
+# exiftool -config convert_regions.config "-RegionInfoMP<MWGRegion2MPRegion" FILE
#
# 3) Convert from MWG or MP WLPG to IPTC regions:
#
-# exiftool -config convert_regions.config "-imageregion<myregioniptc" FILE
+# exiftool -config convert_regions.config "-ImageRegion<MWGRegion2IPTCRegion" FILE
#
# Requires: ExifTool version 11.74 or later
#
@@ -23,6 +23,8 @@
# 2013/02/20 - PH Don't add ignored MP faces
# 2017/02/13 - PH Handle MP regions without Rectangle or Name entries
# 2019/10/26 - PH Added support for the new IPTC ImageRegion
+# 2021/05-27 - PH Changed a few tag names and added shortcuts for
+# backward compatibility
#
# References: http://www.metadataworkinggroup.org/specs/
#------------------------------------------------------------------------------
@@ -32,7 +34,7 @@
'Image::ExifTool::Composite' => {
# create an MWG RegionInfo structure from a Microsoft RegionInfoMP structure
- MyRegion => {
+ MPRegion2MWGRegion => {
Require => {
0 => 'RegionInfoMP',
1 => 'ImageWidth',
@@ -69,8 +71,8 @@
},
# create an MWG RegionInfo structure from an IPTC ImageRegion list
- MyRegion2 => {
- Name => 'MyRegion',
+ IPTCRegion2MWGRegion => {
+ Name => 'MPRegion2MWGRegion',
Require => {
0 => 'ImageRegion',
1 => 'ImageWidth',
@@ -78,7 +80,7 @@
},
ValueConv => q{
my ($rgn, @newRgns);
- my $rgns = ref $val[0] eq 'ARRAY' ? $val[0] : [ $val[0] ];
+ my $rgns = ref $val[0] eq 'ARRAY' ? $val[0] : [ $val[0] ];
foreach $rgn (@$rgns) {
my %newRgn = ( Type => 'Face' );
if ($$rgn{RegionBoundary} and $$rgn{RegionBoundary}{RbShape} eq 'rectangle') {
@@ -108,7 +110,7 @@
},
# create a Microsoft RegionInfoMP structure from an MWG RegionInfo structure
- MyRegionMP => {
+ MWGRegion2MPRegion => {
Require => 'RegionInfo',
ValueConv => q{
my ($rgn, @newRgns);
@@ -129,8 +131,8 @@
},
# create a Microsoft RegionInfoMP structure from an IPTC ImageRegion list
- MyRegionMP2 => {
- Name => 'MyRegionMP',
+ IPTCRegion2MPRegion => {
+ Name => 'MWGRegion2MPRegion',
Require => {
0 => 'ImageRegion',
1 => 'ImageWidth',
@@ -138,7 +140,7 @@
},
ValueConv => q{
my ($rgn, @newRgns);
- my $rgns = ref $val[0] eq 'ARRAY' ? $val[0] : [ $val[0] ];
+ my $rgns = ref $val[0] eq 'ARRAY' ? $val[0] : [ $val[0] ];
foreach $rgn (@$rgns) {
my %newRgn;
if ($$rgn{RegionBoundary} and $$rgn{RegionBoundary}{RbShape} eq 'rectangle') {
@@ -159,7 +161,7 @@
},
# create an IPTC ImageRegion list from an MWG RegionInfo structure
- MyRegionIPTC => {
+ MWGRegion2IPTCRegion => {
Require => 'RegionInfo',
ValueConv => q{
my ($rgn, @newRgns);
@@ -187,8 +189,8 @@
},
# create an IPTC ImageRegion list from a Microsoft RegionInfoMP structure
- MyRegionIPTC2 => {
- Name => 'MyRegionIPTC',
+ MPRegion2IPTCRegion => {
+ Name => 'MWGRegion2IPTCRegion',
Require => 'RegionInfoMP',
ValueConv => q{
my ($rgn, @newRgns);
@@ -220,4 +222,13 @@
},
);
+%Image::ExifTool::UserDefined::Shortcuts = (
+ MyRegion => 'MPRegion2MWGRegion',
+ MyRegion2 => 'IPTCRegion2MWGRegion',
+ MyRegionMP => 'MWGRegion2MPRegion',
+ MyRegionMP2 => 'IPTCRegion2MPRegion',
+ MyRegionIPTC => 'MWGRegion2IPTCRegion',
+ MyRegionIPTC2 => 'MPRegion2IPTCRegion',
+);
+
1; #end