exiftool_vendored 12.73.0 → 12.74.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +26 -1
  3. data/bin/META.json +1 -1
  4. data/bin/META.yml +1 -1
  5. data/bin/README +2 -2
  6. data/bin/exiftool +49 -40
  7. data/bin/lib/File/RandomAccess.pm +31 -5
  8. data/bin/lib/File/RandomAccess.pod +4 -4
  9. data/bin/lib/Image/ExifTool/7Z.pm +3 -3
  10. data/bin/lib/Image/ExifTool/AFCP.pm +2 -2
  11. data/bin/lib/Image/ExifTool/BZZ.pm +2 -2
  12. data/bin/lib/Image/ExifTool/BuildTagLookup.pm +5 -5
  13. data/bin/lib/Image/ExifTool/Canon.pm +3 -3
  14. data/bin/lib/Image/ExifTool/CanonVRD.pm +2 -2
  15. data/bin/lib/Image/ExifTool/DICOM.pm +2 -2
  16. data/bin/lib/Image/ExifTool/DNG.pm +4 -4
  17. data/bin/lib/Image/ExifTool/Exif.pm +2 -2
  18. data/bin/lib/Image/ExifTool/FLIR.pm +2 -2
  19. data/bin/lib/Image/ExifTool/Fixup.pm +3 -3
  20. data/bin/lib/Image/ExifTool/FlashPix.pm +3 -3
  21. data/bin/lib/Image/ExifTool/FujiFilm.pm +8 -3
  22. data/bin/lib/Image/ExifTool/Geotag.pm +3 -3
  23. data/bin/lib/Image/ExifTool/HtmlDump.pm +2 -2
  24. data/bin/lib/Image/ExifTool/ID3.pm +2 -2
  25. data/bin/lib/Image/ExifTool/Import.pm +5 -5
  26. data/bin/lib/Image/ExifTool/JSON.pm +2 -2
  27. data/bin/lib/Image/ExifTool/Jpeg2000.pm +2 -2
  28. data/bin/lib/Image/ExifTool/MIE.pm +3 -3
  29. data/bin/lib/Image/ExifTool/MinoltaRaw.pm +2 -2
  30. data/bin/lib/Image/ExifTool/Nikon.pm +3 -1
  31. data/bin/lib/Image/ExifTool/NikonCustom.pm +3 -3
  32. data/bin/lib/Image/ExifTool/Ogg.pm +2 -2
  33. data/bin/lib/Image/ExifTool/PLIST.pm +3 -3
  34. data/bin/lib/Image/ExifTool/PanasonicRaw.pm +3 -3
  35. data/bin/lib/Image/ExifTool/PhaseOne.pm +2 -2
  36. data/bin/lib/Image/ExifTool/Photoshop.pm +3 -3
  37. data/bin/lib/Image/ExifTool/PostScript.pm +2 -2
  38. data/bin/lib/Image/ExifTool/QuickTime.pm +40 -107
  39. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +8 -6
  40. data/bin/lib/Image/ExifTool/RSRC.pm +2 -2
  41. data/bin/lib/Image/ExifTool/Samsung.pm +4 -4
  42. data/bin/lib/Image/ExifTool/Shift.pl +1 -1
  43. data/bin/lib/Image/ExifTool/SigmaRaw.pm +3 -3
  44. data/bin/lib/Image/ExifTool/Sony.pm +3 -3
  45. data/bin/lib/Image/ExifTool/TagInfoXML.pm +2 -2
  46. data/bin/lib/Image/ExifTool/TagLookup.pm +5 -5
  47. data/bin/lib/Image/ExifTool/TagNames.pod +5 -1
  48. data/bin/lib/Image/ExifTool/WriteCanonRaw.pl +1 -1
  49. data/bin/lib/Image/ExifTool/WriteExif.pl +15 -15
  50. data/bin/lib/Image/ExifTool/WritePDF.pl +1 -1
  51. data/bin/lib/Image/ExifTool/WriteQuickTime.pl +1 -1
  52. data/bin/lib/Image/ExifTool/WriteXMP.pl +4 -2
  53. data/bin/lib/Image/ExifTool/Writer.pl +66 -42
  54. data/bin/lib/Image/ExifTool/ZIP.pm +6 -6
  55. data/bin/lib/Image/ExifTool.pm +27 -23
  56. data/bin/lib/Image/ExifTool.pod +7 -6
  57. data/bin/perl-Image-ExifTool.spec +1 -1
  58. data/lib/exiftool_vendored/version.rb +1 -1
  59. metadata +2 -2
@@ -48,7 +48,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
48
48
  use Image::ExifTool::Exif;
49
49
  use Image::ExifTool::GPS;
50
50
 
51
- $VERSION = '2.91';
51
+ $VERSION = '2.92';
52
52
 
53
53
  sub ProcessMOV($$;$);
54
54
  sub ProcessKeys($$$);
@@ -268,6 +268,24 @@ my %timeInfo = (
268
268
  PrintConvInv => '$self->InverseDateTime($val)',
269
269
  # (can't put Groups here because they aren't constant!)
270
270
  );
271
+ # properties for ISO 8601 format date/time tags
272
+ my %iso8601Date = (
273
+ Shift => 'Time',
274
+ ValueConv => q{
275
+ require Image::ExifTool::XMP;
276
+ $val = Image::ExifTool::XMP::ConvertXMPDate($val);
277
+ $val =~ s/([-+]\d{2})(\d{2})$/$1:$2/; # add colon to timezone if necessary
278
+ return $val;
279
+ },
280
+ ValueConvInv => q{
281
+ require Image::ExifTool::XMP;
282
+ my $tmp = Image::ExifTool::XMP::FormatXMPDate($val);
283
+ ($val = $tmp) =~ s/([-+]\d{2}):(\d{2})$/$1$2/ if defined $tmp; # remove time zone colon
284
+ return $val;
285
+ },
286
+ PrintConv => '$self->ConvertDateTime($val)',
287
+ PrintConvInv => '$self->InverseDateTime($val,1)', # (add time zone if it didn't exist)
288
+ );
271
289
  # information for duration tags
