exiftool_vendored 12.68.0 → 12.70.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +63 -15
  3. data/bin/META.json +1 -1
  4. data/bin/META.yml +1 -1
  5. data/bin/README +2 -2
  6. data/bin/exiftool +13 -13
  7. data/bin/lib/Image/ExifTool/CBOR.pm +18 -2
  8. data/bin/lib/Image/ExifTool/Canon.pm +68 -16
  9. data/bin/lib/Image/ExifTool/DJI.pm +3 -2
  10. data/bin/lib/Image/ExifTool/DNG.pm +25 -2
  11. data/bin/lib/Image/ExifTool/EXE.pm +54 -6
  12. data/bin/lib/Image/ExifTool/Exif.pm +175 -14
  13. data/bin/lib/Image/ExifTool/FujiFilm.pm +142 -20
  14. data/bin/lib/Image/ExifTool/GIF.pm +5 -1
  15. data/bin/lib/Image/ExifTool/ID3.pm +70 -7
  16. data/bin/lib/Image/ExifTool/InDesign.pm +1 -1
  17. data/bin/lib/Image/ExifTool/JPEG.pm +1 -1
  18. data/bin/lib/Image/ExifTool/Jpeg2000.pm +30 -15
  19. data/bin/lib/Image/ExifTool/MakerNotes.pm +2 -2
  20. data/bin/lib/Image/ExifTool/Nikon.pm +58 -18
  21. data/bin/lib/Image/ExifTool/Olympus.pm +7 -1
  22. data/bin/lib/Image/ExifTool/PNG.pm +8 -13
  23. data/bin/lib/Image/ExifTool/Panasonic.pm +15 -2
  24. data/bin/lib/Image/ExifTool/PhotoMechanic.pm +2 -2
  25. data/bin/lib/Image/ExifTool/QuickTime.pm +32 -5
  26. data/bin/lib/Image/ExifTool/README +14 -5
  27. data/bin/lib/Image/ExifTool/RIFF.pm +60 -10
  28. data/bin/lib/Image/ExifTool/Sony.pm +95 -34
  29. data/bin/lib/Image/ExifTool/TagLookup.pm +6937 -6714
  30. data/bin/lib/Image/ExifTool/TagNames.pod +812 -332
  31. data/bin/lib/Image/ExifTool/Text.pm +4 -5
  32. data/bin/lib/Image/ExifTool/Validate.pm +23 -20
  33. data/bin/lib/Image/ExifTool/WriteCanonRaw.pl +2 -2
  34. data/bin/lib/Image/ExifTool/WriteExif.pl +14 -4
  35. data/bin/lib/Image/ExifTool/WriteQuickTime.pl +1 -0
  36. data/bin/lib/Image/ExifTool/WriteRIFF.pl +31 -6
  37. data/bin/lib/Image/ExifTool/Writer.pl +40 -14
  38. data/bin/lib/Image/ExifTool/XMP.pm +67 -2
  39. data/bin/lib/Image/ExifTool/XMP2.pl +35 -0
  40. data/bin/lib/Image/ExifTool.pm +79 -40
  41. data/bin/lib/Image/ExifTool.pod +9 -3
  42. data/bin/perl-Image-ExifTool.spec +1 -1
  43. data/lib/exiftool_vendored/version.rb +1 -1
  44. metadata +2 -2
@@ -29,7 +29,7 @@ use vars qw($VERSION $RELEASE @ISA @EXPORT_OK %EXPORT_TAGS $AUTOLOAD @fileTypes
29
29
  %jpegMarker %specialTags %fileTypeLookup $testLen $exeDir
30
30
  %static_vars);
31
31
 
32
- $VERSION = '12.68';
32
+ $VERSION = '12.70';
33
33
  $RELEASE = '';
34
34
  @ISA = qw(Exporter);
