exiftool_vendored 12.16.0 → 12.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of exiftool_vendored might be problematic. Click here for more details.

@@ -12,7 +12,7 @@ use vars qw(%specialStruct %dateTimeInfo %stdXlatNS);
12
12
 
13
13
  use Image::ExifTool qw(:DataAccess :Utils);
14
14
 
15
- sub CheckXMP($$$);
15
+ sub CheckXMP($$$;$);
16
16
  sub CaptureXMP($$$;$);
17
17
  sub SetPropertyPath($$;$$$$);
18
18
 
@@ -165,12 +165,12 @@ sub FormatXMPDate($)
165
165
 
166
166
  #------------------------------------------------------------------------------
167
167
  # Check XMP values for validity and format accordingly
168
- # Inputs: 0) ExifTool object ref, 1) tagInfo hash ref, 2) raw value ref
168
+ # Inputs: 0) ExifTool object ref, 1) tagInfo hash ref, 2) raw value ref, 3) conversion type
169
169
  # Returns: error string or undef (and may change value) on success
170
170
  # Note: copies structured information to avoid conflicts with calling code
171
- sub CheckXMP($$$)
171
+ sub CheckXMP($$$;$)
172
172
  {
173
- my ($et, $tagInfo, $valPtr) = @_;
173
+ my ($et, $tagInfo, $valPtr, $convType) = @_;
174
174
 
175
175
  if ($$tagInfo{Struct}) {
176
176
  require 'Image/ExifTool/XMPStruct.pl';
@@ -250,9 +250,12 @@ sub CheckXMP($$$)
250
250
  return "Invalid date/time (use YYYY:mm:dd HH:MM:SS[.ss][+/-HH:MM|Z])" unless $newDate;
251
251
  $$valPtr = $newDate;
252
252
  } elsif ($format eq 'boolean') {
253
+ # (allow lower-case 'true' and 'false' if not setting PrintConv value)
253
254
  if (not $$valPtr or $$valPtr =~ /false/i or $$valPtr =~ /^no$/i) {
254
- $$valPtr = 'False';
255
- } else {
255
+ if (not $$valPtr or $$valPtr ne 'false' or not $convType or $convType eq 'PrintConv') {
256
+ $$valPtr = 'False';
257
+ }
258
+ } elsif ($$valPtr ne 'true' or not $convType or $convType eq 'PrintConv') {
256
259
  $$valPtr = 'True';
257
260
  }
258
261
  } elsif ($format eq '1') {
@@ -669,7 +669,7 @@ TAG: foreach $tagInfo (@matchingTags) {
669
669
  next TAG unless $lcWant eq lc $grp[1];
670
670
  }
671
671
  }
672
- $writeGroup or $writeGroup = ($$tagInfo{WriteGroup} || $grp[0]);
672
+ $writeGroup or $writeGroup = ($$tagInfo{WriteGroup} || $$tagInfo{Table}{WRITE_GROUP} || $grp[0]);
673
673
  $priority = $hiPri; # highest priority since group was specified
674
674
  }
675
675
  ++$foundMatch;
@@ -2766,6 +2766,8 @@ sub ConvInv($$$$$;$$)
2766
2766
  my ($self, $val, $tagInfo, $tag, $wgrp1, $convType, $wantGroup) = @_;
2767
2767
  my ($err, $type);
2768
2768
 
2769
+ $convType or $convType = $$self{ConvType} || 'PrintConv';
2770
+
2769
2771
  Conv: for (;;) {
2770
2772
  if (not defined $type) {
2771
2773
  # split value into list if necessary
@@ -2779,7 +2781,7 @@ Conv: for (;;) {
2779
2781
  $val = @splitVal > 1 ? \@splitVal : @splitVal ? $splitVal[0] : '';
2780
2782
  }
2781
2783
  }
2782
- $type = $convType || $$self{ConvType} || 'PrintConv';
2784
+ $type = $convType;
2783
2785
  } elsif ($type eq 'PrintConv') {
2784
2786
  $type = 'ValueConv';
2785
2787
  } else {
@@ -2802,11 +2804,11 @@ Conv: for (;;) {
2802
2804
  if (ref $val eq 'ARRAY') {
2803
2805
  # loop through array values
2804
2806
  foreach $v (@$val) {
2805
- $err2 = &$checkProc($self, $tagInfo, \$v);
2807
+ $err2 = &$checkProc($self, $tagInfo, \$v, $convType);
2806
2808
  last if $err2;
2807
2809
  }
2808
2810
  } else {
2809
- $err2 = &$checkProc($self, $tagInfo, \$val);
2811
+ $err2 = &$checkProc($self, $tagInfo, \$val, $convType);
2810
2812
  }
2811
2813
  }
2812
2814
  }
