exiftool_vendored 12.92.0 → 12.95.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -12,7 +12,7 @@ meta information extracted from or written to a file.
12
12
  =head1 TAG TABLES
13
13
 
14
14
  The tables listed below give the names of all tags recognized by ExifTool.
15
- They contain a total of 27895 tags, with 17462 unique tag names.
15
+ They contain a total of 27985 tags, with 17475 unique tag names.
16
16
 
17
17
  B<Tag ID>, B<Index#> or B<Sequence> is given in the first column of each
18
18
  table. A B<Tag ID> is the computer-readable equivalent of a tag name, and
@@ -9331,6 +9331,7 @@ Unknown only to reduce the volume of the normal output.
9331
9331
  ColorData9 Canon ColorData9
9332
9332
  ColorData10 Canon ColorData10
9333
9333
  ColorData11 Canon ColorData11
9334
+ ColorData12 Canon ColorData12
9334
9335
  ColorDataUnknown Canon ColorDataUnknown
9335
9336
  0x4002 CRWParam? no
9336
9337
  0x4003 ColorInfo Canon ColorInfo
@@ -11437,6 +11438,97 @@ These tags are used by the EOS R3, R7 and R6mkII
11437
11438
  641 SpecularWhiteLevel int16u
11438
11439
  642 LinearityUpperMargin int16u
11439
11440
 
