exiftool_vendored 12.25.0 → 12.35.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +174 -7
  3. data/bin/MANIFEST +11 -0
  4. data/bin/META.json +1 -1
  5. data/bin/META.yml +1 -1
  6. data/bin/README +44 -43
  7. data/bin/arg_files/xmp2exif.args +2 -1
  8. data/bin/config_files/convert_regions.config +25 -14
  9. data/bin/config_files/example.config +1 -1
  10. data/bin/exiftool +118 -92
  11. data/bin/fmt_files/gpx.fmt +1 -1
  12. data/bin/fmt_files/gpx_wpt.fmt +1 -1
  13. data/bin/lib/Image/ExifTool/BuildTagLookup.pm +16 -3
  14. data/bin/lib/Image/ExifTool/CBOR.pm +331 -0
  15. data/bin/lib/Image/ExifTool/Canon.pm +52 -20
  16. data/bin/lib/Image/ExifTool/Charset.pm +2 -0
  17. data/bin/lib/Image/ExifTool/DPX.pm +13 -2
  18. data/bin/lib/Image/ExifTool/Exif.pm +107 -8
  19. data/bin/lib/Image/ExifTool/FLIR.pm +33 -8
  20. data/bin/lib/Image/ExifTool/FlashPix.pm +35 -10
  21. data/bin/lib/Image/ExifTool/FujiFilm.pm +1 -0
  22. data/bin/lib/Image/ExifTool/Geotag.pm +13 -2
  23. data/bin/lib/Image/ExifTool/GoPro.pm +16 -1
  24. data/bin/lib/Image/ExifTool/ICC_Profile.pm +96 -4
  25. data/bin/lib/Image/ExifTool/ID3.pm +15 -3
  26. data/bin/lib/Image/ExifTool/JPEG.pm +68 -2
  27. data/bin/lib/Image/ExifTool/JSON.pm +7 -3
  28. data/bin/lib/Image/ExifTool/Jpeg2000.pm +164 -36
  29. data/bin/lib/Image/ExifTool/LIF.pm +153 -0
  30. data/bin/lib/Image/ExifTool/Lang/nl.pm +60 -59
  31. data/bin/lib/Image/ExifTool/M2TS.pm +103 -7
  32. data/bin/lib/Image/ExifTool/MIE.pm +2 -1
  33. data/bin/lib/Image/ExifTool/MRC.pm +1 -1
  34. data/bin/lib/Image/ExifTool/MacOS.pm +2 -2
  35. data/bin/lib/Image/ExifTool/Nikon.pm +50 -6
  36. data/bin/lib/Image/ExifTool/NikonSettings.pm +10 -2
  37. data/bin/lib/Image/ExifTool/Olympus.pm +9 -2
  38. data/bin/lib/Image/ExifTool/Other.pm +93 -0
  39. data/bin/lib/Image/ExifTool/PDF.pm +11 -12
  40. data/bin/lib/Image/ExifTool/PNG.pm +7 -6
  41. data/bin/lib/Image/ExifTool/Panasonic.pm +14 -2
  42. data/bin/lib/Image/ExifTool/Pentax.pm +28 -5
  43. data/bin/lib/Image/ExifTool/Photoshop.pm +6 -0
  44. data/bin/lib/Image/ExifTool/QuickTime.pm +123 -25
  45. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +203 -121
  46. data/bin/lib/Image/ExifTool/README +9 -2
  47. data/bin/lib/Image/ExifTool/RIFF.pm +7 -2
  48. data/bin/lib/Image/ExifTool/Samsung.pm +47 -10
  49. data/bin/lib/Image/ExifTool/Sony.pm +113 -42
  50. data/bin/lib/Image/ExifTool/TagLookup.pm +4599 -4451
  51. data/bin/lib/Image/ExifTool/TagNames.pod +276 -41
  52. data/bin/lib/Image/ExifTool/Torrent.pm +18 -11
  53. data/bin/lib/Image/ExifTool/WriteIPTC.pl +1 -1
  54. data/bin/lib/Image/ExifTool/WritePDF.pl +1 -0
  55. data/bin/lib/Image/ExifTool/WritePNG.pl +2 -0
  56. data/bin/lib/Image/ExifTool/WriteQuickTime.pl +21 -4
  57. data/bin/lib/Image/ExifTool/WriteXMP.pl +1 -1
  58. data/bin/lib/Image/ExifTool/Writer.pl +47 -2
  59. data/bin/lib/Image/ExifTool/XMP.pm +32 -12
  60. data/bin/lib/Image/ExifTool/XMP2.pl +5 -2
  61. data/bin/lib/Image/ExifTool/XMPStruct.pl +3 -1
  62. data/bin/lib/Image/ExifTool/ZISRAW.pm +121 -2
  63. data/bin/lib/Image/ExifTool.pm +153 -52
  64. data/bin/lib/Image/ExifTool.pod +70 -60
  65. data/bin/perl-Image-ExifTool.spec +43 -42
  66. data/lib/exiftool_vendored/version.rb +1 -1
  67. metadata +6 -3
data/bin/exiftool CHANGED
@@ -10,24 +10,26 @@
10
10
  use strict;