272
290
  my %durationInfo = (
273
291
  ValueConv => '$$self{TimeScale} ? $val / $$self{TimeScale} : $val',
@@ -1574,22 +1592,7 @@ my %isImageData = ( av01 => 1, avc1 => 1, hvc1 => 1, lhv1 => 1, hvt1 => 1 );
1574
1592
  "\xa9day" => {
1575
1593
  Name => 'ContentCreateDate',
1576
1594
  Groups => { 2 => 'Time' },
1577
- Shift => 'Time',
1578
- # handle values in the form "2010-02-12T13:27:14-0800" (written by Apple iPhone)
1579
- ValueConv => q{
1580
- require Image::ExifTool::XMP;
1581
- $val = Image::ExifTool::XMP::ConvertXMPDate($val);
1582
- $val =~ s/([-+]\d{2})(\d{2})$/$1:$2/; # add colon to timezone if necessary
1583
- return $val;
1584
- },
1585
- ValueConvInv => q{
1586
- require Image::ExifTool::XMP;
1587
- my $tmp = Image::ExifTool::XMP::FormatXMPDate($val);
1588
- ($val = $tmp) =~ s/([-+]\d{2}):(\d{2})$/$1$2/ if defined $tmp; # remove time zone colon
1589
- return $val;
1590
- },
1591
- PrintConv => '$self->ConvertDateTime($val)',
1592
- PrintConvInv => '$self->InverseDateTime($val,1)', # (add time zone if it didn't exist)
1595
+ %iso8601Date,
1593
1596
  },
1594
1597
  "\xa9ART" => 'Artist', #PH (iTunes 8.0.2)
1595
1598
  "\xa9alb" => 'Album', #PH (iTunes 8.0.2)
@@ -1873,21 +1876,7 @@ my %isImageData = ( av01 => 1, avc1 => 1, hvc1 => 1, lhv1 => 1, hvt1 => 1 );
1873
1876
  Apple Photos has been reported to show a crazy date/time for some MP4 files
1874
1877
  containing this tag, but perhaps only if it is missing a time zone
1875
1878
  }, #forum10690/11125
1876
- Shift => 'Time',
1877
- ValueConv => q{
1878
- require Image::ExifTool::XMP;
1879
- $val = Image::ExifTool::XMP::ConvertXMPDate($val);
1880
- $val =~ s/([-+]\d{2})(\d{2})$/$1:$2/; # add colon to timezone if necessary
1881
- return $val;
1882
- },
1883
- ValueConvInv => q{
1884
- require Image::ExifTool::XMP;
1885
- $val = Image::ExifTool::XMP::FormatXMPDate($val);
1886
- $val =~ s/([-+]\d{2}):(\d{2})$/$1$2/; # remove time zone colon
1887
- return $val;
1888
- },
1889
- PrintConv => '$self->ConvertDateTime($val)',
1890
- PrintConvInv => '$self->InverseDateTime($val,1)', # (add time zone if it didn't exist)
1879
+ %iso8601Date,
1891
1880
  },
1892
1881
  manu => { # (SX280)
1893
1882
  Name => 'Make',
@@ -2310,23 +2299,9 @@ my %isImageData = ( av01 => 1, avc1 => 1, hvc1 => 1, lhv1 => 1, hvt1 => 1 );
2310
2299
  symbol in these tag ID's for the Ricoh Theta Z1 and maybe other models
2311
2300
  },
2312
2301
  Groups => { 2 => 'Time' },
2313
- Shift => 'Time',
2314
2302
  Avoid => 1,
2315
2303
  # handle values in the form "2010-02-12T13:27:14-0800"
2316
- ValueConv => q{
2317
- require Image::ExifTool::XMP;
2318
- $val = Image::ExifTool::XMP::ConvertXMPDate($val);
2319
- $val =~ s/([-+]\d{2})(\d{2})$/$1:$2/; # add colon to timezone if necessary
2320
- return $val;
2321
- },
2322
- ValueConvInv => q{
2323
- require Image::ExifTool::XMP;
2324
- my $tmp = Image::ExifTool::XMP::FormatXMPDate($val);
2325
- ($val = $tmp) =~ s/([-+]\d{2}):(\d{2})$/$1$2/ if defined $tmp; # remove time zone colon
2326
- return $val;
2327
- },
2328
- PrintConv => '$self->ConvertDateTime($val)',
2329
- PrintConvInv => '$self->InverseDateTime($val,1)', # (add time zone if it didn't exist)
2304
+ %iso8601Date,
2330
2305
  },