11441
+ =head3 Canon ColorData12 Tags
11442
+
11443
+ These tags are used by the EOS R1 and R5mkII
11444
+
11445
+ Index2 Tag Name Writable
11446
+ ------ -------- --------
11447
+ 0 ColorDataVersion int16s
11448
+ 105 WB_RGGBLevelsAsShot int16s[4]
11449
+ 109 ColorTempAsShot int16s
11450
+ 110 WB_RGGBLevelsDaylight int16s[4]
11451
+ 114 ColorTempDaylight int16s
11452
+ 115 WB_RGGBLevelsShade int16s[4]
11453
+ 119 ColorTempShade int16s
11454
+ 120 WB_RGGBLevelsCloudy int16s[4]
11455
+ 124 ColorTempCloudy int16s
11456
+ 125 WB_RGGBLevelsTungsten int16s[4]
11457
+ 129 ColorTempTungsten int16s
11458
+ 130 WB_RGGBLevelsFluorescent int16s[4]
11459
+ 134 ColorTempFluorescent int16s
11460
+ 135 WB_RGGBLevelsFlash int16s[4]
11461
+ 139 ColorTempFlash int16s
11462
+ 140 WB_RGGBLevelsUnknown2? int16s[4]
11463
+ 144 ColorTempUnknown2? int16s
11464
+ 145 WB_RGGBLevelsUnknown3? int16s[4]
11465
+ 149 ColorTempUnknown3? int16s
11466
+ 150 WB_RGGBLevelsUnknown4? int16s[4]
11467
+ 154 ColorTempUnknown4? int16s
11468
+ 155 WB_RGGBLevelsUnknown5? int16s[4]
11469
+ 159 ColorTempUnknown5? int16s
11470
+ 160 WB_RGGBLevelsUnknown6? int16s[4]
11471
+ 164 ColorTempUnknown6? int16s
11472
+ 165 WB_RGGBLevelsUnknown7? int16s[4]
11473
+ 169 ColorTempUnknown7? int16s
11474
+ 170 WB_RGGBLevelsUnknown8? int16s[4]
11475
+ 174 ColorTempUnknown8? int16s
11476
+ 175 WB_RGGBLevelsUnknown9? int16s[4]
11477
+ 179 ColorTempUnknown9? int16s
11478
+ 180 WB_RGGBLevelsUnknown10? int16s[4]
11479
+ 184 ColorTempUnknown10? int16s
11480
+ 185 WB_RGGBLevelsUnknown11? int16s[4]
11481
+ 189 ColorTempUnknown11? int16s
11482
+ 190 WB_RGGBLevelsUnknown12? int16s[4]
11483
+ 194 ColorTempUnknown12? int16s
11484
+ 195 WB_RGGBLevelsUnknown13? int16s[4]
11485
+ 199 ColorTempUnknown13? int16s
11486
+ 200 WB_RGGBLevelsUnknown14? int16s[4]
11487
+ 204 ColorTempUnknown14? int16s
11488
+ 205 WB_RGGBLevelsUnknown15? int16s[4]
11489
+ 209 ColorTempUnknown15? int16s
11490
+ 210 WB_RGGBLevelsUnknown16? int16s[4]
11491
+ 214 ColorTempUnknown16? int16s
11492
+ 215 WB_RGGBLevelsUnknown17? int16s[4]
11493
+ 219 ColorTempUnknown17? int16s
11494
+ 220 WB_RGGBLevelsUnknown18? int16s[4]
11495
+ 224 ColorTempUnknown18? int16s
11496
+ 225 WB_RGGBLevelsUnknown19? int16s[4]
11497
+ 229 ColorTempUnknown19? int16s
11498
+ 230 WB_RGGBLevelsUnknown20? int16s[4]
11499
+ 234 ColorTempUnknown20? int16s
11500
+ 235 WB_RGGBLevelsUnknown21? int16s[4]
11501
+ 239 ColorTempUnknown21? int16s
11502
+ 240 WB_RGGBLevelsUnknown22? int16s[4]
11503
+ 244 ColorTempUnknown22? int16s
11504
+ 245 WB_RGGBLevelsUnknown23? int16s[4]
11505
+ 249 ColorTempUnknown23? int16s
11506
+ 250 WB_RGGBLevelsUnknown24? int16s[4]
11507
+ 254 ColorTempUnknown24? int16s
11508
+ 255 WB_RGGBLevelsUnknown25? int16s[4]
11509
+ 259 ColorTempUnknown25? int16s
11510
+ 260 WB_RGGBLevelsUnknown26? int16s[4]
11511
+ 264 ColorTempUnknown26? int16s
11512
+ 265 WB_RGGBLevelsUnknown27? int16s[4]
11513
+ 269 ColorTempUnknown27? int16s
11514
+ 270 WB_RGGBLevelsUnknown28? int16s[4]
11515
+ 274 ColorTempUnknown28? int16s
11516
+ 275 WB_RGGBLevelsUnknown29? int16s[4]
11517
+ 279 ColorTempUnknown29? int16s
11518
+ 280 WB_RGGBLevelsUnknown30? int16s[4]
11519
+ 284 ColorTempUnknown30? int16s
11520
+ 285 WB_RGGBLevelsUnknown31? int16s[4]
11521
+ 289 ColorTempUnknown31? int16s
11522
+ 290 WB_RGGBLevelsUnknown32? int16s[4]
11523
+ 294 ColorTempUnknown32? int16s
11524
+ 295 WB_RGGBLevelsUnknown33? int16s[4]
11525
+ 299 ColorTempUnknown33? int16s
11526
+ 320 ColorCalib? Canon ColorCalib
11527
+ 383 PerChannelBlackLevel int16u[4]
11528
+ 660 NormalWhiteLevel int16u
11529
+ 661 SpecularWhiteLevel int16u
11530
+ 662 LinearityUpperMargin int16u
11531
+
11440
11532
  =head3 Canon ColorDataUnknown Tags
11441
11533
 
11442
11534
  Index2 Tag Name Writable
@@ -11601,8 +11693,8 @@ Information about creative filter settings.
11601
11693
  4 RollAngle int32s
11602
11694
  5 PitchAngle int32s
11603
11695
  7 FocalLength int32s
11604
- 8 MinFocalLength int32s
11605
- 9 MaxFocalLength int32s
11696
+ 8 MinFocalLength2 int32s
11697
+ 9 MaxFocalLength2 int32s
11606
11698
 
11607
11699
  =head3 Canon CTMD Tags
11608
11700
 
@@ -29618,7 +29710,7 @@ for the official QuickTime specification.
29618
29710
  The tags below are extracted from timed metadata in QuickTime and other
29619
29711
  formats of video files when the ExtractEmbedded option is used. Although