11
11
  require 5.004;
12
12
 
13
- my $version = '12.25';
13
+ my $version = '12.35';
14
14
 
15
15
  # add our 'lib' directory to the include list BEFORE 'use Image::ExifTool'
16
- my $exeDir;
17
16
  BEGIN {
18
17
  # (undocumented -xpath option added in 11.91, must come before other options)
19
- $Image::ExifTool::exePath = @ARGV && lc($ARGV[0]) eq '-xpath' && shift() ? $^X : $0;
18
+ my $exePath = @ARGV && lc($ARGV[0]) eq '-xpath' && shift() ? $^X : $0;
20
19
  # get exe directory
21
- $exeDir = ($Image::ExifTool::exePath =~ /(.*)[\\\/]/) ? $1 : '.';
20
+ my $exeDir = ($exePath =~ /(.*)[\\\/]/) ? $1 : '.';
21
+ my $incDir = ($0 =~ /(.*)[\\\/]/) ? "$1/lib" : './lib';
22
22
  if (-l $0) {
23
23
  my $lnk = eval { readlink $0 };
24
24
  if (defined $lnk) {
25
25
  my $lnkDir = ($lnk =~ /(.*)[\\\/]/) ? $1 : '.';
26
26
  $exeDir = (($lnk =~ m(^/)) ? '' : $exeDir . '/') . $lnkDir;
27
+ $incDir = "$exeDir/lib";
27
28
  }
28
29
  }
30
+ $Image::ExifTool::exeDir = $exeDir; # use our exeDir for loading config file
29
31
  # add lib directory at start of include path
30
- unshift @INC, ($0 =~ /(.*)[\\\/]/) ? "$1/lib" : './lib';
32
+ unshift @INC, $incDir;
31
33
  # load or disable config file if specified
32
34
  if (@ARGV and lc($ARGV[0]) eq '-config') {
33
35
  shift;
@@ -757,7 +759,7 @@ for (;;) {
757
759
  }
758
760
  my $fp = ($stayOpen == 1 ? \*STAYOPEN : \*ARGFILE);
759
761
  unless ($mt->Open($fp, $argFile)) {
760
- unless ($argFile !~ /^\// and $mt->Open($fp, "$exeDir/$argFile")) {
762
+ unless ($argFile !~ /^\// and $mt->Open($fp, "$Image::ExifTool::exeDir/$argFile")) {
761
763
  Error "Error opening arg file $argFile\n";
762
764
  $badCmd = 1;
763
765
  next
@@ -1235,7 +1237,7 @@ for (;;) {
1235
1237
  $textOverwrite += 2 if $t2 =~ /\+/; # append
1236
1238
  if ($t1 ne 'W' and lc($t1) ne 'tagout') {
1237
1239
  undef $tagOut;
1238
- } elsif ($textOverwrite >= 2 and $textOut !~ /%[-+]?\d*[.:]?\d*[lu]?[tgs]/) {
1240
+ } elsif ($textOverwrite >= 2 and $textOut !~ /%[-+]?\d*[.:]?\d*[lu]?[tgso]/) {
1239
1241
  $tagOut = 0; # append tags to one file
1240
1242
  } else {
1241
1243
  $tagOut = 1; # separate file for each tag
@@ -1619,7 +1621,7 @@ if (@newValues) {
1619
1621
  next;
1620
1622
  }
1621
1623
  my %opts = ( Shift => 0 ); # shift values if possible instead of adding/deleting
1622
- # allow writing of 'unsafe' tags unless specified by wildcard
1624
+ # allow writing of 'Unsafe' tags unless specified by wildcard
1623
1625
  $opts{Protected} = 1 unless $tag =~ /[?*]/;
1624
1626
 
1625
1627
  if ($tag =~ s/<// and defined $newVal) {
@@ -1954,10 +1956,19 @@ sub GetImageInfo($$)
1954
1956
  my $pipe = $file;
1955
1957
  if ($doUnzip) {
1956
1958
  # pipe through gzip or bzip2 if necessary
1957
- if ($file =~ /\.gz$/i) {
1958
- $pipe = qq{gzip -dc "$file" |};
1959
- } elsif ($file =~ /\.bz2$/i) {
1960
- $pipe = qq{bzip2 -dc "$file" |};
1959
+ if ($file =~ /\.(gz|bz2)$/i) {
1960
+ my $type = lc $1;
1961
+ if ($file =~ /[^-_.'A-Za-z0-9\/\\]/) {
1962
+ Warn "Error: Insecure zip file name. Skipped\n";
1963
+ EFile($file);
1964
+ ++$countBad;
1965
+ return;
1966
+ }
1967
+ if ($type eq 'gz') {
1968
+ $pipe = qq{gzip -dc "$file" |};
1969
+ } else {
1970
+ $pipe = qq{bzip2 -dc "$file" |};
1971
+ }
1961
1972
  }
1962
1973
  }
1963
1974
  # evaluate -if expression for conditional processing
@@ -2218,7 +2229,7 @@ sub GetImageInfo($$)
2218
2229
  my $f = $file;
2219
2230
  CleanXML(\$f);
2220
2231
  print $fp "\n<rdf:Description rdf:about='${f}'";
2221
- print $fp "\n xmlns:et='http://ns.exiftool.ca/1.0/'";
2232
+ print $fp "\n xmlns:et='http://ns.exiftool.org/1.0/'";
2222
2233
  print $fp " et:toolkit='Image::ExifTool $Image::ExifTool::VERSION'";
2223
2234
  # define namespaces for all tag groups
2224
2235
  my (%groups, @groups, $grp0, $grp1);
@@ -2240,7 +2251,7 @@ sub GetImageInfo($$)
2240
2251
  unless ($grp eq $grp1 and $grp =~ /^(ExifTool|File|Composite|Unknown)$/) {
2241
2252
  $grp .= "/$grp1";
2242
2253
  }
2243
- print $fp "\n xmlns:$grp1='http://ns.exiftool.ca/$grp/1.0/'";
2254
+ print $fp "\n xmlns:$grp1='http://ns.exiftool.org/$grp/1.0/'";
2244
2255
  }
2245
2256
  print $fp '>' if $outFormat < 1; # finish rdf:Description token unless short format
2246
2257
  $ind = $outFormat >= 0 ? ' ' : ' ';
@@ -2276,7 +2287,7 @@ TAG: foreach $tag (@foundTags) {
2276
2287
  # avoid extracting Protected binary tags (eg. data blocks) [insider information]
2277
2288
  my $lcTag = lc $tag;
2278
2289
  $lcTag =~ s/ .*//;
2279
- next unless $$et{REQ_TAG_LOOKUP}{$lcTag};
2290
+ next unless $$et{REQ_TAG_LOOKUP}{$lcTag} or ($$et{OPTIONS}{RequestAll} || 0) > 2;
2280
2291
  }
2281
2292
  $val = ConvertBinary($val); # convert SCALAR references
2282
2293
  next unless defined $val;
@@ -2356,7 +2367,8 @@ TAG: foreach $tag (@foundTags) {
2356
2367
  }
2357
2368
  my @groups = $et->GetGroup($tag);
2358
2369
  $outfile and close($fp), undef($tmpText); # (shouldn't happen)
2359
- ($fp, $outfile, $append) = OpenOutputFile($orig, $tagName, \@groups, $ext);
2370
+ my $org = $et->GetValue('OriginalRawFileName') || $et->GetValue('OriginalFileName');
2371
+ ($fp, $outfile, $append) = OpenOutputFile($orig, $tagName, \@groups, $ext, $org);
2360
2372
  $fp or ++$countBad, next TAG;
2361
2373
  $tmpText = $outfile unless $append;
2362
2374
  }
@@ -3052,12 +3064,14 @@ sub SetImageInfo($$$)
3052
3064
  # temporarily disable CTRL-C during this critical operation
3053
3065
  $critical = 1;
3054
3066
  undef $tmpFile; # handle deletion of temporary file ourself
3055
- if ($et->Open(\*ORIG_FILE, $file, '>')) {
3067
+ if ($et->Open(\*ORIG_FILE, $file, '+<')) {
3056
3068
  binmode(ORIG_FILE);
3057
3069
  while (read(NEW_FILE, $buff, 65536)) {
3058
3070
  print ORIG_FILE $buff or $err = 1;
3059
3071
  }
3060
3072
  close(NEW_FILE);
3073
+ # Handle files being shorter than the original
3074
+ eval { truncate(ORIG_FILE, tell(ORIG_FILE)) } or $err = 1;
3061
3075
  close(ORIG_FILE) or $err = 1;
3062
3076
  if ($err) {
3063
3077
  Warn "Couldn't overwrite in place - $file\n";
@@ -3241,7 +3255,8 @@ sub FormatXML($$$)
3241
3255
  } elsif (ref $val eq 'HASH') {
3242
3256
  $gt = " rdf:parseType='Resource'>";
3243
3257
  my $val2 = '';
3244
- foreach (sort keys %$val) {
3258
+ my @keys = $$val{_ordered_keys_} ? @{$$val{_ordered_keys_}} : sort keys %$val;
3259
+ foreach (@keys) {
3245
3260
  # (some variable-namespace XML structure fields may have a different group)
3246
3261
  my $tok = /:/ ? $_ : ($grp . ':' . $_);
3247
3262
  $val2 .= "\n$ind <$tok" . FormatXML($$val{$_}, "$ind ", $grp) . "</$tok>";
@@ -3318,7 +3333,8 @@ sub FormatJSON($$$)
3318
3333
  } elsif (ref $val eq 'HASH') {
3319
3334
  my ($bra, $ket, $sep) = $json == 1 ? ('{','}',':') : ('Array(',')',' =>');
3320
3335
  print $fp $bra;
3321
- foreach (sort keys %$val) {
3336
+ my @keys = $$val{_ordered_keys_} ? @{$$val{_ordered_keys_}} : sort keys %$val;
3337
+ foreach (@keys) {
3322
3338
  print $fp ',' if $comma;
3323
3339
  my $key = EscapeJSON($_, 1);
3324
3340
  print $fp qq(\n$ind $key$sep );
@@ -3930,7 +3946,7 @@ sub SuggestedExtension($$$)
3930
3946
  $ext = 'xml';
3931
3947
  } elsif ($$valPt =~ /^RIFF....WAVE/s) {
3932
3948
  $ext = 'wav';
3933
- } elsif ($tag eq 'OriginalRawFileData' and defined($ext = $et->GetValue('OriginalRawFileName'))) {
3949
+ } elsif ($tag eq 'OriginalRawImage' and defined($ext = $et->GetValue('OriginalRawFileName'))) {
3934
3950
  $ext =~ s/^.*\.//s;
3935
3951
  $ext = $ext ? lc($ext) : 'raw';
3936
3952
  } elsif ($tag eq 'EXIF') {
@@ -3982,14 +3998,15 @@ sub LoadPrintFormat($)
3982
3998
  # A sort of sprintf for filenames
3983
3999
  # Inputs: 0) format string (%d=dir, %f=file name, %e=ext),
3984
4000
  # 1) source filename or undef to test format string
3985
- # 2-4) [%t %g %s only] tag name, ref to array of group names, suggested extension
4001
+ # 2-4) [%t %g %s %o only] tag name, ref to array of group names,
4002
+ # suggested extension, original raw file name
3986
4003
  # Returns: new filename or undef on error (or if no file and fmt contains token)
3987
4004
  sub FilenameSPrintf($;$@)
3988
4005
  {
3989
4006
  my ($fmt, $file, @extra) = @_;
3990
4007
  local $_;
3991
4008
  # return format string straight away if no tokens
3992
- return $fmt unless $fmt =~ /%[-+]?\d*[.:]?\d*[lu]?[dDfFeEtgs]/;
4009
+ return $fmt unless $fmt =~ /%[-+]?\d*[.:]?\d*[lu]?[dDfFeEtgso]/;
3993
4010
  return undef unless defined $file;
3994
4011
  CleanFilename($file); # make sure we are using forward slashes
3995
4012
  # split filename into directory, file, extension
@@ -4003,9 +4020,9 @@ sub FilenameSPrintf($;$@)
4003
4020
  }
4004
4021
  $part{F} = $part{f} . $part{E};
4005
4022
  ($part{D} = $part{d}) =~ s{/+$}{};
4006
- @part{qw(t g s)} = @extra;
4023
+ @part{qw(t g s o)} = @extra;
4007
4024
  my ($filename, $pos) = ('', 0);
4008
- while ($fmt =~ /(%([-+]?)(\d*)([.:]?)(\d*)([lu]?)([dDfFeEtgs]))/g) {
4025
+ while ($fmt =~ /(%([-+]?)(\d*)([.:]?)(\d*)([lu]?)([dDfFeEtgso]))/g) {
4009
4026
  $filename .= substr($fmt, $pos, pos($fmt) - $pos - length($1));
4010
4027
  $pos = pos($fmt);
4011
4028
  my ($sign, $wid, $dot, $skip, $mod, $code) = ($2, $3, $4, $5 || 0, $6, $7);
@@ -4168,7 +4185,7 @@ sub OpenOutputFile($;@)
4168
4185
  if ($textOut) {
4169
4186
  $outfile = $file;
4170
4187
  CleanFilename($outfile);
4171
- if ($textOut =~ /%[-+]?\d*[.:]?\d*[lun]?[dDfFeEtgscC]/ or defined $tagOut) {
4188
+ if ($textOut =~ /%[-+]?\d*[.:]?\d*[lun]?[dDfFeEtgsocC]/ or defined $tagOut) {
4172
4189
  # make filename from printf-like $textOut
4173
4190
  $outfile = FilenameSPrintf($textOut, $file, @args);
4174
4191
  return () unless defined $outfile;
@@ -4263,7 +4280,10 @@ sub FilterArgfileLine($)
4263
4280
  # escaped by an odd number of backslashes, and escape a single backslash
4264
4281
  # if it occurs at the end of the string
4265
4282
  $arg =~ s{\\(.)|(["\$\@]|\\$)}{'\\'.($2 || $1)}sge;
4266
- $arg = eval qq{"$arg"}; # un-escape characters in C string
4283
+ # un-escape characters in C string
4284
+ my %esc = ( a => "\a", b => "\b", f => "\f", n => "\n",
4285
+ r => "\r", t => "\t", '"' => '"', '\\' => '\\' );
4286
+ $arg =~ s/\\(.)/$esc{$1}||'\\'.$1/egs;
4267
4287
  } else {
4268
4288
  $arg =~ s/^\s+//; # remove leading white space
4269
4289
  $arg =~ s/[\x0d\x0a]+$//s; # remove trailing newline
@@ -4469,47 +4489,48 @@ supported by ExifTool (r = read, w = write, c = create):
4469
4489
 
4470
4490
  File Types
4471
4491
  ------------+-------------+-------------+-------------+------------
4472
- 360 r/w | DPX r | ITC r | NUMBERS r | RAM r
4473
- 3FR r | DR4 r/w/c | J2C r | O r | RAR r
4474
- 3G2 r/w | DSS r | JNG r/w | ODP r | RAW r/w
4475
- 3GP r/w | DV r | JP2 r/w | ODS r | RIFF r
4476
- A r | DVB r/w | JPEG r/w | ODT r | RSRC r
4477
- AA r | DVR-MS r | JSON r | OFR r | RTF r
4478
- AAE r | DYLIB r | JXL r | OGG r | RW2 r/w
4479
- AAX r/w | EIP r | K25 r | OGV r | RWL r/w
4480
- ACR r | EPS r/w | KDC r | ONP r | RWZ r
4481
- AFM r | EPUB r | KEY r | OPUS r | RM r
4482
- AI r/w | ERF r/w | LA r | ORF r/w | SEQ r
4483
- AIFF r | EXE r | LFP r | ORI r/w | SKETCH r
4484
- APE r | EXIF r/w/c | LNK r | OTF r | SO r
4485
- ARQ r/w | EXR r | LRV r/w | PAC r | SR2 r/w
4486
- ARW r/w | EXV r/w/c | M2TS r | PAGES r | SRF r
4487
- ASF r | F4A/V r/w | M4A/V r/w | PBM r/w | SRW r/w
4488
- AVI r | FFF r/w | MACOS r | PCD r | SVG r
4489
- AVIF r/w | FITS r | MAX r | PCX r | SWF r
4490
- AZW r | FLA r | MEF r/w | PDB r | THM r/w
4491
- BMP r | FLAC r | MIE r/w/c | PDF r/w | TIFF r/w
4492
- BPG r | FLIF r/w | MIFF r | PEF r/w | TORRENT r
4493
- BTF r | FLV r | MKA r | PFA r | TTC r
4494
- CHM r | FPF r | MKS r | PFB r | TTF r
4495
- COS r | FPX r | MKV r | PFM r | TXT r
4496
- CR2 r/w | GIF r/w | MNG r/w | PGF r | VCF r
4497
- CR3 r/w | GPR r/w | MOBI r | PGM r/w | VRD r/w/c
4498
- CRM r/w | GZ r | MODD r | PLIST r | VSD r
4499
- CRW r/w | HDP r/w | MOI r | PICT r | WAV r
4500
- CS1 r/w | HDR r | MOS r/w | PMP r | WDP r/w
4501
- CSV r | HEIC r/w | MOV r/w | PNG r/w | WEBP r
4502
- CZI r | HEIF r/w | MP3 r | PPM r/w | WEBM r
4503
- DCM r | HTML r | MP4 r/w | PPT r | WMA r
4504
- DCP r/w | ICC r/w/c | MPC r | PPTX r | WMV r
4505
- DCR r | ICS r | MPG r | PS r/w | WTV r
4506
- DFONT r | IDML r | MPO r/w | PSB r/w | WV r
4507
- DIVX r | IIQ r/w | MQV r/w | PSD r/w | X3F r/w
4508
- DJVU r | IND r/w | MRC r | PSP r | XCF r
4509
- DLL r | INSP r/w | MRW r/w | QTIF r/w | XLS r
4510
- DNG r/w | INSV r | MXF r | R3D r | XLSX r
4511
- DOC r | INX r | NEF r/w | RA r | XMP r/w/c
4512
- DOCX r | ISO r | NRW r/w | RAF r/w | ZIP r
4492
+ 360 r/w | DR4 r/w/c | JNG r/w | ODP r | RIFF r
4493
+ 3FR r | DSS r | JP2 r/w | ODS r | RSRC r
4494
+ 3G2 r/w | DV r | JPEG r/w | ODT r | RTF r
4495
+ 3GP r/w | DVB r/w | JSON r | OFR r | RW2 r/w
4496
+ A r | DVR-MS r | JXL r | OGG r | RWL r/w
4497
+ AA r | DYLIB r | K25 r | OGV r | RWZ r
4498
+ AAE r | EIP r | KDC r | ONP r | RM r
4499
+ AAX r/w | EPS r/w | KEY r | OPUS r | SEQ r
4500
+ ACR r | EPUB r | LA r | ORF r/w | SKETCH r
4501
+ AFM r | ERF r/w | LFP r | ORI r/w | SO r
4502
+ AI r/w | EXE r | LIF r | OTF r | SR2 r/w
4503
+ AIFF r | EXIF r/w/c | LNK r | PAC r | SRF r
4504
+ APE r | EXR r | LRV r/w | PAGES r | SRW r/w
4505
+ ARQ r/w | EXV r/w/c | M2TS r | PBM r/w | SVG r
4506
+ ARW r/w | F4A/V r/w | M4A/V r/w | PCD r | SWF r
4507
+ ASF r | FFF r/w | MACOS r | PCX r | THM r/w
4508
+ AVI r | FITS r | MAX r | PDB r | TIFF r/w
4509
+ AVIF r/w | FLA r | MEF r/w | PDF r/w | TORRENT r
4510
+ AZW r | FLAC r | MIE r/w/ | PEF r/w | TTC r
4511
+ BMP r | FLIF r/w | MIFF r c | PFA r | TTF r
4512
+ BPG r | FLV r | MKA r | PFB r | TXT r
4513
+ BTF r | FPF r | MKS r | PFM r | VCF r
4514
+ CHM r | FPX r | MKV r | PGF r | VRD r/w/c
4515
+ COS r | GIF r/w | MNG r/w | PGM r/w | VSD r
4516
+ CR2 r/w | GPR r/w | MOBI r | PLIST r | WAV r
4517
+ CR3 r/w | GZ r | MODD r | PICT r | WDP r/w
4518
+ CRM r/w | HDP r/w | MOI r | PMP r | WEBP r
4519
+ CRW r/w | HDR r | MOS r/w | PNG r/w | WEBM r
4520
+ CS1 r/w | HEIC r/w | MOV r/w | PPM r/w | WMA r
4521
+ CSV r | HEIF r/w | MP3 r | PPT r | WMV r
4522
+ CZI r | HTML r | MP4 r/w | PPTX r | WTV r
4523
+ DCM r | ICC r/w/c | MPC r | PS r/w | WV r
4524
+ DCP r/w | ICS r | MPG r | PSB r/w | X3F r/w
4525
+ DCR r | IDML r | MPO r/w | PSD r/w | XCF r
4526
+ DFONT r | IIQ r/w | MQV r/w | PSP r | XLS r
4527
+ DIVX r | IND r/w | MRC r | QTIF r/w | XLSX r
4528
+ DJVU r | INSP r/w | MRW r/w | R3D r | XMP r/w/c
4529
+ DLL r | INSV r | MXF r | RA r | ZIP r
4530
+ DNG r/w | INX r | NEF r/w | RAF r/w |
4531
+ DOC r | ISO r | NRW r/w | RAM r |
4532
+ DOCX r | ITC r | NUMBERS r | RAR r |
4533
+ DPX r | J2C r | O r | RAW r/w |
4513
4534
 
4514
4535
  Meta Information
4515
4536
  ----------------------+----------------------+---------------------
@@ -4717,11 +4738,11 @@ I<TAG> may contain one or more leading family 0, 1, 2 or 7 group names,
4717
4738
  prefixed by optional family numbers, and separated colons. If no group name
4718
4739
  is specified, the tag is created in the preferred group, and updated in any
4719
4740
  other location where a same-named tag already exists. The preferred group
4720
- is the first group in the following list where I<TAG> is valid: 1) EXIF, 2)
4721
- IPTC, 3) XMP.
4741
+ in JPEG and TIFF-format images is the first group in the following list
4742
+ where I<TAG> is valid: 1) EXIF, 2) IPTC, 3) XMP.
4722
4743
 
4723
4744
  The wildcards C<*> and C<?> may be used in tag names to assign the same
4724
- value to multiple tags. When specified with wildcards, "unsafe" tags are
4745
+ value to multiple tags. When specified with wildcards, "Unsafe" tags are
4725
4746
  not written. A tag name of C<All> is equivalent to C<*> (except that it
4726
4747
  doesn't require quoting, while arguments with wildcards do on systems with
4727
4748
  shell globbing), and is often used when deleting all metadata (ie. C<-All=>)
@@ -4867,10 +4888,10 @@ See L</COPYING EXAMPLES> for examples using B<-tagsFromFile>.
4867
4888
  Notes:
4868
4889
 
4869
4890
  1) Some tags (generally tags which may affect the appearance of the image)
4870
- are considered "unsafe" to write, and are only copied if specified
4891
+ are considered "Unsafe" to write, and are only copied if specified
4871
4892
  explicitly (ie. no wildcards). See the
4872
4893
  L<tag name documentation|Image::ExifTool::TagNames> for more details about
4873
- "unsafe" tags.
4894
+ "Unsafe" tags.
4874
4895
 
4875
4896
  2) Be aware of the difference between excluding a tag from being copied
4876
4897
  (--I<TAG>), and deleting a tag (-I<TAG>=). Excluding a tag prevents it from
@@ -4968,7 +4989,7 @@ intermediate file (C<out.args> in this example):
4968
4989
  exiftool -@ out.args -sep ', ' dst.jpg
4969
4990
 
4970
4991
  Note: Be careful when copying information with this technique since it is
4971
- easy to write tags which are normally considered "unsafe". For instance,
4992
+ easy to write tags which are normally considered "Unsafe". For instance,
4972
4993
  the FileName and Directory tags are excluded in the example above to avoid
4973
4994
  renaming and moving the destination file. Also note that the second command
4974
4995
  above will produce warning messages for any tags which are not writable.
@@ -4988,8 +5009,8 @@ are in the default output. By default, list items are separated by a
4988
5009
  newline when extracted with the B<-b> option, but this may be changed (see
4989
5010
  the B<-sep> option for details). May be combined with B<-j>, B<-php> or
4990
5011
  B<-X> to extract binary data in JSON, PHP or XML format, but note that
4991
- "unsafe" tags must be specified explicitly to be extracted as binary in
4992
- these formats.
5012
+ "Unsafe" tags are not extracted as binary unless they are specified explicitly or
5013
+ the API RequestAll option is set to 3 or higher.
4993
5014
 
4994
5015
  With a leading double dash (B<--b> or B<--binary>), tags which contain
4995
5016
  binary data are suppressed in the output when reading.
@@ -5150,9 +5171,11 @@ various components of a date/time value. The specifics of the I<FMT> syntax
5150
5171
  are system dependent -- consult the C<strftime> man page on your system for
5151
5172
  details. The default format is equivalent to "%Y:%m:%d %H:%M:%S". This
5152
5173
  option has no effect on date-only or time-only tags and ignores timezone
5153
- information if present. Only one B<-d> option may be used per command.
5154
- Requires POSIX::strptime or Time::Piece for the inversion conversion when
5155
- writing.
5174
+ information if present. ExifTool adds a C<%f> format code to represent
5175
+ fractional seconds, and supports an optional width to specify the number of
5176
+ digits after the decimal point (eg. C<%3f> would give something like
5177
+ C<.437>). Only one B<-d> option may be used per command. Requires
5178
+ POSIX::strptime or Time::Piece for the inversion conversion when writing.
5156
5179
 
5157
5180
  =item B<-D> (B<-decimal>)
5158
5181
 
@@ -5190,7 +5213,7 @@ By default the resulting group name is simplified by removing any leading
5190
5213
  C<Main:> and collapsing adjacent identical group names, but this can be
5191
5214
  avoided by placing a colon before the first family number (eg. B<-g:3:1>).
5192
5215
  Use the B<-listg> option to list group names for a specified family. The
5193
- SavePath and SaveFormat API options are automatically enabled if the
5216
+ API SavePath and SaveFormat options are automatically enabled if the
5194
5217
  respective family 5 or 6 group names are requested. See the
5195
5218
  L<API GetGroup documentation|Image::ExifTool/GetGroup> for more information.
5196
5219
 
@@ -5393,7 +5416,7 @@ with this command:
5393
5416
 
5394
5417
  produces output like this:
5395
5418
 
5396
- -- Generated by ExifTool 12.25 --
5419
+ -- Generated by ExifTool 12.35 --
5397
5420
  File: a.jpg - 2003:10:31 15:44:19
5398
5421
  (f/5.6, 1/60s, ISO 100)
5399
5422
  File: b.jpg - 2006:05:23 11:57:38
@@ -5410,7 +5433,7 @@ are effectively processed as separate input files.
5410
5433
  If a specified tag does not exist, a minor warning is issued and the line
5411
5434
  with the missing tag is not printed. However, the B<-f> option may be used
5412
5435
  to set the value of missing tags to '-' (but this may be configured via the
5413
- MissingTagValue API option), or the B<-m> option may be used to ignore minor
5436
+ API MissingTagValue option), or the B<-m> option may be used to ignore minor
5414
5437
  warnings and leave the missing values empty. Alternatively, B<-q -q> may be
5415
5438
  used to simply suppress the warning messages.
5416
5439
 
@@ -5648,12 +5671,14 @@ between B<-W> and B<-w>:
5648
5671
 
5649
5672
  1) With B<-W>, a new output file is created for each extracted tag.
5650
5673
 
5651
- 2) B<-W> supports three additional format codes: %t, %g and %s represent
5652
- the tag name, group name, and suggested extension for the output file (based
5653
- on the format of the data). The %g code may be followed by a single digit
5654
- to specify the group family number (eg. %g1), otherwise family 0 is assumed.
5655
- The substring width/position/case specifiers may be used with these format
5656
- codes in exactly the same way as with %f and %e.
5674
+ 2) B<-W> supports four additional format codes: %t, %g and %s represent the
5675
+ tag name, group name, and suggested extension for the output file (based on
5676
+ the format of the data), and %o represents the value of the
5677
+ OriginalRawFileName or OriginalFileName tag from the input file (including
5678
+ extension). The %g code may be followed by a single digit to specify the
5679
+ group family number (eg. %g1), otherwise family 0 is assumed. The substring
5680
+ width/position/case specifiers may be used with these format codes in
5681
+ exactly the same way as with %f and %e.
5657
5682
 
5658
5683
  3) The argument for B<-W> is interpreted as a file name if it contains no
5659
5684
  format codes. (For B<-w>, this would be a file extension.) This change
@@ -5673,7 +5698,7 @@ example, the following pairs of commands give the same result:
5673
5698
  4) Adding the B<-v> option to B<-W> sends a list of the tags and output file
5674
5699
  names to the console instead of giving a verbose dump of the entire file.
5675
5700
  (Unless appending all output to one file for each source file by using
5676
- B<-W+> with an output file I<FMT> that does not contain %t, $g or %s.)
5701
+ B<-W+> with an output file I<FMT> that does not contain %t, $g, %s or %o.)
5677
5702
 
5678
5703
  5) Individual list items are stored in separate files when B<-W> is combined
5679
5704
  with B<-b>, but note that for separate files to be created %c or %C must be
@@ -5709,9 +5734,10 @@ The B<-t> option adds tag table information to the output (see B<-t> for
5709
5734
  details).
5710
5735
 
5711
5736
  Note: This output is NOT the same as XMP because it uses
5712
- dynamically-generated property names corresponding to the ExifTool tag
5713
- names, and not the standard XMP properties. To write XMP instead, use the
5714
- B<-o> option with an XMP extension for the output file.
5737
+ dynamically-generated property names corresponding to the ExifTool tag names
5738
+ with ExifTool family 1 group names as namespaces, and not the standard XMP
5739
+ properties and namespaces. To write XMP instead, use the B<-o> option with
5740
+ an XMP extension for the output file.
5715
5741
 
5716
5742
  =back
5717
5743
 
@@ -6358,7 +6384,7 @@ exit status of the command (see L</EXIT STATUS>).
6358
6384
 
6359
6385
  Save the names of files giving errors (I<NUM> missing or 1), files that were
6360
6386
  unchanged (I<NUM> is 2), files that fail the B<-if> condition (I<NUM> is 4),
6361
- or any combination thereof (by summing I<NUM>, eg. B<-efile3> is the same
6387
+ or any combination thereof by summing I<NUM> (eg. B<-efile3> is the same
6362
6388
  has having both B<-efile> and B<-efile2> options with the same I<ERRFILE>).
6363
6389
  By default, file names are appended to any existing I<ERRFILE>, but
6364
6390
  I<ERRFILE> is overwritten if an exclamation point is added to the option
@@ -13,7 +13,7 @@
13
13
  # 2019/10/24 - PH Preserve sub-seconds in GPSDateTime value
14
14
  #
15
15
  # Notes: 1) Input file(s) must contain GPSLatitude and GPSLongitude.
16
- # 2) The -ee option is to extract the full track from video files.
16
+ # 2) The -ee3 option is to extract the full track from video files.
17
17
  # 3) The -fileOrder option may be used to control the order of the
18
18
  # generated track points when processing multiple files.
19
19
  #------------------------------------------------------------------------------
@@ -14,7 +14,7 @@
14
14
  # 2019/10/24 - PH Preserve sub-seconds in GPSDateTime value
15
15
  #
16
16
  # Notes: 1) Input file(s) must contain GPSLatitude and GPSLongitude.
17
- # 2) The -ee option is to extract the full track from video files.
17
+ # 2) The -ee3 option is to extract the full track from video files.
18
18
  # 3) The -fileOrder option may be used to control the order of the
19
19
  # generated track points when processing multiple files.
20
20
  #------------------------------------------------------------------------------
@@ -35,7 +35,7 @@ use Image::ExifTool::Sony;
35
35
  use Image::ExifTool::Validate;
36
36
  use Image::ExifTool::MacOS;
37
37
 
38
- $VERSION = '3.44';
38
+ $VERSION = '3.46';
39
39
  @ISA = qw(Exporter);
40
40
 
41
41
  sub NumbersFirst($$);
@@ -68,6 +68,7 @@ my %tweakOrder = (
68
68
  IPTC => 'Exif', # put IPTC after EXIF,
69
69
  GPS => 'XMP', # etc...
70
70
  Composite => 'Extra',
71
+ CBOR => 'JSON',
71
72
  GeoTiff => 'GPS',
72
73
  CanonVRD=> 'CanonCustom',
73
74
  DJI => 'Casio',
@@ -459,7 +460,7 @@ According to the specification, integer-format QuickTime date/time tags
459
460
  should be stored as UTC. Unfortunately, digital cameras often store local
460
461
  time values instead (presumably because they don't know the time zone). For
461
462
  this reason, by default ExifTool does not assume a time zone for these
462
- values. However, if the L<QuickTimeUTC|../ExifTool.html#QuickTimeUTC> API option is set, then ExifTool will
463
+ values. However, if the API L<QuickTimeUTC|../ExifTool.html#QuickTimeUTC> option is set, then ExifTool will
463
464
  assume these values are properly stored as UTC, and will convert them to
464
465
  local time when extracting.
465
466
 
@@ -468,6 +469,11 @@ the PrintConv option is enabled and no time zone is specified. This is
468
469
  because Apple software may display crazy values if the time zone is missing
469
470
  for some tags.
470
471
 
472
+ By default ExifTool will remove null padding from some QuickTime containers
473
+ in Canon CR3 files when writing, but the
474
+ L<QuickTimePad|../ExifTool.html#QuickTimePad> option may be used to preserve
475
+ the original size by padding with nulls if necessary.
476
+
471
477
  See
472
478
  L<https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/>
473
479
  for the official specification.
@@ -2117,7 +2123,7 @@ sub WriteTagNames($$)
2117
2123
  $short = $$shortName{$tableName};
2118
2124
  my @names = split ' ', $short;
2119
2125
  my $class = shift @names;
2120
- if (@names) {
2126
+ if (@names and $class ne 'Other') {
2121
2127
  # add heading for tables without a Main
2122
2128
  unless ($heading eq $class) {
2123
2129
  $heading = $class;
@@ -2145,6 +2151,13 @@ sub WriteTagNames($$)
2145
2151
  $short = $$shortName{$tableName};
2146
2152
  $short = $tableName unless $short;
2147
2153
  $url = "$short.html";
2154
+ # handle various tables in "Other.pm"
2155
+ if ($short =~ /^Other (.*)/) {
2156
+ $short = $1;
2157
+ $url = 'Other.html#' . $1;
2158
+ } else {
2159
+ $url = "$short.html";
2160
+ }
2148
2161
  print HTMLFILE "<a href='${url}'>$short</a>";
2149
2162
  ++$count;
2150
2163
  }