2331
2306
  '@xyz' => { #PH (iPhone 3GS)
2332
2307
  Name => 'GPSCoordinates',
@@ -3339,22 +3314,7 @@ my %isImageData = ( av01 => 1, avc1 => 1, hvc1 => 1, lhv1 => 1, hvt1 => 1 );
3339
3314
  "\xa9day" => {
3340
3315
  Name => 'ContentCreateDate',
3341
3316
  Groups => { 2 => 'Time' },
3342
- Shift => 'Time',
3343
- # handle values in the form "2010-02-12T13:27:14-0800"
3344
- ValueConv => q{
3345
- require Image::ExifTool::XMP;
3346
- $val = Image::ExifTool::XMP::ConvertXMPDate($val);
3347
- $val =~ s/([-+]\d{2})(\d{2})$/$1:$2/; # add colon to timezone if necessary
3348
- return $val;
3349
- },
3350
- ValueConvInv => q{
3351
- require Image::ExifTool::XMP;
3352
- $val = Image::ExifTool::XMP::FormatXMPDate($val);
3353
- $val =~ s/([-+]\d{2}):(\d{2})$/$1$2/; # remove time zone colon
3354
- return $val;
3355
- },
3356
- PrintConv => '$self->ConvertDateTime($val)',
3357
- PrintConvInv => '$self->InverseDateTime($val,1)', # (add time zone if it didn't exist)
3317
+ %iso8601Date,
3358
3318
  },
3359
3319
  "\xa9des" => 'Description', #4
3360
3320
  "\xa9enc" => 'EncodedBy', #10
@@ -6403,12 +6363,10 @@ my %isImageData = ( av01 => 1, avc1 => 1, hvc1 => 1, lhv1 => 1, hvt1 => 1 );
6403
6363
  ValueConvInv => '$val * 1000',
6404
6364
  PrintConv => 'ConvertDuration($val)',
6405
6365
  PrintConvInv => q{
6406
- $val =~ s/ s$//;
6407
- my @a = split /(:| days )/, $val;
6408
- my $sign = ($val =~ s/^-//) ? -1 : 1;
6409
- $a[0] += shift(@a) * 24 if @a == 4;
6410
- $a[0] += shift(@a) * 60 while @a > 1;
6411
- return $a[0] * $sign;
6366
+ my $sign = ($val =~ s/^-//) ? -1 : 1;
6367
+ my @a = $val =~ /(\d+(?:\.\d+)?)/g;
6368
+ unshift @a, 0 while @a < 4;
6369
+ return $sign * (((($a[0] * 24) + $a[1]) * 60 + $a[2]) * 60 + $a[3]);
6412
6370
  },
6413
6371
  },
6414
6372
 
@@ -6522,21 +6480,7 @@ my %isImageData = ( av01 => 1, avc1 => 1, hvc1 => 1, lhv1 => 1, hvt1 => 1 );
6522
6480
  creationdate=> {
6523
6481
  Name => 'CreationDate',
6524
6482
  Groups => { 2 => 'Time' },
6525
- Shift => 'Time',
6526
- ValueConv => q{
6527
- require Image::ExifTool::XMP;
6528
- $val = Image::ExifTool::XMP::ConvertXMPDate($val,1);
6529
- $val =~ s/([-+]\d{2})(\d{2})$/$1:$2/; # add colon to timezone if necessary
6530
- return $val;
6531
- },
6532
- ValueConvInv => q{
6533
- require Image::ExifTool::XMP;
6534
- $val = Image::ExifTool::XMP::FormatXMPDate($val);
6535
- $val =~ s/([-+]\d{2}):(\d{2})$/$1$2/; # remove time zone colon
6536
- return $val;
6537
- },
6538
- PrintConv => '$self->ConvertDateTime($val)',
6539
- PrintConvInv => '$self->InverseDateTime($val,1)', # (add time zone if it didn't exist)
6483
+ %iso8601Date,
6540
6484
  },
6541
6485
  description => { },
6542
6486
  director => { },
@@ -6586,21 +6530,7 @@ my %isImageData = ( av01 => 1, avc1 => 1, hvc1 => 1, lhv1 => 1, hvt1 => 1 );
6586
6530
  'location.date' => {
6587
6531
  Name => 'LocationDate',
6588
6532
  Groups => { 2 => 'Time' },
6589
- Shift => 'Time',
6590
- ValueConv => q{
6591
- require Image::ExifTool::XMP;
6592
- $val = Image::ExifTool::XMP::ConvertXMPDate($val);
6593
- $val =~ s/([-+]\d{2})(\d{2})$/$1:$2/; # add colon to timezone if necessary
6594
- return $val;
6595
- },
6596
- ValueConvInv => q{
6597
- require Image::ExifTool::XMP;
6598
- $val = Image::ExifTool::XMP::FormatXMPDate($val);
6599
- $val =~ s/([-+]\d{2}):(\d{2})$/$1$2/; # remove time zone colon
6600
- return $val;
6601
- },
6602
- PrintConv => '$self->ConvertDateTime($val)',
6603
- PrintConvInv => '$self->InverseDateTime($val,1)', # (add time zone if it didn't exist)
6533
+ %iso8601Date,
6604
6534
  },
6605
6535
  'location.accuracy.horizontal' => { Name => 'LocationAccuracyHorizontal' },
6606
6536
  'live-photo.auto' => { Name => 'LivePhotoAuto', Writable => 'int8u' },
@@ -6693,6 +6623,16 @@ my %isImageData = ( av01 => 1, avc1 => 1, hvc1 => 1, lhv1 => 1, hvt1 => 1 );
6693
6623
  'detected-face.roll-angle' => { Name => 'DetectedFaceRollAngle', Writable => 0 },
6694
6624
  # (fiel)com.apple.quicktime.detected-face.yaw-angle (dtyp=23, float)
6695
6625
  'detected-face.yaw-angle' => { Name => 'DetectedFaceYawAngle', Writable => 0 },
6626
+ # the following tags generated by ShutterEncoder when "preserve metadata" is selected (forum15610)
6627
+ major_brand => { Name => 'MajorBrand', Avoid => 1 },
6628
+ minor_version => { Name => 'MinorVersion', Avoid => 1 },
6629
+ compatible_brands => { Name => 'CompatibleBrands', Avoid => 1 },
6630
+ creation_time => {
6631
+ Name => 'CreationTime',
6632
+ Groups => { 2 => 'Time' },
6633
+ Avoid => 1,
6634
+ %iso8601Date,
6635
+ },
6696
6636
  #
6697
6637
  # seen in Apple ProRes RAW file
6698
6638
  #
@@ -6708,13 +6648,6 @@ my %isImageData = ( av01 => 1, avc1 => 1, hvc1 => 1, lhv1 => 1, hvt1 => 1 );
6708
6648
  # (mdta)com.apple.proapps.image.{TIFF}.Make (eg. "Atmos")
6709
6649
  # (mdta)com.apple.proapps.image.{TIFF}.Model (eg. "ShogunInferno")
6710
6650
  # (mdta)com.apple.proapps.image.{TIFF}.Software (eg. "9.0")
6711
- #
6712
- # also seen (but don't yet add support for these)
6713
- #
6714
- # (mdta)major_brand
6715
- # (mdta)minor_version
6716
- # (mdta)compatible_brands
6717
- # (mdta)creation_time
6718
6651
  );
6719
6652
 
6720
6653
  # iTunes info ('----') atoms
@@ -9373,7 +9306,7 @@ sub ProcessMOV($$;$)
9373
9306
  }