35
35
  %EXPORT_TAGS = (
@@ -132,7 +132,7 @@ sub Rename($$$);
132
132
  sub Unlink($@);
133
133
  sub SetFileTime($$;$$$$);
134
134
  sub DoEscape($$);
135
- sub ConvertFileSize($);
135
+ sub ConvertFileSize($;$);
136
136
  sub ParseArguments($;@); #(defined in attempt to avoid mod_perl problem)
137
137
  sub ReadValue($$$;$$$);
138
138
 
@@ -145,16 +145,16 @@ sub ReadValue($$$;$$$);
145
145
  WPG ICO PICT PNG MNG FLIF DjVu DPX OpenEXR ZISRAW MRC LIF MRC::FEI12 MIFF
146
146
  PCX PGF PSP PhotoCD Radiance Other::PFM PDF PostScript Photoshop::Header
147
147
  Photoshop::Layers Photoshop::ImageData FujiFilm::RAF FujiFilm::IFD
148
- Samsung::Trailer Sony::SRF2 Sony::SR2SubIFD Sony::PMP ITC ID3 ID3::Lyrics3
149
- FLAC Ogg Vorbis APE APE::NewHeader APE::OldHeader Audible MPC MPEG::Audio
150
- MPEG::Video MPEG::Xing M2TS QuickTime QuickTime::ImageFile QuickTime::Stream
151
- QuickTime::Tags360Fly Matroska Matroska::StdTag MOI MXF DV Flash Flash::FLV
152
- Real::Media Real::Audio Real::Metafile Red RIFF AIFF ASF WTV DICOM FITS XISF
153
- MIE JSON HTML XMP::SVG Palm Palm::MOBI Palm::EXTH Torrent EXE EXE::PEVersion
154
- EXE::PEString EXE::MachO EXE::PEF EXE::ELF EXE::AR EXE::CHM LNK Font VCard
155
- Text VCard::VCalendar VCard::VNote RSRC Rawzor ZIP ZIP::GZIP ZIP::RAR
156
- ZIP::RAR5 RTF OOXML iWork ISO FLIR::AFF FLIR::FPF MacOS MacOS::MDItem
157
- FlashPix::DocTable
148
+ FujiFilm::MRAW Samsung::Trailer Sony::SRF2 Sony::SR2SubIFD Sony::PMP ITC ID3
149
+ ID3::Lyrics3 FLAC Ogg Vorbis APE APE::NewHeader APE::OldHeader Audible MPC
150
+ MPEG::Audio MPEG::Video MPEG::Xing M2TS QuickTime QuickTime::ImageFile
151
+ QuickTime::Stream QuickTime::Tags360Fly Matroska Matroska::StdTag MOI MXF DV
152
+ Flash Flash::FLV Real::Media Real::Audio Real::Metafile Red RIFF AIFF ASF
153
+ WTV DICOM FITS XISF MIE JSON HTML XMP::SVG Palm Palm::MOBI Palm::EXTH
154
+ Torrent EXE EXE::PEVersion EXE::PEString EXE::MachO EXE::PEF EXE::ELF
155
+ EXE::AR EXE::CHM LNK Font VCard Text VCard::VCalendar VCard::VNote RSRC
156
+ Rawzor ZIP ZIP::GZIP ZIP::RAR ZIP::RAR5 RTF OOXML iWork ISO FLIR::AFF
157
+ FLIR::FPF MacOS MacOS::MDItem FlashPix::DocTable
158
158
  );
159
159
 
160
160
  # alphabetical list of current Lang modules
@@ -365,6 +365,7 @@ my %createTypes = map { $_ => 1 } qw(XMP ICC MIE VRD DR4 EXIF EXV);
365
365
  JPC => 'J2C',
366
366
  JPE => 'JPEG',
367
367
  JPEG => ['JPEG', 'Joint Photographic Experts Group'],
368
+ JPH => ['JP2', 'High-throughput JPEG 2000'],
368
369
  JPF => 'JP2',
369
370
  JPG => 'JPEG',
370
371
  JPM => ['JP2', 'JPEG 2000 compound image'],
