exiftool_vendored 12.17.1 → 12.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/Changes +225 -1
- data/bin/MANIFEST +23 -0
- data/bin/META.json +1 -1
- data/bin/META.yml +1 -1
- data/bin/README +45 -43
- data/bin/arg_files/xmp2exif.args +2 -1
- data/bin/config_files/acdsee.config +193 -6
- data/bin/config_files/convert_regions.config +25 -14
- data/bin/config_files/cuepointlist.config +70 -0
- data/bin/config_files/example.config +2 -9
- data/bin/exiftool +142 -87
- data/bin/fmt_files/gpx.fmt +2 -2
- data/bin/fmt_files/gpx_wpt.fmt +2 -2
- data/bin/fmt_files/kml.fmt +1 -1
- data/bin/fmt_files/kml_track.fmt +1 -1
- data/bin/lib/Image/ExifTool/Apple.pm +3 -2
- data/bin/lib/Image/ExifTool/BuildTagLookup.pm +30 -12
- data/bin/lib/Image/ExifTool/CBOR.pm +277 -0
- data/bin/lib/Image/ExifTool/Canon.pm +49 -18
- data/bin/lib/Image/ExifTool/DJI.pm +6 -6
- data/bin/lib/Image/ExifTool/DPX.pm +13 -2
- data/bin/lib/Image/ExifTool/DjVu.pm +6 -5
- data/bin/lib/Image/ExifTool/Exif.pm +28 -11
- data/bin/lib/Image/ExifTool/FITS.pm +13 -2
- data/bin/lib/Image/ExifTool/FlashPix.pm +35 -10
- data/bin/lib/Image/ExifTool/FujiFilm.pm +19 -8
- data/bin/lib/Image/ExifTool/GPS.pm +22 -11
- data/bin/lib/Image/ExifTool/Geotag.pm +13 -2
- data/bin/lib/Image/ExifTool/GoPro.pm +16 -1
- data/bin/lib/Image/ExifTool/ICC_Profile.pm +2 -2
- data/bin/lib/Image/ExifTool/ID3.pm +15 -3
- data/bin/lib/Image/ExifTool/JPEG.pm +74 -4
- data/bin/lib/Image/ExifTool/JSON.pm +27 -4
- data/bin/lib/Image/ExifTool/Jpeg2000.pm +393 -16
- data/bin/lib/Image/ExifTool/LIF.pm +153 -0
- data/bin/lib/Image/ExifTool/Lang/nl.pm +60 -59
- data/bin/lib/Image/ExifTool/M2TS.pm +137 -5
- data/bin/lib/Image/ExifTool/MIE.pm +4 -3
- data/bin/lib/Image/ExifTool/MRC.pm +341 -0
- data/bin/lib/Image/ExifTool/MWG.pm +3 -3
- data/bin/lib/Image/ExifTool/MXF.pm +1 -1
- data/bin/lib/Image/ExifTool/MacOS.pm +1 -1
- data/bin/lib/Image/ExifTool/Microsoft.pm +298 -82
- data/bin/lib/Image/ExifTool/Nikon.pm +19 -8
- data/bin/lib/Image/ExifTool/NikonSettings.pm +28 -11
- data/bin/lib/Image/ExifTool/Olympus.pm +6 -3
- data/bin/lib/Image/ExifTool/Other.pm +93 -0
- data/bin/lib/Image/ExifTool/PDF.pm +9 -12
- data/bin/lib/Image/ExifTool/PNG.pm +8 -7
- data/bin/lib/Image/ExifTool/Panasonic.pm +28 -3
- data/bin/lib/Image/ExifTool/Pentax.pm +28 -5
- data/bin/lib/Image/ExifTool/PhaseOne.pm +4 -3
- data/bin/lib/Image/ExifTool/Photoshop.pm +6 -0
- data/bin/lib/Image/ExifTool/QuickTime.pm +247 -88
- data/bin/lib/Image/ExifTool/QuickTimeStream.pl +283 -141
- data/bin/lib/Image/ExifTool/README +3 -0
- data/bin/lib/Image/ExifTool/RIFF.pm +89 -12
- data/bin/lib/Image/ExifTool/Samsung.pm +48 -10
- data/bin/lib/Image/ExifTool/Shortcuts.pm +9 -0
- data/bin/lib/Image/ExifTool/Sony.pm +237 -78
- data/bin/lib/Image/ExifTool/TagInfoXML.pm +1 -0
- data/bin/lib/Image/ExifTool/TagLookup.pm +4125 -4028
- data/bin/lib/Image/ExifTool/TagNames.pod +644 -286
- data/bin/lib/Image/ExifTool/Torrent.pm +18 -11
- data/bin/lib/Image/ExifTool/WriteExif.pl +1 -1
- data/bin/lib/Image/ExifTool/WriteIPTC.pl +1 -1
- data/bin/lib/Image/ExifTool/WritePDF.pl +1 -0
- data/bin/lib/Image/ExifTool/WritePNG.pl +2 -0
- data/bin/lib/Image/ExifTool/WritePostScript.pl +1 -0
- data/bin/lib/Image/ExifTool/WriteQuickTime.pl +55 -21
- data/bin/lib/Image/ExifTool/WriteXMP.pl +7 -3
- data/bin/lib/Image/ExifTool/Writer.pl +47 -10
- data/bin/lib/Image/ExifTool/XMP.pm +39 -14
- data/bin/lib/Image/ExifTool/XMP2.pl +2 -1
- data/bin/lib/Image/ExifTool/XMPStruct.pl +3 -1
- data/bin/lib/Image/ExifTool/ZISRAW.pm +121 -2
- data/bin/lib/Image/ExifTool.pm +223 -72
- data/bin/lib/Image/ExifTool.pod +114 -93
- data/bin/perl-Image-ExifTool.spec +43 -42
- data/lib/exiftool_vendored/version.rb +1 -1
- metadata +28 -13
|
@@ -2,20 +2,76 @@
|
|
|
2
2
|
# File: acdsee.config
|
|
3
3
|
#
|
|
4
4
|
# Description: This config file defines ACDSee XMP region tags for writing.
|
|
5
|
+
# The following tags are created in the XMP-acdsee-rs group
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# RegionInfoACDSee : The structured tag for the ACDSee regions
|
|
8
|
+
# (similar to XMP-mwg-rs:RegionInfo)
|
|
9
|
+
#
|
|
10
|
+
# The following tags are the width, height, and unit of the
|
|
11
|
+
# image at the time of processing when storing image region
|
|
12
|
+
# metadata. They are similar to the AppliedToDimensions tags
|
|
13
|
+
# of the MWG regions.
|
|
14
|
+
# ACDSeeRegionAppliedToDimensionsH : Height of the image
|
|
15
|
+
# ACDSeeRegionAppliedToDimensionsUnit : Unit of the image
|
|
16
|
+
# ACDSeeRegionAppliedToDimensionsW : Width of the image
|
|
17
|
+
#
|
|
18
|
+
# Actual region data, stored in an array. These flattened tags
|
|
19
|
+
# are treated as List Type tags. There are two region types,
|
|
20
|
+
# the ALYArea and the DLYArea. The ALYArea tags tags assigned
|
|
21
|
+
# by ACDSee and are usually square in dimensions. The DLYArea
|
|
22
|
+
# tags are both the tags assigned by ACDSee (but possibly
|
|
23
|
+
# rectangular instead of square) as well as any manual
|
|
24
|
+
# assigned tags. They are similar to the area tags of the MWG
|
|
25
|
+
# regions.
|
|
26
|
+
# ACDSeeRegionDLYAreaH : Height of DLY region
|
|
27
|
+
# ACDSeeRegionDLYAreaW : Width of DLY region
|
|
28
|
+
# ACDSeeRegionDLYAreaX : X centerpoint of DLY region
|
|
29
|
+
# ACDSeeRegionDLYAreaY : Y centerpoint of DLY region
|
|
30
|
+
# ACDSeeRegionALYAreaH : Height of ALY region
|
|
31
|
+
# ACDSeeRegionALYAreaW : Width of ALY region
|
|
32
|
+
# ACDSeeRegionALYAreaX : X centerpoint of ALY region
|
|
33
|
+
# ACDSeeRegionALYAreaY : Y centerpoint of ALY region
|
|
34
|
+
# ACDSeeRegionName : Name of region
|
|
35
|
+
# ACDSeeRegionType : Type of region
|
|
36
|
+
# ACDSeeRegionNameAssignType : How the type was assigned.
|
|
37
|
+
# "Manual" is the only known
|
|
38
|
+
# entry at this time
|
|
39
|
+
#
|
|
40
|
+
# Conversion tags. These tags can be used to convert other region
|
|
41
|
+
# type tags to ACDSee regions.
|
|
42
|
+
# MPRegion2ACDSeeRegion : Converts a Microsoft RegionInfoMP
|
|
43
|
+
# IPTCRegion2ACDSeeRegion : Converts an IPTC ImageRegion
|
|
44
|
+
# MWGRegion2ACDSeeRegion : Converts a MWG RegionInfo
|
|
45
|
+
#
|
|
46
|
+
# Usage: To set individual tags
|
|
47
|
+
# exiftool -config acdsee.config -ACDSEETAG=VALUE FILE ...
|
|
48
|
+
#
|
|
49
|
+
# To convert Microsoft Regions to ACDSee regions
|
|
50
|
+
# exiftool -config acdsee.config "-RegionInfoACDSee<MPRegion2ACDSeeRegion" File ...
|
|
51
|
+
# To convert IPTC regions to ACDSee regions
|
|
52
|
+
# exiftool -config acdsee.config "-RegionInfoACDSee<IPTCRegion2ACDSeeRegion" File ...
|
|
53
|
+
# To convert MWG Regions to ACDSee regions
|
|
54
|
+
# exiftool -config acdsee.config "-RegionInfoACDSee<MWGRegion2ACDSeeRegion" File ...
|
|
7
55
|
#
|
|
8
56
|
# Requires: ExifTool version 10.28 or later
|
|
9
57
|
#
|
|
10
58
|
# Revisions: 2020/01/28 - Bryan K. Williams (aka StarGeek) Created
|
|
59
|
+
# 2021/04/08 - BKW Added tags to convert from Microsoft, IPTC,
|
|
60
|
+
# and MWG regions to ACDSee regions based upon
|
|
61
|
+
# convert_regions.config. Expanded docs.
|
|
62
|
+
# Shortened ADCSee tag names and added shortcuts
|
|
63
|
+
# from original names to new names, for example
|
|
64
|
+
# "RegionInfoACDSeeAppliedToDimensions*" -> "ACDSeeRegionAppliedToDimensions*"
|
|
65
|
+
# "RegionInfoACDSeeRegionList* -> "ACDSeeRegion*"
|
|
11
66
|
#------------------------------------------------------------------------------
|
|
67
|
+
use Data::Dumper;
|
|
12
68
|
|
|
13
69
|
my %sACDSeeDimensions = (
|
|
14
70
|
STRUCT_NAME => 'ACDSee Dimensions',
|
|
15
71
|
NAMESPACE => {'acdsee-stDim' => 'http://ns.acdsee.com/sType/Dimensions#'},
|
|
16
|
-
'w'
|
|
17
|
-
'h'
|
|
18
|
-
'unit'
|
|
72
|
+
'w' => { Writable => 'real' },
|
|
73
|
+
'h' => { Writable => 'real' },
|
|
74
|
+
'unit' => { },
|
|
19
75
|
);
|
|
20
76
|
|
|
21
77
|
my %sACDSeeArea = (
|
|
@@ -38,7 +94,7 @@ my %sACDSeeRegionStruct = (
|
|
|
38
94
|
);
|
|
39
95
|
|
|
40
96
|
%Image::ExifTool::UserDefined = (
|
|
41
|
-
# new XMP namespaces
|
|
97
|
+
# new XMP namespaces for ACDSee regions
|
|
42
98
|
'Image::ExifTool::XMP::Main' => {
|
|
43
99
|
'acdsee-rs' => { # <-- must be the same as the NAMESPACE prefix
|
|
44
100
|
SubDirectory => {
|
|
@@ -46,6 +102,112 @@ my %sACDSeeRegionStruct = (
|
|
|
46
102
|
},
|
|
47
103
|
},
|
|
48
104
|
},
|
|
105
|
+
'Image::ExifTool::Composite' => {
|
|
106
|
+
# create an ACDSee RegionInfo structure from a Microsoft RegionInfoMP structure
|
|
107
|
+
MPRegion2ACDSeeRegion => {
|
|
108
|
+
Require => {
|
|
109
|
+
0 => 'RegionInfoMP',
|
|
110
|
+
1 => 'ImageWidth',
|
|
111
|
+
2 => 'ImageHeight',
|
|
112
|
+
},
|
|
113
|
+
ValueConv => q{
|
|
114
|
+
my ($rgn, @newRgns);
|
|
115
|
+
foreach $rgn (@{$val[0]{Regions}}) {
|
|
116
|
+
my $name = $$rgn{PersonDisplayName};
|
|
117
|
+
next unless $$rgn{Rectangle} or defined $name;
|
|
118
|
+
my %newRgn = ( Type => 'Face' );
|
|
119
|
+
if (defined $name) {
|
|
120
|
+
# don't add ignored faces
|
|
121
|
+
next if $name eq 'ffffffffffffffff';
|
|
122
|
+
$newRgn{Name} = $name;
|
|
123
|
+
}
|
|
124
|
+
if ($$rgn{Rectangle}) {
|
|
125
|
+
my @rect = split /\s*,\s*/, $$rgn{Rectangle};
|
|
126
|
+
$newRgn{DLYArea} = {
|
|
127
|
+
X => $rect[0] + $rect[2]/2,
|
|
128
|
+
Y => $rect[1] + $rect[3]/2,
|
|
129
|
+
W => $rect[2],
|
|
130
|
+
H => $rect[3],
|
|
131
|
+
} if @rect == 4;
|
|
132
|
+
}
|
|
133
|
+
push @newRgns, \%newRgn;
|
|
134
|
+
}
|
|
135
|
+
return {
|
|
136
|
+
AppliedToDimensions => { W => $val[1], H => $val[2], Unit => 'pixel' },
|
|
137
|
+
RegionList => \@newRgns,
|
|
138
|
+
};
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
# create an ACDSee RegionInfo structure from an IPTC ImageRegion list
|
|
142
|
+
IPTCRegion2ACDSeeRegion => {
|
|
143
|
+
Require => {
|
|
144
|
+
0 => 'ImageRegion',
|
|
145
|
+
1 => 'ImageWidth',
|
|
146
|
+
2 => 'ImageHeight',
|
|
147
|
+
},
|
|
148
|
+
ValueConv => q{
|
|
149
|
+
my ($rgn, @newRgns);
|
|
150
|
+
my $rgns = ref $val[0] eq 'ARRAY' ? $val[0] : [ $val[0] ];
|
|
151
|
+
foreach $rgn (@$rgns) {
|
|
152
|
+
my %newRgn = ( Type => 'Face' );
|
|
153
|
+
if ($$rgn{RegionBoundary} and $$rgn{RegionBoundary}{RbShape} eq 'rectangle') {
|
|
154
|
+
my @rect = @{$$rgn{RegionBoundary}}{'RbX','RbY','RbW','RbH'};
|
|
155
|
+
if ($$rgn{RegionBoundary}{RbUnit} eq 'pixel') {
|
|
156
|
+
$rect[0] /= $val[1], $rect[2] /= $val[1];
|
|
157
|
+
$rect[1] /= $val[2]; $rect[3] /= $val[2];
|
|
158
|
+
}
|
|
159
|
+
$newRgn{'DLYArea'} = {
|
|
160
|
+
X => $rect[0] + $rect[2]/2,
|
|
161
|
+
Y => $rect[1] + $rect[3]/2,
|
|
162
|
+
W => $rect[2],
|
|
163
|
+
H => $rect[3],
|
|
164
|
+
};
|
|
165
|
+
} else {
|
|
166
|
+
next unless defined $$rgn{Name};
|
|
167
|
+
}
|
|
168
|
+
$newRgn{Name} = $$rgn{Name} if defined $$rgn{Name};
|
|
169
|
+
push @newRgns, \%newRgn;
|
|
170
|
+
}
|
|
171
|
+
return {
|
|
172
|
+
AppliedToDimensions => { 'W' => $val[1], 'H' => $val[2], 'Unit' => 'pixel' },
|
|
173
|
+
RegionList => \@newRgns,
|
|
174
|
+
};
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
|
|
178
|
+
# create an MWG RegionInfo structure from an IPTC ImageRegion list
|
|
179
|
+
MWGRegion2ACDSeeRegion => {
|
|
180
|
+
Require => {
|
|
181
|
+
0 => 'RegionInfo',
|
|
182
|
+
1 => 'ImageWidth',
|
|
183
|
+
2 => 'ImageHeight',
|
|
184
|
+
},
|
|
185
|
+
ValueConv => q{
|
|
186
|
+
my ($rgn, @newRgns);
|
|
187
|
+
my %newRgn;
|
|
188
|
+
foreach $rgn (@{$val[0]{RegionList}}) {
|
|
189
|
+
next unless $$rgn{Area} or defined $$rgn{Name};
|
|
190
|
+
my %newRgn;
|
|
191
|
+
if ($$rgn{Area}) {
|
|
192
|
+
$newRgn{'DLYArea'} = {
|
|
193
|
+
'X' => $$rgn{Area}{'X'},
|
|
194
|
+
'Y' => $$rgn{Area}{'Y'},
|
|
195
|
+
'W' => $$rgn{Area}{'W'},
|
|
196
|
+
'H' => $$rgn{Area}{'H'},
|
|
197
|
+
};
|
|
198
|
+
};
|
|
199
|
+
$newRgn{Name} = $$rgn{Name} if defined $$rgn{Name};
|
|
200
|
+
$newRgn{'Type'} = $$rgn{'Type'} if defined $$rgn{'Type'};
|
|
201
|
+
push @newRgns, \%newRgn;
|
|
202
|
+
}
|
|
203
|
+
return {
|
|
204
|
+
'AppliedToDimensions' => $val[0]{'AppliedToDimensions'},
|
|
205
|
+
RegionList => \@newRgns,
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
####
|
|
210
|
+
},
|
|
49
211
|
);
|
|
50
212
|
|
|
51
213
|
%Image::ExifTool::UserDefined::ACDSeeRegions = (
|
|
@@ -54,18 +216,43 @@ my %sACDSeeRegionStruct = (
|
|
|
54
216
|
WRITABLE => 'string', # (default to string-type tags)
|
|
55
217
|
Regions => {
|
|
56
218
|
Name => 'RegionInfoACDSee',
|
|
219
|
+
FlatName => 'ACDSee',
|
|
57
220
|
# the "Struct" entry defines the structure fields
|
|
58
221
|
Struct => {
|
|
59
222
|
# optional structure name (used for warning messages only)
|
|
60
223
|
STRUCT_NAME => 'ACDSee RegionInfo',
|
|
61
224
|
RegionList => {
|
|
225
|
+
FlatName => 'Region',
|
|
62
226
|
Struct => \%sACDSeeRegionStruct,
|
|
63
227
|
List => 'Bag',
|
|
64
228
|
},
|
|
65
|
-
AppliedToDimensions => {
|
|
229
|
+
AppliedToDimensions => {
|
|
230
|
+
FlatName => 'RegionAppliedToDimensions',Struct => \%sACDSeeDimensions },
|
|
66
231
|
},
|
|
67
232
|
},
|
|
68
233
|
);
|
|
69
234
|
|
|
235
|
+
# Shortcuts to old names added so as not to break previously used commands
|
|
236
|
+
%Image::ExifTool::UserDefined::Shortcuts = (
|
|
237
|
+
RegionInfoACDSeeAppliedToDimensionsH => 'ACDSeeRegionAppliedToDimensionsH',
|
|
238
|
+
RegionInfoACDSeeAppliedToDimensionsUnit => 'ACDSeeRegionAppliedToDimensionsUnit',
|
|
239
|
+
RegionInfoACDSeeAppliedToDimensionsW => 'ACDSeeRegionAppliedToDimensionsW',
|
|
240
|
+
RegionInfoACDSeeRegionListDLYAreaH => 'ACDSeeRegionDLYAreaH',
|
|
241
|
+
RegionInfoACDSeeRegionListDLYAreaW => 'ACDSeeRegionDLYAreaW',
|
|
242
|
+
RegionInfoACDSeeRegionListDLYAreaX => 'ACDSeeRegionDLYAreaX',
|
|
243
|
+
RegionInfoACDSeeRegionListDLYAreaY => 'ACDSeeRegionDLYAreaY',
|
|
244
|
+
RegionInfoACDSeeRegionListALGAreaH => 'ACDSeeRegionALGAreaH',
|
|
245
|
+
RegionInfoACDSeeRegionListALGAreaW => 'ACDSeeRegionALGAreaW',
|
|
246
|
+
RegionInfoACDSeeRegionListALGAreaX => 'ACDSeeRegionALGAreaX',
|
|
247
|
+
RegionInfoACDSeeRegionListALGAreaY => 'ACDSeeRegionALGAreaY',
|
|
248
|
+
RegionInfoACDSeeRegionListName => 'ACDSeeRegionName',
|
|
249
|
+
RegionInfoACDSeeRegionListType => 'ACDSeeRegionType',
|
|
250
|
+
RegionInfoACDSeeRegionListNameAssignType => 'ACDSeeRegionNameAssignType',
|
|
251
|
+
);
|
|
252
|
+
|
|
253
|
+
# Forced -struct option during debugging
|
|
254
|
+
#%Image::ExifTool::UserDefined::Options = (
|
|
255
|
+
# Struct => 1,
|
|
256
|
+
#);
|
|
70
257
|
#------------------------------------------------------------------------------
|
|
71
258
|
1; #end
|
|
@@ -7,15 +7,15 @@
|
|
|
7
7
|
#
|
|
8
8
|
# Usage: 1) Convert from MP WLPG or IPTC regions to MWG regions:
|
|
9
9
|
#
|
|
10
|
-
# exiftool -config convert_regions.config "-
|
|
10
|
+
# exiftool -config convert_regions.config "-RegionInfo<MPRegion2MWGRegion" FILE
|
|
11
11
|
#
|
|
12
12
|
# 2) Convert from MWG or IPTC to MP WLPG regions:
|
|
13
13
|
#
|
|
14
|
-
# exiftool -config convert_regions.config "-
|
|
14
|
+
# exiftool -config convert_regions.config "-RegionInfoMP<MWGRegion2MPRegion" FILE
|
|
15
15
|
#
|
|
16
16
|
# 3) Convert from MWG or MP WLPG to IPTC regions:
|
|
17
17
|
#
|
|
18
|
-
# exiftool -config convert_regions.config "-
|
|
18
|
+
# exiftool -config convert_regions.config "-ImageRegion<MWGRegion2IPTCRegion" FILE
|
|
19
19
|
#
|
|
20
20
|
# Requires: ExifTool version 11.74 or later
|
|
21
21
|
#
|
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
# 2013/02/20 - PH Don't add ignored MP faces
|
|
24
24
|
# 2017/02/13 - PH Handle MP regions without Rectangle or Name entries
|
|
25
25
|
# 2019/10/26 - PH Added support for the new IPTC ImageRegion
|
|
26
|
+
# 2021/05-27 - PH Changed a few tag names and added shortcuts for
|
|
27
|
+
# backward compatibility
|
|
26
28
|
#
|
|
27
29
|
# References: http://www.metadataworkinggroup.org/specs/
|
|
28
30
|
#------------------------------------------------------------------------------
|
|
@@ -32,7 +34,7 @@
|
|
|
32
34
|
'Image::ExifTool::Composite' => {
|
|
33
35
|
|
|
34
36
|
# create an MWG RegionInfo structure from a Microsoft RegionInfoMP structure
|
|
35
|
-
|
|
37
|
+
MPRegion2MWGRegion => {
|
|
36
38
|
Require => {
|
|
37
39
|
0 => 'RegionInfoMP',
|
|
38
40
|
1 => 'ImageWidth',
|
|
@@ -69,8 +71,8 @@
|
|
|
69
71
|
},
|
|
70
72
|
|
|
71
73
|
# create an MWG RegionInfo structure from an IPTC ImageRegion list
|
|
72
|
-
|
|
73
|
-
Name => '
|
|
74
|
+
IPTCRegion2MWGRegion => {
|
|
75
|
+
Name => 'MPRegion2MWGRegion',
|
|
74
76
|
Require => {
|
|
75
77
|
0 => 'ImageRegion',
|
|
76
78
|
1 => 'ImageWidth',
|
|
@@ -78,7 +80,7 @@
|
|
|
78
80
|
},
|
|
79
81
|
ValueConv => q{
|
|
80
82
|
my ($rgn, @newRgns);
|
|
81
|
-
my $rgns = ref $val[0] eq 'ARRAY' ? $val[0] : [ $val[0] ];
|
|
83
|
+
my $rgns = ref $val[0] eq 'ARRAY' ? $val[0] : [ $val[0] ];
|
|
82
84
|
foreach $rgn (@$rgns) {
|
|
83
85
|
my %newRgn = ( Type => 'Face' );
|
|
84
86
|
if ($$rgn{RegionBoundary} and $$rgn{RegionBoundary}{RbShape} eq 'rectangle') {
|
|
@@ -108,7 +110,7 @@
|
|
|
108
110
|
},
|
|
109
111
|
|
|
110
112
|
# create a Microsoft RegionInfoMP structure from an MWG RegionInfo structure
|
|
111
|
-
|
|
113
|
+
MWGRegion2MPRegion => {
|
|
112
114
|
Require => 'RegionInfo',
|
|
113
115
|
ValueConv => q{
|
|
114
116
|
my ($rgn, @newRgns);
|
|
@@ -129,8 +131,8 @@
|
|
|
129
131
|
},
|
|
130
132
|
|
|
131
133
|
# create a Microsoft RegionInfoMP structure from an IPTC ImageRegion list
|
|
132
|
-
|
|
133
|
-
Name => '
|
|
134
|
+
IPTCRegion2MPRegion => {
|
|
135
|
+
Name => 'MWGRegion2MPRegion',
|
|
134
136
|
Require => {
|
|
135
137
|
0 => 'ImageRegion',
|
|
136
138
|
1 => 'ImageWidth',
|
|
@@ -138,7 +140,7 @@
|
|
|
138
140
|
},
|
|
139
141
|
ValueConv => q{
|
|
140
142
|
my ($rgn, @newRgns);
|
|
141
|
-
my $rgns = ref $val[0] eq 'ARRAY' ? $val[0] : [ $val[0] ];
|
|
143
|
+
my $rgns = ref $val[0] eq 'ARRAY' ? $val[0] : [ $val[0] ];
|
|
142
144
|
foreach $rgn (@$rgns) {
|
|
143
145
|
my %newRgn;
|
|
144
146
|
if ($$rgn{RegionBoundary} and $$rgn{RegionBoundary}{RbShape} eq 'rectangle') {
|
|
@@ -159,7 +161,7 @@
|
|
|
159
161
|
},
|
|
160
162
|
|
|
161
163
|
# create an IPTC ImageRegion list from an MWG RegionInfo structure
|
|
162
|
-
|
|
164
|
+
MWGRegion2IPTCRegion => {
|
|
163
165
|
Require => 'RegionInfo',
|
|
164
166
|
ValueConv => q{
|
|
165
167
|
my ($rgn, @newRgns);
|
|
@@ -187,8 +189,8 @@
|
|
|
187
189
|
},
|
|
188
190
|
|
|
189
191
|
# create an IPTC ImageRegion list from a Microsoft RegionInfoMP structure
|
|
190
|
-
|
|
191
|
-
Name => '
|
|
192
|
+
MPRegion2IPTCRegion => {
|
|
193
|
+
Name => 'MWGRegion2IPTCRegion',
|
|
192
194
|
Require => 'RegionInfoMP',
|
|
193
195
|
ValueConv => q{
|
|
194
196
|
my ($rgn, @newRgns);
|
|
@@ -220,4 +222,13 @@
|
|
|
220
222
|
},
|
|
221
223
|
);
|
|
222
224
|
|
|
225
|
+
%Image::ExifTool::UserDefined::Shortcuts = (
|
|
226
|
+
MyRegion => 'MPRegion2MWGRegion',
|
|
227
|
+
MyRegion2 => 'IPTCRegion2MWGRegion',
|
|
228
|
+
MyRegionMP => 'MWGRegion2MPRegion',
|
|
229
|
+
MyRegionMP2 => 'IPTCRegion2MPRegion',
|
|
230
|
+
MyRegionIPTC => 'MWGRegion2IPTCRegion',
|
|
231
|
+
MyRegionIPTC2 => 'MPRegion2IPTCRegion',
|
|
232
|
+
);
|
|
233
|
+
|
|
223
234
|
1; #end
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
#------------------------------------------------------------------------------
|
|
2
|
+
# File: cuepointlist.config
|
|
3
|
+
#
|
|
4
|
+
# Description: ExifTool config file to generate list of cue points and labels
|
|
5
|
+
# in WAV audio files
|
|
6
|
+
#
|
|
7
|
+
# Usage: exiftool -config cuepointlist.config -cuepointlist -b FILE
|
|
8
|
+
#
|
|
9
|
+
# Requires: ExifTool version 12.25 or later
|
|
10
|
+
#
|
|
11
|
+
# Revisions: 2021-04-20 - P. Harvey Created
|
|
12
|
+
#------------------------------------------------------------------------------
|
|
13
|
+
|
|
14
|
+
%Image::ExifTool::UserDefined = (
|
|
15
|
+
'Image::ExifTool::Composite' => {
|
|
16
|
+
CuePointList => {
|
|
17
|
+
Require => {
|
|
18
|
+
0 => 'CuePoints',
|
|
19
|
+
1 => 'SampleRate',
|
|
20
|
+
},
|
|
21
|
+
Desire => {
|
|
22
|
+
2 => 'CuePointLabel',
|
|
23
|
+
3 => 'CuePointNotes',
|
|
24
|
+
4 => 'LabeledText',
|
|
25
|
+
},
|
|
26
|
+
ValueConv => q{
|
|
27
|
+
SetByteOrder('II');
|
|
28
|
+
my (%lbl, %rgn, %rtyp, %rlbl, %note, $pos, $i);
|
|
29
|
+
# get labels if available
|
|
30
|
+
for ($i=1; defined $val[2]; ++$i) {
|
|
31
|
+
$lbl{$1} = $2 if $val[2] =~ /^(\d+) (.*)/ and length $2;
|
|
32
|
+
$val[2] = $self->GetValue("CuePointLabel ($i)");
|
|
33
|
+
}
|
|
34
|
+
# get notes if available
|
|
35
|
+
for ($i=1; defined $val[3]; ++$i) {
|
|
36
|
+
$note{$1} = $2 if $val[3] =~ /^(\d+) (.*)/ and length $2;
|
|
37
|
+
$val[3] = $self->GetValue("CuePointNotes ($i)");
|
|
38
|
+
}
|
|
39
|
+
# get regions if available
|
|
40
|
+
for ($i=1; defined $val[4]; ++$i) {
|
|
41
|
+
if ($val[4] =~ /^(\d+) (\d+) '(.*)' \d+ \d+ \d+ \d+ (.*)/) {
|
|
42
|
+
$rgn{$1} = $2;
|
|
43
|
+
$rtyp{$1} = $3;
|
|
44
|
+
$rlbl{$1} = $4;
|
|
45
|
+
}
|
|
46
|
+
$val[4] = $self->GetValue("LabeledText ($i)");
|
|
47
|
+
}
|
|
48
|
+
my $buff = "Cue\tStart\tEnd\tLabel\tPurpose\tText\tNotes\n";
|
|
49
|
+
for ($pos=4; $pos+24<=length(${$val[0]}); $pos+=24) {
|
|
50
|
+
my $n = Get32u($val[0], $pos);
|
|
51
|
+
my $start = Get32u($val[0], $pos + 4);
|
|
52
|
+
my (@lbl, $lbl);
|
|
53
|
+
push @lbl, $lbl{$n} if defined $lbl{$n};
|
|
54
|
+
push @lbl, $rlbl{$n} if defined $rlbl{$n};
|
|
55
|
+
push @lbl, '-', $note{$n} if defined $note{$n};
|
|
56
|
+
my $lbl = join ' ', @lbl;
|
|
57
|
+
$buff .= sprintf("%d\t%.3f\t%.3f\t%s\t%s\t%s\t%s\n",
|
|
58
|
+
$n, $start/$val[1], ($start+($rgn{$n}||0))/$val[1],
|
|
59
|
+
defined($lbl{$n}) ? $lbl{$n} : '',
|
|
60
|
+
defined($rtyp{$n}) ? $rtyp{$n} : '',
|
|
61
|
+
defined($rlbl{$n}) ? $rlbl{$n} : '',
|
|
62
|
+
defined($note{$n}) ? $note{$n} : '');
|
|
63
|
+
}
|
|
64
|
+
return $buff;
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
1; # end
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
# Example 12. PNG:NewPngTag1
|
|
134
134
|
NewPngTag1 => { },
|
|
135
135
|
# Example 13. PNG:NewPngTag2
|
|
136
|
-
NewPngTag2 => { },
|
|
136
|
+
NewPngTag2 => { iTXt => 1 }, # (force this tag to be written as iTXt)
|
|
137
137
|
# Example 14. PNG:NewPngTag3
|
|
138
138
|
NewPngTag3 => { },
|
|
139
139
|
},
|
|
@@ -165,14 +165,7 @@
|
|
|
165
165
|
# specified, then at least one of the Desire'd tags must exist. See
|
|
166
166
|
# the Composite table in Image::ExifTool::Exif for more examples,
|
|
167
167
|
# and lib/Image/ExifTool/README for all of the details.
|
|
168
|
-
|
|
169
|
-
Require => {
|
|
170
|
-
0 => 'FileName',
|
|
171
|
-
},
|
|
172
|
-
# remove the extension from FileName
|
|
173
|
-
ValueConv => '$val[0] =~ /(.*)\./ ? $1 : $val[0]',
|
|
174
|
-
},
|
|
175
|
-
# the next few examples demonstrate simplifications which may be
|
|
168
|
+
# The first few examples demonstrate simplifications which may be
|
|
176
169
|
# used if only one tag is Require'd or Desire'd:
|
|
177
170
|
# 1) the Require lookup may be replaced with a simple tag name
|
|
178
171
|
# 2) "$val" may be used to represent "$val[0]" in the expression
|