9374
9307
  # more convenient to package data as a RandomAccess file
9375
9308
  unless ($raf) {
9376
- $raf = new File::RandomAccess($dataPt);
9309
+ $raf = File::RandomAccess->new($dataPt);
9377
9310
  $dirEnd = $dataPos + $$dirInfo{DirLen} + ($$dirInfo{DirStart} || 0) if $$dirInfo{DirLen};
9378
9311
  }
9379
9312
  # skip leading bytes if necessary
@@ -848,11 +848,11 @@ sub FoundSomething($$;$$)
848
848
  #------------------------------------------------------------------------------
849
849
  # Approximate GPSDateTime value from sample time and CreateDate
850
850
  # Inputs: 0) ExifTool ref, 1) tag table ptr, 2) sample time (s)
851
- # 3) true if CreateDate is at end of video
851
+ # 3) true if CreateDate is at end of video, 4) flag if CreateDate is UTC
852
852
  # Notes: Uses ExifTool CreateDateAtEnd as flag to subtract video duration
853
- sub SetGPSDateTime($$$)
853
+ sub SetGPSDateTime($$$;$)
854
854
  {
855
- my ($et, $tagTbl, $sampleTime) = @_;
855
+ my ($et, $tagTbl, $sampleTime, $isUTC) = @_;
856
856
  my $value = $$et{VALUE};
857
857
  if (defined $sampleTime and $$value{CreateDate}) {
858
858
  $sampleTime += $$value{CreateDate}; # adjust sample time to seconds since the epoch
@@ -863,7 +863,9 @@ sub SetGPSDateTime($$$)
863
863
  } else {
864
864
  $et->WarnOnce('Approximating GPSDateTime as CreateDate + SampleTime', 1);
865
865
  }
866
- unless ($et->Options('QuickTimeUTC')) {
866
+ my $utc = $et->Options('QuickTimeUTC');
867
+ $utc = $isUTC unless defined $utc; # (allow QuickTimeUTC=0 to override $isUTC default)
868
+ unless ($utc) {
867
869
  my $tzOff = $$et{tzOff}; # use previously calculated offset
868
870
  unless (defined $tzOff) {
869
871
  # adjust to UTC, assuming time is local
@@ -1344,7 +1346,7 @@ Sample: for ($i=0; ; ) {
1344
1346
  $et->HandleTag($tagTbl, GPSLatitude => Get32s(\$buff, 12+$n) * 180/0x80000000);
1345
1347
  $et->HandleTag($tagTbl, GPSLongitude => Get32s(\$buff, 16+$n) * 180/0x80000000);
1346
1348
  $et->HandleTag($tagTbl, GPSSpeed => Get16u(\$buff, 8+$n) * $mphToKph);
1347
- SetGPSDateTime($et, $tagTbl, $time[$i]);
1349
+ SetGPSDateTime($et, $tagTbl, $time[$i], 1);
1348
1350
  next; # all done (don't store/process as text)
1349
1351
  }
1350
1352
  unless (defined $val) {
@@ -2454,7 +2456,7 @@ sub ProcessLIGO_JSON($$$)
2454
2456
  $et->VerboseDir('LIGO_JSON', undef, length($$dataPt));
2455
2457
  while ($$dataPt =~ /LIGOGPSINFO (\{.*?\})/g) {
2456
2458
  my $json = $1;
2457
- my $raf = new File::RandomAccess(\$json);
2459
+ my $raf = File::RandomAccess->new(\$json);
2458
2460
  my %dbase;
2459
2461
  Image::ExifTool::Import::ReadJSON($raf, \%dbase);
2460
2462
  my $info = $dbase{'*'} or next;
@@ -14,7 +14,7 @@ use strict;
14
14
  use vars qw($VERSION);
15
15
  use Image::ExifTool qw(:DataAccess :Utils);
16
16
 
17
- $VERSION = '1.09';
17
+ $VERSION = '1.10';
18
18
 
19
19
  sub ProcessRSRC($$);
20
20
 
@@ -70,7 +70,7 @@ sub ProcessRSRC($$)
70
70
  my ($hdr, $map, $buff, $i, $j);
71
71
 
72
72
  # allow access with data reference
73
- $raf or $raf = new File::RandomAccess($$dirInfo{DataPt});
73
+ $raf or $raf = File::RandomAccess->new($$dirInfo{DataPt});
74
74
 
75
75
  # attempt to validate the format as thoroughly as practical
76
76
  return 0 unless $raf->Read($hdr, 30) == 30;
@@ -22,7 +22,7 @@ use vars qw($VERSION %samsungLensTypes);
22
22
  use Image::ExifTool qw(:DataAccess :Utils);
23
23
  use Image::ExifTool::Exif;
24
24
 
25
- $VERSION = '1.55';
25
+ $VERSION = '1.56';
26
26
 
27
27
  sub WriteSTMN($$$);
28
28
  sub ProcessINFO($$$);
@@ -1546,7 +1546,7 @@ sub ProcessSamsung($$$)
1546
1546
  my ($buff, $buf2, $index, $offsetPos, $audioNOff, $audioSize);
1547
1547
 
1548
1548
  unless ($raf) {
1549
- $raf = new File::RandomAccess($$dirInfo{DataPt});
1549
+ $raf = File::RandomAccess->new($$dirInfo{DataPt});
1550
1550
  $et->VerboseDir('SamsungTrailer');
1551
1551
  }
1552
1552
  return 0 unless $raf->Seek(-6-$offset, 2) and $raf->Read($buff, 6) == 6 and
@@ -1675,7 +1675,7 @@ SamBlock:
1675
1675
  # add a fixup so the calling routine can apply further shifts if necessary
1676
1676
  require Image::ExifTool::Fixup;
1677
1677
  my $fixup = $$dirInfo{Fixup};
1678
- $fixup or $fixup = $$dirInfo{Fixup} = new Image::ExifTool::Fixup;
1678
+ $fixup or $fixup = $$dirInfo{Fixup} = Image::ExifTool::Fixup->new;
1679
1679
  $fixup->AddFixup(length($buff) - $offsetPos);
1680
1680
  $fixup->AddFixup(length($buff) - $offsetPos + 4);
1681
1681
  }
@@ -1697,7 +1697,7 @@ sub WriteSTMN($$$)
1697
1697
  {
1698
1698
  my ($et, $dirInfo, $tagTablePtr) = @_;
1699
1699
  # create a Fixup for the PreviewImage
1700
- $$dirInfo{Fixup} = new Image::ExifTool::Fixup;
1700
+ $$dirInfo{Fixup} = Image::ExifTool::Fixup->new;
1701
1701
  my $val = Image::ExifTool::WriteBinaryData($et, $dirInfo, $tagTablePtr);
1702
1702
  # force PreviewImage into the trailer even if it fits in EXIF segment
1703
1703
  $$et{PREVIEW_INFO}{IsTrailer} = 1 if $$et{PREVIEW_INFO};
@@ -403,7 +403,7 @@ sub ShiftTime($;$$$)
403
403
  };
404
404
  $@ and return CleanWarning($@);
405
405
  $tm += $$shiftOffset{$mode}; # apply the shift
406
- $tm < 0 and return 'Shift results in negative time';
406
+ $tm < 0 and return 'Shift results in date before 1970';
407
407
  # save fractional seconds in shifted time
408
408
  $frac = $tm - int($tm);
409
409
  if ($frac) {
@@ -16,7 +16,7 @@ use vars qw($VERSION);
16
16
  use Image::ExifTool qw(:DataAccess :Utils);
17
17
  use Image::ExifTool::Sigma;
18
18
 
19
- $VERSION = '1.31';
19
+ $VERSION = '1.32';
20
20
 
21
21
  sub ProcessX3FHeader($$$);
22
22
  sub ProcessX3FDirectory($$$);
@@ -460,7 +460,7 @@ sub WriteX3F($$)
460
460
  my $newData;
461
461
  my %jpegInfo = (
462
462
  Parent => 'X3F',
463
- RAF => new File::RandomAccess(\$buff),
463
+ RAF => File::RandomAccess->new(\$buff),
464
464
  OutFile => \$newData,
465
465
  );
466
466
  $$et{FILE_TYPE} = 'JPEG';
@@ -575,7 +575,7 @@ sub ProcessX3FDirectory($$$)
575
575
  if ($$tagInfo{Name} eq 'JpgFromRaw') {
576
576
  my %dirInfo = (
577
577
  Parent => 'X3F',
578
- RAF => new File::RandomAccess(\$buff),
578
+ RAF => File::RandomAccess->new(\$buff),
579
579
  );
580
580
  $$et{BASE} += $offset;
581
581
  $et->ProcessJPEG(\%dirInfo);
@@ -34,7 +34,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
34
34
  use Image::ExifTool::Exif;
35
35
  use Image::ExifTool::Minolta;
36
36
 
37
- $VERSION = '3.66';
37
+ $VERSION = '3.67';
38
38
 
39
39
  sub ProcessSRF($$$);
40
40
  sub ProcessSR2($$$);
@@ -859,7 +859,7 @@ my %hidUnk = ( Hidden => 1, Unknown => 1 );
859
859
  # must construct 0x20-byte header which contains length, width and height
860
860
  ValueConvInv => q{
861
861
  return 'none' unless $val;
862
- my $e = new Image::ExifTool;
862
+ my $e = Image::ExifTool->new;
863
863
  my $info = $e->ImageInfo(\$val,'ImageWidth','ImageHeight');
864
864
  return undef unless $$info{ImageWidth} and $$info{ImageHeight};
865
865
  my $size = Set32u($$info{ImageWidth}) . Set32u($$info{ImageHeight});
@@ -11640,7 +11640,7 @@ sub ProcessSR2($$$)
11640
11640
  );
11641
11641
  my $subTable = GetTagTable('Image::ExifTool::Sony::SR2SubIFD');
11642
11642
  if ($outfile) {
11643
- my $fixup = new Image::ExifTool::Fixup;
11643
+ my $fixup = Image::ExifTool::Fixup->new;
11644
11644
  $dirInfo{Fixup} = $fixup;
11645
11645
  $result = $et->WriteDirectory(\%dirInfo, $subTable);
11646
11646
  return undef unless $result;
@@ -15,7 +15,7 @@ use vars qw($VERSION @ISA $makeMissing);
15
15
  use Image::ExifTool qw(:Utils :Vars);
16
16
  use Image::ExifTool::XMP;
17
17
 
18
- $VERSION = '1.35';
18
+ $VERSION = '1.36';
19
19
  @ISA = qw(Exporter);
20
20
 
21
21
  # set this to a language code to generate Lang module with 'MISSING' entries
@@ -74,7 +74,7 @@ sub Write(;$$%)
74
74
  {
75
75
  local ($_, *PTIFILE);
76
76
  my ($file, $group, %opts) = @_;
77
- my $et = new Image::ExifTool;
77
+ my $et = Image::ExifTool->new;
78
78
  my ($fp, $tableName, %langInfo, @langs, $defaultLang, @groups);
79
79
  @groups = split ':', $group if $group;
80
80
 
@@ -17,7 +17,7 @@ require Exporter;
17
17
  use vars qw($VERSION @ISA @EXPORT_OK);
18
18
  use Image::ExifTool qw(:Utils);
19
19
 
20
- $VERSION = '1.19';
20
+ $VERSION = '1.20';
21
21
  @ISA = qw(Exporter);
22
22
  @EXPORT_OK = qw(FindTagInfo TagExists);
23
23
 
@@ -1870,6 +1870,7 @@ my %tagLookup = (
1870
1870
  'commanderinternalttlcompgroupb' => { 312 => '22.1', 313 => '28.1' },
1871
1871
  'comment' => { 0 => 0x2, 123 => 'Comment', 160 => 'Comment', 336 => 'Comment', 399 => "\xa9cmt", 401 => 'comment', 407 => "\xa9cmt" },
1872
1872
  'compass' => { 417 => 0x4 },
1873
+ 'compatiblebrands' => { 401 => 'compatible_brands' },
1873
1874
  'compatibleversion' => { 509 => 'CompatibleVersion', 511 => 'CompatibleVersion' },
1874
1875
  'compilation' => { 399 => 'cpil' },
1875
1876
  'compimageimagespersequence' => { 516 => [\'CompositeImageExposureTimes','CompositeImageExposureTimesNumberOfImagesInSequences'] },
@@ -2022,7 +2023,7 @@ my %tagLookup = (
2022
2023
  'crc32' => { 513 => 'crc32' },
2023
2024
  'createdate' => { 122 => 0x9004, 160 => 'CreateDate', 332 => 'CreationDate', 336 => 'create-date', 398 => 'CreationDate', 404 => 0x1, 536 => 'CreateDate' },
2024
2025
  'creationdate' => { 401 => 'creationdate', 525 => 'CreationDate', 528 => 'creationDate' },
2025
- 'creationtime' => { 336 => 'Creation Time' },
2026
+ 'creationtime' => { 336 => 'Creation Time', 401 => 'creation_time' },
2026
2027
  'creativestyle' => { 434 => 0x1a, 435 => 0x18, 445 => 0x41, 448 => 0xb020, 480 => 0x4a },
2027
2028
  'creativestylesetting' => { 436 => 0xf, 453 => 0x7 },
2028
2029
  'creativestylewaschanged' => { 485 => 0x8001 },
@@ -4314,6 +4315,7 @@ my %tagLookup = (
4314
4315
  'mainboardversion' => { 141 => 0x438 },
4315
4316
  'maindialexposurecomp' => { 314 => '0.6' },
4316
4317
  'mainingredient' => { 530 => 'mainIngredient' },
4318
+ 'majorbrand' => { 401 => 'major_brand' },
4317
4319
  'majorversion' => { 500 => 'MajorVersion' },
4318
4320
  'make' => { 101 => 0x0, 118 => 0x1, 122 => 0x10f, 159 => 'Make', 336 => 'Make', 352 => 0x10f, 401 => 'make', 407 => ['@mak',"\xa9mak"], 527 => 'make', 534 => 'Make' },
4319
4321
  'makernote' => { 515 => 'MakerNote' },
@@ -4781,7 +4783,7 @@ my %tagLookup = (
4781
4783
  'minoltaquality' => { 184 => 0x5, 185 => 0xd, 186 => 0x3, 189 => [0x102,0x103] },
4782
4784
  'minoltatime' => { 184 => 0x16 },
4783
4785
  'minormodelagedisclosure' => { 333 => 'MinorModelAgeDisclosure' },
4784
- 'minorversion' => { 500 => 'MinorVersion' },
4786
+ 'minorversion' => { 401 => 'minor_version', 500 => 'MinorVersion' },
4785
4787
  'minsamplevalue' => { 122 => 0x118 },
4786
4788
  'mirrorlockup' => { 85 => 0xc, 86 => 0xc, 87 => 0x60f, 88 => 0xb, 89 => 0xc, 90 => 0x6, 91 => 0x6, 92 => 0xc, 93 => 0x3 },
4787
4789
  'mobilecountrycode' => { 508 => 'mcc' },
@@ -8509,7 +8511,6 @@ my %tagExists = (
8509
8511
  'companymainphone' => 1,
8510
8512
  'companyname' => 1,
8511
8513
  'compatibility' => 1,
8512
- 'compatiblebrands' => 1,
8513
8514
  'compatiblefontname' => 1,
8514
8515
  'complete' => 1,
8515
8516
  'compobj' => 1,
@@ -10361,7 +10362,6 @@ my %tagExists = (
10361
10362
  'mainboard' => 1,
10362
10363
  'maininfo' => 1,
10363
10364
  'maininfoifd' => 1,
10364
- 'majorbrand' => 1,
10365
10365
  'makeandmodel' => 1,
10366
10366
  'makemodel' => 1,
10367
10367
  'makernotepentax5a' => 1,
@@ -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 27469 tags, with 17233 unique tag names.
15
+ They contain a total of 27473 tags, with 17233 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
@@ -29481,8 +29481,10 @@ changed via the config file.
29481
29481
  'com.android.version' AndroidVersion yes
29482
29482
  'com.apple.photos.captureMode' CaptureMode yes
29483
29483
  'comment' Comment yes
29484
+ 'compatible_brands' CompatibleBrands yes/
29484
29485
  'content.identifier' ContentIdentifier yes
29485
29486
  'copyright' Copyright yes
29487
+ 'creation_time' CreationTime yes/
29486
29488
  'creationdate' CreationDate yes
29487
29489
  'description' Description yes
29488
29490
  'detected-face' FaceInfo QuickTime FaceInfo
@@ -29514,7 +29516,9 @@ changed via the config file.
29514
29516
  'location.name' LocationName yes
29515
29517
  'location.note' LocationNote yes
29516
29518
  'location.role' LocationRole yes
29519
+ 'major_brand' MajorBrand yes/
29517
29520
  'make' Make yes
29521
+ 'minor_version' MinorVersion yes/
29518
29522
  'model' Model yes
29519
29523
  'player.movie.audio.balance' Balance yes
29520
29524
  'player.movie.audio.bass' Bass yes
@@ -128,7 +128,7 @@ sub SaveMakerNotes($)
128
128
  delete $$et{MAKER_NOTE_INFO};
129
129
  my $dirEntries = $makerInfo->{Entries};
130
130
  my $numEntries = scalar(keys %$dirEntries);
131
- my $fixup = new Image::ExifTool::Fixup;
131
+ my $fixup = Image::ExifTool::Fixup->new;
132
132
  return unless $numEntries;
133
133
  # build the MakerNotes directory
134
134
  my $makerNotes = Set16u($numEntries);
@@ -171,9 +171,9 @@ sub RebuildMakerNotes($$$)
171
171
  my $saveOrder = GetByteOrder();
172
172
  my $loc = Image::ExifTool::MakerNotes::LocateIFD($et,\%subdirInfo);
173
173
  if (defined $loc) {
174
- my $makerFixup = $subdirInfo{Fixup} = new Image::ExifTool::Fixup;
174
+ my $makerFixup = $subdirInfo{Fixup} = Image::ExifTool::Fixup->new;
175
175
  # create new exiftool object to rewrite the directory without changing it
176
- my $newTool = new Image::ExifTool;
176
+ my $newTool = Image::ExifTool->new;
177
177
  $newTool->Options(
178
178
  IgnoreMinorErrors => $$et{OPTIONS}{IgnoreMinorErrors},
179
179
  FixBase => $$et{OPTIONS}{FixBase},
@@ -565,7 +565,7 @@ sub WriteExif($$$)
565
565
  my $firstBase = $base;
566
566
  my $raf = $$dirInfo{RAF};
567
567
  my $dirName = $$dirInfo{DirName} || 'unknown';
568
- my $fixup = $$dirInfo{Fixup} || new Image::ExifTool::Fixup;
568
+ my $fixup = $$dirInfo{Fixup} || Image::ExifTool::Fixup->new;
569
569
  my $imageDataFlag = $$dirInfo{ImageData} || '';
570
570
  my $verbose = $et->Options('Verbose');
571
571
  my $out = $et->Options('TextOut');
@@ -745,7 +745,7 @@ sub WriteExif($$$)
745
745
  my $valBuff = ''; # buffer for value data
746
746
  my @valFixups; # list of fixups for offsets in valBuff
747
747
  # fixup for offsets in dirBuff
748
- my $dirFixup = new Image::ExifTool::Fixup;
748
+ my $dirFixup = Image::ExifTool::Fixup->new;
749
749
  my $entryBasedFixup;
750
750
  my $lastTagID = -1;
751
751
  my ($oldInfo, $oldFormat, $oldFormName, $oldCount, $oldSize, $oldValue, $oldImageData);
@@ -896,7 +896,7 @@ Entry: for (;;) {
896
896
  TagInfo => $oldInfo || $tmpInfo,
897
897
  Offset => $base + $valuePtr + $dataPos,
898
898
  Size => $oldSize,
899
- Fixup => new Image::ExifTool::Fixup,
899
+ Fixup => Image::ExifTool::Fixup->new,
900
900
  },
901
901
  $invalidPreview = 2;
902
902
  # remove SubDirectory to prevent processing (for now)
@@ -1348,7 +1348,7 @@ NoOverwrite: next if $isNew > 0;
1348
1348
  # create empty source directory
1349
1349
  my %sourceDir = (
1350
1350
  Parent => $dirName,
1351
- Fixup => new Image::ExifTool::Fixup,
1351
+ Fixup => Image::ExifTool::Fixup->new,
1352
1352
  );
1353
1353
  $sourceDir{DirName} = $$newInfo{Groups}{1} if $$newInfo{SubIFD};
1354
1354
  $newValue = $et->WriteDirectory(\%sourceDir, $subTable);
@@ -1509,7 +1509,7 @@ NoOverwrite: next if $isNew > 0;
1509
1509
  }
1510
1510
  if (defined $loc) {
1511
1511
  # we need fixup data for this subdirectory
1512
- $subdirInfo{Fixup} = new Image::ExifTool::Fixup;
1512
+ $subdirInfo{Fixup} = Image::ExifTool::Fixup->new;
1513
1513
  # rewrite maker notes
1514
1514
  my $changed = $$et{CHANGED};
1515
1515
  $subdir = $et->WriteDirectory(\%subdirInfo, $subTable, $writeProc);
@@ -1673,7 +1673,7 @@ NoOverwrite: next if $isNew > 0;
1673
1673
  Name => $$newInfo{Name},
1674
1674
  TagInfo => $newInfo,
1675
1675
  Parent => $dirName,
1676
- Fixup => new Image::ExifTool::Fixup,
1676
+ Fixup => Image::ExifTool::Fixup->new,
1677
1677
  RAF => $raf,
1678
1678
  Subdir => $subdir,
1679
1679
  # set ImageData only for 1st level SubIFD's
@@ -1782,7 +1782,7 @@ NoOverwrite: next if $isNew > 0;
1782
1782
  #### eval Base ($start,$base)
1783
1783
  $subdirBase += eval $$subdir{Base};
1784
1784
  }
1785
- my $subFixup = new Image::ExifTool::Fixup;
1785
+ my $subFixup = Image::ExifTool::Fixup->new;
1786
1786
  my %subdirInfo = (
1787
1787
  Base => $subdirBase,
1788
1788
  DataPt => $valueDataPt,
@@ -1995,7 +1995,7 @@ NoOverwrite: next if $isNew > 0;
1995
1995
  # hold onto the PreviewImage until we can determine if it fits
1996
1996
  $$et{PREVIEW_INFO} or $$et{PREVIEW_INFO} = {
1997
1997
  Data => $$newValuePt,
1998
- Fixup => new Image::ExifTool::Fixup,
1998
+ Fixup => Image::ExifTool::Fixup->new,
1999
1999
  };
2000
2000
  $$et{PREVIEW_INFO}{ChangeBase} = 1 if $$newInfo{ChangeBase};
2001
2001
  if ($$newInfo{IsOffset} and $$newInfo{IsOffset} eq '2') {
@@ -2017,7 +2017,7 @@ NoOverwrite: next if $isNew > 0;
2017
2017
  $valBuff .= $$newValuePt; # add value data to buffer
2018
2018
  # must save a fixup pointer for every pointer in the directory
2019
2019
  if ($entryBased) {
2020
- $entryBasedFixup or $entryBasedFixup = new Image::ExifTool::Fixup;
2020
+ $entryBasedFixup or $entryBasedFixup = Image::ExifTool::Fixup->new;
2021
2021
  $entryBasedFixup->AddFixup(length($dirBuff) + 8, $dataTag);
2022
2022
  } else {
2023
2023
  $dirFixup->AddFixup(length($dirBuff) + 8, $dataTag);
@@ -2451,7 +2451,7 @@ NoOverwrite: next if $isNew > 0;
2451
2451
  $newOffset += $blockSize; # data comes after other deferred data
2452
2452
  # create fixup for SubIFD ImageData
2453
2453
  if ($imageDataFlag eq 'SubIFD' and not $subIfdDataFixup) {
2454
- $subIfdDataFixup = new Image::ExifTool::Fixup;
2454
+ $subIfdDataFixup = Image::ExifTool::Fixup->new;
2455
2455
  $imageData[-1][4] = $subIfdDataFixup;
2456
2456
  }
2457
2457
  $size += $pad; # account for pad byte if necessary
@@ -2522,7 +2522,7 @@ NoOverwrite: next if $isNew > 0;
2522
2522
  # hold onto the PreviewImage until we can determine if it fits
2523
2523
  $$et{PREVIEW_INFO} or $$et{PREVIEW_INFO} = {
2524
2524
  Data => $buff,
2525
- Fixup => new Image::ExifTool::Fixup,
2525
+ Fixup => Image::ExifTool::Fixup->new,
2526
2526
  };
2527
2527
  if ($$tagInfo{IsOffset} and $$tagInfo{IsOffset} eq '2') {
2528
2528
  $$et{PREVIEW_INFO}{NoBaseShift} = 1;
@@ -2603,7 +2603,7 @@ NoOverwrite: next if $isNew > 0;
2603
2603
  $fixup->AddFixup($entry + 8);
2604
2604
  # create special fixup for SubIFD data
2605
2605
  if ($imageDataFlag eq 'SubIFD') {
2606
- my $subIfdDataFixup = new Image::ExifTool::Fixup;
2606
+ my $subIfdDataFixup = Image::ExifTool::Fixup->new;
2607
2607
  $subIfdDataFixup->AddFixup($entry + 8);
2608
2608
  # save fixup in imageData list
2609
2609
  $$blockInfo[4] = $subIfdDataFixup;
@@ -2668,7 +2668,7 @@ NoOverwrite: next if $isNew > 0;
2668
2668
  } else {
2669
2669
  # Doesn't fit, or we still don't know, so save fixup information
2670
2670
  # and put the preview at the end of the file
2671
- $$previewInfo{Fixup} or $$previewInfo{Fixup} = new Image::ExifTool::Fixup;
2671
+ $$previewInfo{Fixup} or $$previewInfo{Fixup} = Image::ExifTool::Fixup->new;
2672
2672
  $$previewInfo{Fixup}->AddFixup($fixup);
2673
2673
  }
2674
2674
  } elsif (defined $newData and $deleteAll) {
@@ -290,7 +290,7 @@ sub WritePDF($$)
290
290
  $raf->Seek($pos, 0);
291
291
 
292
292
  # create a new ExifTool object and use it to read PDF and XMP information
293
- my $newTool = new Image::ExifTool;
293
+ my $newTool = Image::ExifTool->new;
294
294
  $newTool->Options(List => 1);
295
295
  $newTool->Options(Password => $et->Options('Password'));
296
296
  $newTool->Options(NoPDFList => $et->Options('NoPDFList'));
@@ -785,7 +785,7 @@ sub WriteQuickTime($$$)
785
785
  my ($rtnVal, $rtnErr) = $dataPt ? (undef, undef) : (1, 0);
786
786
 
787
787
  if ($dataPt) {
788
- $raf = new File::RandomAccess($dataPt);
788
+ $raf = File::RandomAccess->new($dataPt);
789
789
  } else {
790
790
  return 0 unless $raf;
791
791
  }