@@ -677,6 +678,7 @@ my %fileDescription = (
677
678
  JNG => 'image/jng',
678
679
  JP2 => 'image/jp2',
679
680
  JPEG => 'image/jpeg',
681
+ JPH => 'image/jph',
680
682
  JPM => 'image/jpm',
681
683
  JPS => 'image/x-jps',
682
684
  JPX => 'image/jpx',
@@ -1066,6 +1068,7 @@ my %xmpShorthandOpt = ( 0 => 'None', 1 => 'Shorthand', 2 => ['Shorthand','OneDes
1066
1068
  my @availableOptions = (
1067
1069
  [ 'Binary', undef, 'flag to extract binary values even if tag not specified' ],
1068
1070
  [ 'ByteOrder', undef, 'default byte order when creating EXIF information' ],
1071
+ [ 'ByteUnit', 'SI', 'units for byte conversions (SI or Binary)'],
1069
1072
  [ 'Charset', 'UTF8', 'character set for converting Unicode characters' ],
1070
1073
  [ 'CharsetEXIF', undef, 'internal EXIF "ASCII" string encoding' ],
1071
1074
  [ 'CharsetFileName', undef, 'external encoding for file names' ],
@@ -1307,8 +1310,9 @@ my %systemTagsNotes = (
1307
1310
  FileSize => {
1308
1311
  Groups => { 1 => 'System', 2 => 'Other' },
1309
1312
  Notes => q{
1310
- note that the print conversion for this tag uses historic prefixes: 1 kB =
1311
- 1024 bytes, etc.
1313
+ note that the print conversion for this tag uses SI prefixes by default: 1
1314
+ kB = 1000 bytes, etc. Set the API ByteUnit option to "Binary" to use binary
1315
+ prefixes instead: 1 KiB = 1024 bytes, etc.
1312
1316
  },
1313
1317
  PrintConv => \&ConvertFileSize,
1314
1318
  },
@@ -2413,17 +2417,28 @@ sub Options($$;@)
2413
2417
  }
2414
2418
  $$options{$param} = $newVal;
2415
2419
  } elsif ($param eq 'ImageHashType') {
2416
- if (defined $newVal and $newVal =~ /^(MD5|SHA256|SHA512)$/i) {
2420
+ if (not defined $newVal) {
2421
+ warn("Can't set $param to undef\n");
2422
+ } elsif ($newVal =~ /^(MD5|SHA256|SHA512)$/i) {
2417
2423
  $$options{$param} = uc($newVal);
2418
2424
  } else {
2419
- warn("Invalid $param setting '${newVal}'\n"), return $oldVal;
2425
+ warn("Invalid $param setting '${newVal}'\n");
2420
2426
  }
2421
2427
  } elsif ($param eq 'StructFormat') {
2422
2428
  if (defined $newVal) {
2423
- $newVal =~ /^(JSON|JSONQ)$/i or warn("Invalid $param setting '${newVal}'\n"), return $oldVal;
2429
+ $newVal =~ /^(JSON|JSONQ)$/i or warn("Invalid $param setting '${newVal}'\n"), next;
2424
2430
  $newVal = uc($newVal);
2425
2431
  }
2426
2432
  $$options{$param} = $newVal;
2433
+ } elsif ($param eq 'ByteUnit') {
2434
+ if (defined $newVal) {
2435
+ # (allow "Metric" or "SI" for SI, and "IT" or "Binary" for Binary)
2436
+ my $goodVal = ($newVal =~ /^S|M/i ? 'SI' : ($newVal =~ /^I|B/i ? 'Binary' : undef));
2437
+ $goodVal or warn("Invalid $param setting '${newVal}'\n"), next;
2438
+ $$options{$param} = $goodVal;
2439
+ } else {
2440
+ warn("Can't set $param to undef\n");
2441
+ }
2427
2442
  } else {
2428
2443
  if ($param eq 'Escape') {
2429
2444
  # set ESCAPE_PROC
@@ -2548,7 +2563,7 @@ sub ExtractInfo($;@)
2548
2563
  $self->WarnOnce('Install Time::HiRes to generate ProcessingTime');
2549
2564
  }
2550
2565
  }
2551
-
2566
+
2552
2567
  # create Hash object if ImageDataHash is requested
2553
2568
  if ($$req{imagedatahash} and not $$self{ImageDataHash}) {
2554
2569
  my $imageHashType = $self->Options('ImageHashType');
@@ -3456,9 +3471,10 @@ sub GetValue($$;$)
3456
3471
  } elsif (wantarray) {
3457
3472
  # return array if requested
3458
3473
  return @$value;
3459
- } elsif ($type eq 'PrintConv' and not $$self{OPTIONS}{List} and not ref $$value[0]) {
3460
- # join PrintConv values in comma-separated string if List option not used
3474
+ } elsif ($type eq 'PrintConv' and not $$self{OPTIONS}{List}) {
3475
+ # join PrintConv values in delimited string if List option not used
3461
3476
  # and list contains simple scalars (otherwise return ARRAY ref)
3477
+ ref and return $value foreach @$value;
3462
3478
  $value = join $$self{OPTIONS}{ListSep}, @$value;
3463
3479
  }
3464
3480
  }
@@ -6023,7 +6039,7 @@ sub ConvertDateTime($$)
6023
6039
  ++$a[5];
6024
6040
  last; # (this was a goto)
6025
6041
  }
6026
- }
6042
+ }
6027
6043
  }