29620
29712
  most of these tags are combined into the single table below, ExifTool
29621
- currently reads 76 different formats of timed GPS metadata from video files.
29713
+ currently reads 77 different formats of timed GPS metadata from video files.
29622
29714
 
29623
29715
  Tag Name Writable
29624
29716
  -------- --------
@@ -29822,9 +29914,14 @@ changed via the config file.
29822
29914
  FrameReadoutTime yes
29823
29915
  'camera.identifier' CameraIdentifier yes
29824
29916
  'collection.user' UserCollection yes
29825
- 'com.android.capture.fps' AndroidCaptureFPS yes
29917
+ 'com.android.capture.fps' AndroidCaptureFPS float
29918
+ 'com.android.manufacturer' AndroidMake yes
29919
+ 'com.android.model' AndroidModel yes
29826
29920
  'com.android.version' AndroidVersion yes
29827
29921
  'com.apple.photos.captureMode' CaptureMode yes
29922
+ 'com.xiaomi.hdr10' XiaomiHDR10 int32s
29923
+ 'com.xiaomi.preview_video_cover'
29924
+ XiaomiPreviewVideoCover int32s
29828
29925
  'comment' Comment yes
29829
29926
  'compatible_brands' CompatibleBrands yes/
29830
29927
  'content.identifier' ContentIdentifier yes
@@ -29884,6 +29981,7 @@ changed via the config file.
29884
29981
  'title' Title yes
29885
29982
  'version' Version yes
29886
29983
  'video-orientation' VideoOrientation no
29984
+ 'xiaomi.exifInfo.videoinfo' XiaomiExifInfo yes
29887
29985
  'year' Year yes
29888
29986
 
29889
29987
  =head3 QuickTime FaceInfo Tags
@@ -39363,6 +39461,7 @@ AFM, ACFM and AMFM font files.
39363
39461
  Tag ID Tag Name Writable
39364
39462
  ------ -------- --------
39365
39463
  'AFM' AFM Font AFM
39464
+ 'C2PA' C2PA Jpeg2000
39366
39465
  'PFM' PFMHeader Font PFM
39367
39466
  'PSInfo' PSFontInfo Font PSInfo
39368
39467
  'fontname' FontName no
@@ -847,7 +847,7 @@ sub WriteQuickTime($$$)
847
847
  $et or return 1; # allow dummy access to autoload this package
848
848
  my ($mdat, @mdat, @mdatEdit, $edit, $track, $outBuff, $co, $term, $delCount);
849
849
  my (%langTags, $canCreate, $delGrp, %boxPos, %didDir, $writeLast, $err, $atomCount);
850
- my ($tag, $lastTag, $errStr);
850
+ my ($tag, $lastTag, $lastPos, $errStr, $copyTrailer, $buf2);
851
851
  my $outfile = $$dirInfo{OutFile} || return 0;
852
852
  my $raf = $$dirInfo{RAF}; # (will be null for lower-level atoms)
853
853
  my $dataPt = $$dirInfo{DataPt}; # (will be null for top-level atoms)
@@ -923,6 +923,7 @@ sub WriteQuickTime($$$)
923
923
  $tag = $lastTag = '';
924
924
 