@@ -50,13 +50,13 @@ use Image::ExifTool::Exif;
50
50
  use Image::ExifTool::GPS;
51
51
  require Exporter;
52
52
 
53
- $VERSION = '3.37';
53
+ $VERSION = '3.38';
54
54
  @ISA = qw(Exporter);
55
55
  @EXPORT_OK = qw(EscapeXML UnescapeXML);
56
56
 
57
57
  sub ProcessXMP($$;$);
58
58
  sub WriteXMP($$;$);
59
- sub CheckXMP($$$);
59
+ sub CheckXMP($$$;$);
60
60
  sub ParseXMPElement($$$;$$$$);
61
61
  sub DecodeBase64($);
62
62
  sub EncodeBase64($;$);
@@ -467,6 +467,19 @@ my %sCorrectionMask = (
467
467
  CenterValue => { Writable => 'real', List => 0 },
468
468
  PerimeterValue=>{ Writable => 'real', List => 0 },
469
469
  );
470
+ my %sCorrectionRangeMask = (
471
+ STRUCT_NAME => 'CorrectionRangeMask',
472
+ NAMESPACE => 'crs',
473
+ Version => { },
474
+ Type => { },
475
+ ColorAmount => { Writable => 'real' },
476
+ LumMin => { Writable => 'real' },
477
+ LumMax => { Writable => 'real' },
478
+ LumFeather => { Writable => 'real' },
479
+ DepthMin => { Writable => 'real' },
480
+ DepthMax => { Writable => 'real' },
481
+ DepthFeather=> { Writable => 'real' },
482
+ );
470
483
  my %sCorrection = (
471
484
  STRUCT_NAME => 'Correction',
472
485
  NAMESPACE => 'crs',
@@ -491,6 +504,15 @@ my %sCorrection = (
491
504
  LocalDefringe => { FlatName => 'Defringe', Writable => 'real', List => 0 },
492
505
  LocalTemperature => { FlatName => 'Temperature',Writable => 'real', List => 0 },
493
506
  LocalTint => { FlatName => 'Tint', Writable => 'real', List => 0 },
507
+ LocalHue => { FlatName => 'Hue', Writable => 'real', List => 0 },
508
+ LocalWhites2012 => { FlatName => 'Whites2012', Writable => 'real', List => 0 },
509
+ LocalBlacks2012 => { FlatName => 'Blacks2012', Writable => 'real', List => 0 },
510
+ LocalDehaze => { FlatName => 'Dehaze', Writable => 'real', List => 0 },
511
+ LocalTexture => { FlatName => 'Texture', Writable => 'real', List => 0 },
512
+ CorrectionRangeMask => {
513
+ FlatName => 'RangeMask',
514
+ Struct => \%sCorrectionRangeMask,
515
+ },
494
516
  CorrectionMasks => {
495
517
  FlatName => 'Mask',
496
518
  Struct => \%sCorrectionMask,
@@ -2311,6 +2333,7 @@ my %sPantryItem = (
2311
2333
  Location => { Groups => { 2 => 'Location' } },
2312
2334
  Scene => { Groups => { 2 => 'Other' }, List => 'Bag' },
2313
2335
  SubjectCode => { Groups => { 2 => 'Other' }, List => 'Bag' },
2336
+ # Copyright - have seen this in a sample (Jan 2021), but I think it is non-standard
2314
2337
  );
2315
2338
 
2316
2339
  # Adobe Lightroom namespace properties (lr) (ref PH)
@@ -3306,6 +3329,9 @@ NoLoop:
3306
3329
  } else {
3307
3330
  $val = ConvertXMPDate($val, $new) if $new or $fmt eq 'date';
3308
3331
  }
3332
+ if ($$et{XmpValidate} and $fmt and $fmt eq 'boolean') {
3333
+ $et->WarnOnce("Boolean value for XMP-$ns:$$tagInfo{Name} should be capitalized",1);
3334
+ }
3309
3335
  # protect against large binary data in unknown tags
3310
3336
  $$tagInfo{Binary} = 1 if $new and length($val) > 65536;
3311
3337
  }
@@ -1,6 +1,6 @@
1
1
  Summary: perl module for image data extraction
2
2
  Name: perl-Image-ExifTool
3
- Version: 12.16
3
+ Version: 12.17
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.16.0')
4
+ VERSION = Gem::Version.new('12.17.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.16.0
4
+ version: 12.17.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: 2021-01-21 00:00:00.000000000 Z
12
+ date: 2021-02-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: exiftool