6028
6044
  $neg and $frac =~ s/^\.//;
6029
6045
  $fmt =~ s/(^|[^%])((%%)*)%-?\.?\d*f/$1$2$frac/g;
@@ -6203,16 +6219,26 @@ sub GetUnixTime($;$)
6203
6219
  # Print conversion for file size
6204
6220
  # Inputs: 0) file size in bytes
6205
6221
  # Returns: converted file size
6206
- sub ConvertFileSize($)
6207
- {
6208
- my $val = shift;
6209
- $val < 2000 and return "$val bytes";
6210
- $val < 10000 and return sprintf('%.1f kB', $val / 1000);
6211
- $val < 2000000 and return sprintf('%.0f kB', $val / 1000);
6212
- $val < 10000000 and return sprintf('%.1f MB', $val / 1000000);
6213
- $val < 2000000000 and return sprintf('%.0f MB', $val / 1000000);
6214
- $val < 10000000000 and return sprintf('%.1f GB', $val / 1000000000);
6215
- return sprintf('%.0f GB', $val / 1000000000);
6222
+ sub ConvertFileSize($;$)
6223
+ {
6224
+ my ($val, $et) = @_;
6225
+ if ($et and $$et{OPTIONS}{ByteUnit} eq 'Binary') {
6226
+ $val < 2048 and return "$val bytes";
6227
+ $val < 10240 and return sprintf('%.1f KiB', $val / 1024);
6228
+ $val < 2097152 and return sprintf('%.0f KiB', $val / 1024);
6229
+ $val < 10485760 and return sprintf('%.1f MiB', $val / 1048576);
6230
+ $val < 2147483648 and return sprintf('%.0f MiB', $val / 1048576);
6231
+ $val < 10737418240 and return sprintf('%.1f GiB', $val / 1073741824);
6232
+ return sprintf('%.0f GiB', $val / 1073741824);
6233
+ } else {
6234
+ $val < 2000 and return "$val bytes";
6235
+ $val < 10000 and return sprintf('%.1f kB', $val / 1000);
6236
+ $val < 2000000 and return sprintf('%.0f kB', $val / 1000);
6237
+ $val < 10000000 and return sprintf('%.1f MB', $val / 1000000);
6238
+ $val < 2000000000 and return sprintf('%.0f MB', $val / 1000000);
6239
+ $val < 10000000000 and return sprintf('%.1f GB', $val / 1000000000);
6240
+ return sprintf('%.0f GB', $val / 1000000000);
6241
+ }
6216
6242
  }
6217
6243
 
6218
6244
  #------------------------------------------------------------------------------
@@ -7480,7 +7506,8 @@ sub ProcessJPEG($$)
7480
7506
  my $hdr = $1;
7481
7507
  $dumpType = 'JUMBF';
7482
7508
  SetByteOrder('MM');
7483
- my $seq = Get32u($segDataPt, 4) - 1; # (start from 0)
7509
+ # (sequence should start from 1, but some software incorrectly writes 0)
7510
+ my $seq = Get32u($segDataPt, 4);
7484
7511
  my $len = Get32u($segDataPt, 8);
7485
7512
  my $type = substr($$segDataPt, 12, 4);
7486
7513
  my $hdrLen;
@@ -7490,14 +7517,13 @@ sub ProcessJPEG($$)
7490
7517
  } else {
7491
7518
  $hdrLen = 8;
7492
7519
  }