925
925
  for (;;) { # loop through all atoms at this level
926
+ $lastPos = $raf->Tell();
926
927
  $lastTag = $tag if $$tagTablePtr{$tag}; # keep track of last known tag
927
928
  if (defined $atomCount and --$atomCount < 0 and $dataPt) {
928
929
  # stop processing now and just copy the rest of the atom
@@ -1523,16 +1524,38 @@ sub WriteQuickTime($$$)
1523
1524
  }
1524
1525
  # ($errStr is set if there was an error that could possibly be due to an unknown trailer)
1525
1526
  if ($errStr) {
1526
- if (($lastTag eq 'mdat' or $lastTag eq 'moov') and not $dataPt and (not $$tagTablePtr{$tag} or
1527
- ref $$tagTablePtr{$tag} eq 'HASH' and $$tagTablePtr{$tag}{Unknown}))
1527
+ if (($lastTag eq 'mdat' or $lastTag eq 'moov' or ($lastTag eq 'free' and @mdat)) and not $dataPt and
1528
+ (not $$tagTablePtr{$tag} or ref $$tagTablePtr{$tag} eq 'HASH' and $$tagTablePtr{$tag}{Unknown}))
1528
1529
  {
1530
+ # identify known trailers
1531
+ if ($raf->Seek(-40,2) and $raf->Read($buf2,40)==40 and
1532
+ substr($buf2, 8) eq '8db42d694ccc418790edff439fe026bf' and
1533
+ $lastPos == $raf->Tell() - unpack('V',$buf2))
1534
+ {
1535
+ $copyTrailer = [ $lastPos, 'Insta360' ];
1536
+ } else {
1537
+ $buf2 = '';
1538
+ $raf->Seek($lastPos,0) and $raf->Read($buf2,8);
1539
+ if ($buf2 eq 'CCCCCCCC') {
1540
+ $copyTrailer = [ $lastPos, 'Kenwood' ];
1541
+ } elsif ($buf2 =~ /^(gpsa|gps0|gsen|gsea)...\0/s) {
1542
+ $copyTrailer = [ $lastPos, 'RIFF' ];
1543
+ }
1544
+ }
1545
+ # are we deleting the trailer?
1529
1546
  my $nvTrail = $et->GetNewValueHash($Image::ExifTool::Extra{Trailer});
1530
1547
  if ($$et{DEL_GROUP}{Trailer} or ($nvTrail and not ($$nvTrail{Value} and $$nvTrail{Value}[0]))) {
1531
1548
  $errStr =~ s/ is too large.*//;
1532
- $et->Warn('Deleted unknown trailer with ' . lcfirst($errStr));
1533
- } else {
1549
+ if ($copyTrailer) {
1550
+ $et->Warn("Deleted $$copyTrailer[1] trailer", 1);
1551
+ undef $copyTrailer;
1552
+ } else {
1553
+ $et->Warn('Deleted unknown trailer with ' . lcfirst($errStr), 1);
1554
+ }
1555
+ } elsif (not $copyTrailer) {
1534
1556
  $et->Warn('Unknown trailer with ' . lcfirst($errStr));
1535
1557
  $et->Error('Use "-trailer=" to delete unknown trailer');
1558
+ # (we don't currently copy an unknown trailer due to the chance it could be corrupted data)
1536
1559
  }
1537
1560
  } else {
1538
1561
  $et->Error($errStr);
@@ -1645,27 +1668,26 @@ sub WriteQuickTime($$$)
1645
1668
  }
1646
1669
  my $subName = $$subdir{DirName} || $$tagInfo{Name};
1647
1670
  # QuickTime hierarchy is complex, so check full directory path before adding
1648
- my $buff;
1649
1671
  if ($createKeys and $curPath eq 'MOV-Movie' and $subName eq 'Meta') {
1650
1672
  $et->VPrint(0, " Creating Meta with mdta Handler and Keys\n");
1651
1673
  # init Meta box for Keys tags with mdta Handler and empty Keys+ItemList
1652
- $buff = "\0\0\0\x20hdlr\0\0\0\0\0\0\0\0mdta\0\0\0\0\0\0\0\0\0\0\0\0" .
1674
+ $buf2 = "\0\0\0\x20hdlr\0\0\0\0\0\0\0\0mdta\0\0\0\0\0\0\0\0\0\0\0\0" .
1653
1675
  "\0\0\0\x10keys\0\0\0\0\0\0\0\0" .
1654
1676
  "\0\0\0\x08ilst";
1655
1677
  } elsif ($createKeys and $curPath eq 'MOV-Movie-Meta') {
1656
- $buff = ($subName eq 'Keys' ? "\0\0\0\0\0\0\0\0" : '');
1678
+ $buf2 = ($subName eq 'Keys' ? "\0\0\0\0\0\0\0\0" : '');
1657
1679
  } elsif ($subName eq 'Meta' and $$et{OPTIONS}{QuickTimeHandler}) {
1658
1680
  $et->VPrint(0, " Creating Meta with mdir Handler\n");
1659
1681
  # init Meta box for ItemList tags with mdir Handler
1660
- $buff = "\0\0\0\x20hdlr\0\0\0\0\0\0\0\0mdir\0\0\0\0\0\0\0\0\0\0\0\0";
1682
+ $buf2 = "\0\0\0\x20hdlr\0\0\0\0\0\0\0\0mdir\0\0\0\0\0\0\0\0\0\0\0\0";
1661
1683
  } else {
1662
1684
  next unless $curPath eq $writePath and $$addDirs{$subName} and $$addDirs{$subName} eq $dirName;
1663
- $buff = ''; # write from scratch
1685
+ $buf2 = ''; # write from scratch
1664
1686
  }
1665
1687
  my %subdirInfo = (
1666
1688
  Parent => $dirName,
1667
1689
  DirName => $subName,
1668
- DataPt => \$buff,
1690
+ DataPt => \$buf2,
1669
1691
  DirStart => 0,
1670
1692
  HasData => $$subdir{HasData},
1671
1693
  OutFile => $outfile,
@@ -1978,9 +2000,8 @@ sub WriteQuickTime($$$)
1978
2000
  $result or $et->Error("Truncated mdat atom"), last;
1979
2001
  } else {
1980
2002
  # mdat continues to end of file
1981
- my $buff;
1982
- while ($raf->Read($buff, 65536)) {
1983
- Write($outfile, $buff) or $rtnVal = 0, last;
2003
+ while ($raf->Read($buf2, 65536)) {
2004
+ Write($outfile, $buf2) or $rtnVal = 0, last;
1984
2005
  }
1985
2006
  }
1986
2007
  }
@@ -1989,6 +2010,18 @@ sub WriteQuickTime($$$)
1989
2010
  # write the stuff that must come last
1990
2011
  Write($outfile, $writeLast) or $rtnVal = 0 if $writeLast;
1991
2012
 
2013
+ # copy trailer if necessary
2014
+ if ($copyTrailer) {
2015
+ if ($raf->Seek($$copyTrailer[0])) {
2016
+ $et->Warn(sprintf('Copying %s trailer from offset 0x%x', $$copyTrailer[1], $lastPos), 1);
2017
+ while ($raf->Read($buf2, 65536)) {
2018
+ Write($outfile, $buf2) or $rtnVal = 0, last;
2019
+ }
2020
+ } else {
2021
+ $et->Error('Error copying Insta360 trailer');
2022
+ $rtnVal = 0;
2023
+ }
2024
+ }
1992
2025
  return $rtnVal;
1993
2026
  }
1994
2027
 
@@ -19,7 +19,6 @@ use Image::ExifTool::Fixup;
19
19
 
20
20
  sub AssembleRational($$@);
21
21
  sub LastInList($);
22
- sub CreateDirectory($$);
23
22
  sub NextFreeTagKey($$);
24
23
  sub RemoveNewValueHash($$$);
25
24
  sub RemoveNewValuesForGroup($$);
@@ -2085,9 +2084,10 @@ sub SetFileName($$;$$$)
2085
2084
  return 1;
2086
2085
  }