7493
- $jumbfChunk{$type} or $jumbfChunk{$type} = [ ];
7520
+ $jumbfChunk{$type} or $jumbfChunk{$type} = [ '' ];
7494
7521
  if ($len < $hdrLen) {
7495
7522
  $self->Warn('Invalid JUMBF segment');
7496
- } elsif ($seq < 0) {
7497
- $self->Warn('Invalid JUMBF sequence number');
7498
- } elsif (defined $jumbfChunk{$type}[$seq]) {
7523
+ } elsif (defined $jumbfChunk{$type}[$seq] and length $jumbfChunk{$type}[$seq]) {
7499
7524
  $self->Warn('Duplicate JUMBF sequence number');
7500
7525
  } else {
7526
+ $seq or $self->Warn('Incorrect JUMBF sequence numbering (should start from 0, not 1)');
7501
7527
  # add to list of JUMBF chunks
7502
7528
  $jumbfChunk{$type}[$seq] = substr($$segDataPt, 8 + $hdrLen);
7503
7529
  # check to see if we have a complete JUMBF box
@@ -7721,6 +7747,19 @@ sub ProcessTIFF($$;$)
7721
7747
  return $rtnVal;
7722
7748
  }
7723
7749
 
7750
+ #------------------------------------------------------------------------------
7751
+ # Process TIFF as a sub-document
7752
+ # Inputs: 0) ExifTool object ref, 1) dirInfo ref, 2) optional tag table ref
7753
+ # Returns: 1 if this looked like a valid EXIF block, 0 otherwise, or -1 on write error
7754
+ sub ProcessSubTIFF($$;$)
7755
+ {
7756
+ my ($self, $dirInfo, $tagTablePtr) = @_;
7757
+ $$self{DOC_NUM} = ++$$self{DOC_COUNT};
7758
+ my $rtnVal = $self->ProcessTIFF($dirInfo, $tagTablePtr);
7759
+ delete $$self{DOC_NUM};
7760
+ return $rtnVal;
7761
+ }
7762
+
7724
7763
  #------------------------------------------------------------------------------
7725
7764
  # Process TIFF data
7726
7765
  # Inputs: 0) ExifTool object ref, 1) dirInfo ref, 2) optional tag table ref
@@ -7736,8 +7775,8 @@ sub DoProcessTIFF($$;$)
7736
7775
  my ($err, $sig, $canonSig, $otherSig);
7737
7776
 
7738
7777
  # attempt to read TIFF header
7739
- $$self{EXIF_DATA} = '';
7740
7778
  if ($raf) {
7779
+ $$self{EXIF_DATA} = '';
7741
7780
  if ($outfile) {
7742
7781
  $raf->Seek(0, 0) or return 0;
7743
7782
  if ($base) {
@@ -8089,8 +8128,8 @@ sub DoProcessTIFF($$;$)
8089
8128
  # check DNG version
8090
8129
  if ($$self{DNGVersion}) {
8091
8130
  my $ver = $$self{DNGVersion};
8092
- # currently support up to DNG version 1.6
8093
- unless ($ver =~ /^(\d+) (\d+)/ and "$1.$2" <= 1.6) {
8131
+ # currently support up to DNG version 1.7
8132
+ unless ($ver =~ /^(\d+) (\d+)/ and "$1.$2" <= 1.7) {
8094
8133
  $ver =~ tr/ /./;
8095
8134
  $self->Error("DNG Version $ver not yet tested", 1);
8096
8135
  }
@@ -8359,7 +8398,7 @@ sub GetTagInfo($$$;$$$)
8359
8398
  }
8360
8399
  }
8361
8400
  # don't return Unknown tags unless that option is set (also see forum13716)
8362
- if ($$tagInfo{Unknown} and not $$self{OPTIONS}{Unknown} and not
8401
+ if ($$tagInfo{Unknown} and not $$self{OPTIONS}{Unknown} and not
8363
8402
  ($$self{OPTIONS}{Verbose} or $$self{HTML_DUMP} or
8364
8403
  ($$self{OPTIONS}{Validate} and not $$tagInfo{AddedUnknown})))
8365
8404
  {
@@ -467,6 +467,12 @@ big-endian ('MM') order is assumed. This can also be set via the
467
467
  L<ExifByteOrder tag|Image::ExifTool::TagNames/Extra Tags>, but the ByteOrder
468
468
  option takes precedence if both are set.
469
469
 
470
+ =item ByteUnit
471
+
472
+ Units for print conversion of FileSize and other byte values. Either 'SI'
473
+ (eg. kB for 1000 bytes) or 'Binary' (eg. KiB for 1024 bytes). Default is
474
+ 'SI'.
475
+
470
476
  =item Charset
471
477
 
472
478
  Character set for encoding character tag values passed to/from ExifTool with
@@ -554,12 +560,12 @@ without recoding. Default is 0.
554
560
  Comma-delimited list of settings for writing compact XMP. Below is a list
555
561
  of available settings. Note that 'NoPadding' effects only embedded XMP
556
562
  since padding is never written for stand-alone XMP files. Also note that
557
- 'OneDesc' is not recommended when writing XMP larger than 64 kB to a JPG
563
+ 'OneDesc' is not recommended when writing XMP larger than 64 KiB to a JPG
558
564
  file because it interferes with ExifTool's technique of splitting off large
559
565
  rdf:Description elements into the extended XMP. Case is not significant for
560
566
  any of these options. Aliases are given in brackets. Default is undef.
561
567
 
562
- NoPadding - Avoid 2 kB of recommended padding at end of XMP (NoPad)
568
+ NoPadding - Avoid 2 KiB of recommended padding at end of XMP (NoPad)
563
569
  NoIndent - No spaces to indent lines (NoSpace, NoSpaces)
564
570
  NoNewline - Avoid unnecessary newlines (NoNewlines)
565
571
  Shorthand - Use XMP Shorthand format
@@ -2440,7 +2446,7 @@ ICC_Profile#, ID3, ID3v1, ID3v1_Enh, ID3v2_2, ID3v2_3, ID3v2_4, IFD0, IFD1,
2440
2446
  IPTC, IPTC#, ISO, ITC, InfiRay, Insta360, InteropIFD, ItemList, JFIF, JFXX,
2441
2447
  JPEG, JPEG-HDR, JPS, JSON, JUMBF, JVC, Jpeg2000, KDC_IFD, Keys, Kodak,
2442
2448
  KodakBordersIFD, KodakEffectsIFD, KodakIFD, KyoceraRaw, LNK, Leaf,
2443
- LeafSubIFD, Leica, Lyrics3, Lytro, M2TS, MAC, MIE-Audio, MIE-Camera,
2449
+ LeafSubIFD, Leica, Lyrics3, Lytro, M-RAW, M2TS, MAC, MIE-Audio, MIE-Camera,
2444
2450
  MIE-Canon, MIE-Doc, MIE-Extender, MIE-Flash, MIE-GPS, MIE-Geo, MIE-Image,
2445
2451
  MIE-Lens, MIE-Main, MIE-MakerNotes, MIE-Meta, MIE-Orient, MIE-Preview,
2446
2452
  MIE-Thumbnail, MIE-UTM, MIE-Unknown, MIE-Video, MIFF, MISB, MNG, MOBI, MOI,
@@ -1,6 +1,6 @@
1
1
  Summary: perl module for image data extraction
2
2
  Name: perl-Image-ExifTool
3
- Version: 12.68
3
+ Version: 12.70
4
4
  Release: 1
5
5
  License: Artistic/GPL
6
6
  Group: Development/Libraries/Perl
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ExiftoolVendored
4
- VERSION = Gem::Version.new('12.68.0')
4
+ VERSION = Gem::Version.new('12.70.0')
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exiftool_vendored
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.68.0
4
+ version: 12.70.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew McEachen
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-10-26 00:00:00.000000000 Z
12
+ date: 2023-11-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: exiftool