2087
2086
  # create directory for new file if necessary
2088
- my $result;
2089
- if (($result = $self->CreateDirectory($newName)) != 0) {
2090
- if ($result < 0) {
2087
+ my $err = $self->CreateDirectory($newName);
2088
+ if (defined $err) {
2089
+ if ($err) {
2090
+ $self->Warn($err) unless $err =~ /^Error creating/;
2091
2091
  $self->Warn("Error creating directory for '${newName}'");
2092
2092
  return -1;
2093
2093
  }
@@ -2835,7 +2835,10 @@ sub GetAllGroups($;$)
2835
2835
  $family == 3 and return('Doc#', 'Main');
2836
2836
  $family == 4 and return('Copy#');
2837
2837
  $family == 5 and return('[too many possibilities to list]');
2838
- $family == 6 and return(@Image::ExifTool::Exif::formatName[1..$#Image::ExifTool::Exif::formatName]);
2838
+ if ($family == 6) {
2839
+ my $fn = \%Image::ExifTool::Exif::formatNumber;
2840
+ return(sort { $$fn{$a} <=> $$fn{$b} } keys %$fn);
2841
+ }
2839
2842
  $family == 8 and return('File#');
2840
2843
 
2841
2844
  LoadAllTables(); # first load all our tables
@@ -3551,55 +3554,6 @@ sub IsRawType($)
3551
3554
  return $rawType{$$self{FileType}};
3552
3555
  }
3553
3556
 
3554
- #------------------------------------------------------------------------------
3555
- # Create directory for specified file
3556
- # Inputs: 0) ExifTool ref, 1) complete file name including path
3557
- # Returns: 1 = directory created, 0 = nothing done, -1 = error
3558
- my $k32CreateDir;
3559
- sub CreateDirectory($$)
3560
- {
3561
- local $_;
3562
- my ($self, $file) = @_;
3563
- my $rtnVal = 0;
3564
- my $enc = $$self{OPTIONS}{CharsetFileName};
3565
- my $dir;
3566
- ($dir = $file) =~ s/[^\/]*$//; # remove filename from path specification
3567
- # recode as UTF-8 if necessary
3568
- if ($dir and not $self->IsDirectory($dir)) {
3569
- my @parts = split /\//, $dir;
3570
- $dir = '';
3571
- foreach (@parts) {
3572
- $dir .= $_;
3573
- if (length $dir and not $self->IsDirectory($dir)) {
3574
- # create directory since it doesn't exist
3575
- my $d2 = $dir; # (must make a copy in case EncodeFileName recodes it)
3576
- if ($self->EncodeFileName($d2)) {
3577
- # handle Windows Unicode directory names
3578
- unless (eval { require Win32::API }) {
3579
- $self->Warn('Install Win32::API to create directories with Unicode names');
3580
- return -1;
3581
- }
3582
- unless ($k32CreateDir) {
3583
- return -1 if defined $k32CreateDir;
3584
- $k32CreateDir = Win32::API->new('KERNEL32', 'CreateDirectoryW', 'PP', 'I');
3585
- unless ($k32CreateDir) {
3586
- $self->Warn('Error calling Win32::API::CreateDirectoryW');
3587
- $k32CreateDir = 0;
3588
- return -1;
3589
- }
3590
- }
3591
- $k32CreateDir->Call($d2, 0) or return -1;
3592
- } else {
3593
- mkdir($d2, 0777) or return -1;
3594
- }
3595
- $rtnVal = 1;
3596
- }
3597
- $dir .= '/';
3598
- }
3599
- }
3600
- return $rtnVal;
3601
- }
3602
-
3603
3557
  #------------------------------------------------------------------------------
3604
3558
  # Copy file attributes from one file to another
3605
3559
  # Inputs: 0) ExifTool ref, 1) source file name, 2) destination file name
@@ -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 $advFmtSelf);
31
31
 
32
- $VERSION = '12.92';
32
+ $VERSION = '12.95';
33
33
  $RELEASE = '';
34
34
  @ISA = qw(Exporter);
35
35
  %EXPORT_TAGS = (
@@ -1873,9 +1873,10 @@ my %systemTagsNotes = (
1873
1873
  this write-only tag is used to define the GPS track log data or track log
1874
1874
  file name. Currently supported track log formats are GPX, NMEA RMC/GGA/GLL,
1875
1875
  KML, IGC, Garmin XML and TCX, Magellan PMGNTRK, Honeywell PTNTHPR, Winplus
1876
- Beacon text, and Bramor gEO log files. May be set to the special value of
1877
- "DATETIMEONLY" (all caps) to set GPS date/time tags if no input track points
1878
- are available. See L<geotag.html|../geotag.html> for details
1876
+ Beacon text, Bramor gEO, Google Takeout JSON, and CSV log files. May be set
1877
+ to the special value of "DATETIMEONLY" (all caps) to set GPS date/time tags
1878
+ if no input track points are available. See L<geotag.html|../geotag.html>
1879
+ for details
1879
1880
  },
1880
1881
  DelCheck => q{
1881
1882
  require Image::ExifTool::Geotag;
@@ -4734,6 +4735,56 @@ sub IsDirectory($$)
4734
4735
  return 0;
4735
4736
  }
4736
4737
 
4738
+ #------------------------------------------------------------------------------
4739
+ # Create directory for specified file
4740
+ # Inputs: 0) ExifTool ref, 1) complete file name including path
4741
+ # Returns: '' = directory created, undef = nothing done, otherwise error string
4742
+ my $k32CreateDir;
4743
+ sub CreateDirectory($$)
4744
+ {
4745
+ local $_;
4746
+ my ($self, $file) = @_;
4747
+ my ($err, $dir);
4748
+ ($dir = $file) =~ s/[^\/]*$//; # remove filename from path specification
4749
+ if ($dir and not $self->IsDirectory($dir)) {
4750
+ my @parts = split /\//, $dir;
4751
+ $dir = '';
4752
+ foreach (@parts) {
4753
+ $dir .= $_;
4754
+ if (length and not $self->IsDirectory($dir) and
4755
+ # don't try to create a network drive root directory
4756
+ not (IsPC() and $dir =~ m{^//[^/]*$}))
4757
+ {
4758
+ my $success;
4759
+ # create directory since it doesn't exist
4760
+ my $d2 = $dir; # (must make a copy in case EncodeFileName recodes it)
4761
+ if ($self->EncodeFileName($d2)) {
4762
+ # handle Windows Unicode directory names
4763
+ unless (eval { require Win32::API }) {
4764
+ $err = 'Install Win32::API to create directories with Unicode names';
4765
+ last;
4766
+ }
4767
+ unless (defined $k32CreateDir) {
4768
+ $k32CreateDir = Win32::API->new('KERNEL32', 'CreateDirectoryW', 'PP', 'I');
4769
+ unless ($k32CreateDir) {
4770
+ $k32CreateDir = 0;
4771
+ # give this error once, then just "Error creating" for subsequent attempts
4772
+ return 'Error accessing Win32::API::CreateDirectoryW';
4773
+ }
4774
+ }
4775
+ $success = $k32CreateDir->Call($d2, 0) if $k32CreateDir;
4776
+ } else {
4777
+ $success = mkdir($d2, 0777);
4778
+ }
4779
+ $success or $err = "Error creating directory $dir", last;
4780
+ $err = '';
4781
+ }
4782
+ $dir .= '/';
4783
+ }
4784
+ }
4785
+ return $err;
4786
+ }
4787
+
4737
4788
  #------------------------------------------------------------------------------
4738
4789
  # Get file times (Unix seconds since the epoch)
4739
4790
  # Inputs: 0) ExifTool ref, 1) file name or ref
@@ -5648,6 +5699,17 @@ sub SetupTagTable($)
5648
5699
  }
5649
5700
  }
5650
5701
 
5702
+ #------------------------------------------------------------------------------
5703
+ # Is this a PC system?
5704
+ # Returns: true for PC systems
5705
+ # uses lookup for O/S names which may use a backslash as a directory separator
5706
+ # (ref File::Spec of PathTools-3.2701)
5707
+ my %isPC = (MSWin32 => 1, os2 => 1, dos => 1, NetWare => 1, symbian => 1, cygwin => 1);
5708
+ sub IsPC()
5709
+ {
5710
+ return $isPC{$^O};
5711
+ }
5712
+
5651
5713
  #------------------------------------------------------------------------------
5652
5714
  # Utilities to check for numerical types
5653
5715
  # Inputs: 0) value; Returns: true if value is a numerical type
@@ -1,6 +1,6 @@
1
1
  Summary: perl module for image data extraction
2
2
  Name: perl-Image-ExifTool
3
- Version: 12.92
3
+ Version: 12.95
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.92.0')
4
+ VERSION = Gem::Version.new('12.95.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.92.0
4
+ version: 12.95.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: 2024-07-30 00:00:00.000000000 Z
12
+ date: 2024-08-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: exiftool