exiftool_vendored 12.10.0 → 12.11.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


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

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cf0281354d058359e076603ce713b412cd838a4c5ffe326534275ec858cb11a1
4
- data.tar.gz: a556f35232b6cca374d9b118d8b8b8ac9bf4e09e5714fae9c1f3c216ca658b20
3
+ metadata.gz: b7f2c837f1bff7860cad5011a04c5671d88d4a761c197c2442c73791c5d87b22
4
+ data.tar.gz: 49b1ea22c9fe6668b08f0b021cbe492cc9b870d931d92a4fe127ba7ada41d757
5
5
  SHA512:
6
- metadata.gz: ec70f7062aaee4ed619bb00bf91fa3d23cee45ebb15b1c3b3c383ee8867ea29b63b01e199a49dd2ef59f727eb8a156015f817ff31271c81ed69d3d560ea90a78
7
- data.tar.gz: 33512db4034b62eeddecc4b3b8ec5c370d089cc9526ec1e37989bf26fef200ffe563b3c42e4dd3395be867a81e2bd2790b816610d3249a70d49828de1fdecb9e
6
+ metadata.gz: a66c9d7b5f2f9f4118ff5c4355fbff604a7173c0b6a90349e2884624a55e1216e77b9e00c958515447d58d5f9d3e612f48e6608aeea8ae6ee3528512c39db1b2
7
+ data.tar.gz: 6d74f8b745f7c964dad82bca92d98c07b318d4895d12d4f10cfc2e8c212d326abdd02e60afff8af7e936c2b89802277b4ae79b4f3d1da2642f0ffd9e4717d0eb
@@ -7,6 +7,23 @@ RSS feed: https://exiftool.org/rss.xml
7
7
  Note: The most recent production release is Version 12.00. (Other versions are
8
8
  considered development releases, and are not uploaded to CPAN.)
9
9
 
10
+ Nov. 27, 2020 - Version 12.11
11
+
12
+ - Added -csvDelim option
13
+ - Added new Canon and Olympus LensType values (thanks LibRaw)
14
+ - Added a warning if ICC_Profile is deleted from an image (github issue #63)
15
+ - EndDir() function for -if option now works when -fileOrder is used
16
+ - Changed FileSize conversion to use binary prefixes since that is how the
17
+ conversion is currently done (eg. MiB instead of MB)
18
+ - Patched -csv option so columns aren't resorted when using -G option and one
19
+ of the tags is missing from a file
20
+ - Fixed incompatiblity with Google Photos when writing UserData:GPSCoordinates
21
+ to MP4 videos
22
+ - Fixed problem where the tags available in a -p format string were limited to
23
+ the same as the -if[NUM] option when NUM was specified
24
+ - Fixed incorrect decoding of SourceFileIndex/SourceDirectoryIndex for Ricoh
25
+ models
26
+
10
27
  Nov. 12, 2020 - Version 12.10
11
28
 
12
29
  - Added -validate test for proper TIFF magic number in JPEG EXIF header
@@ -47,5 +47,5 @@
47
47
  }
48
48
  },
49
49
  "release_status" : "stable",
50
- "version" : "12.10"
50
+ "version" : "12.11"
51
51
  }
@@ -28,4 +28,4 @@ recommends:
28
28
  Time::HiRes: 0
29
29
  requires:
30
30
  perl: 5.004
31
- version: 12.10
31
+ version: 12.11
data/bin/README CHANGED
@@ -106,8 +106,8 @@ your home directory, then you would type the following commands in a
106
106
  terminal window to extract and run ExifTool:
107
107
 
108
108
  cd ~/Desktop
109
- gzip -dc Image-ExifTool-12.10.tar.gz | tar -xf -
110
- cd Image-ExifTool-12.10
109
+ gzip -dc Image-ExifTool-12.11.tar.gz | tar -xf -
110
+ cd Image-ExifTool-12.11
111
111
  ./exiftool t/images/ExifTool.jpg
112
112
 
113
113
  Note: These commands extract meta information from one of the test images.
@@ -10,7 +10,7 @@
10
10
  use strict;
11
11
  require 5.004;
12
12
 
13
- my $version = '12.10';
13
+ my $version = '12.11';
14
14
 
15
15
  # add our 'lib' directory to the include list BEFORE 'use Image::ExifTool'
16
16
  my $exeDir;
@@ -136,12 +136,13 @@ my $countSameWr; # count files written OK but not changed
136
136
  my $critical; # flag for critical operations (disable CTRL-C)
137
137
  my $csv; # flag for CSV option (set to "CSV", or maybe "JSON" when writing)
138
138
  my $csvAdd; # flag to add CSV information to existing lists
139
+ my $csvDelim; # delimiter for CSV files
139
140
  my $csvSaveCount; # save counter for last CSV file loaded
140
141
  my $deleteOrig; # 0=restore original files, 1=delete originals, 2=delete w/o asking
141
142
  my $disableOutput; # flag to disable normal output
142
143
  my $doSetFileName; # flag set if FileName may be written
143
144
  my $doUnzip; # flag to extract info from .gz and .bz2 files
144
- my ($end,$endDir); # flags to end processing
145
+ my ($end,$endDir,%endDir); # flags to end processing
145
146
  my $escapeC; # C-style escape
146
147
  my $escapeHTML; # flag to escape printed values for html
147
148
  my $evalWarning; # warning from eval
@@ -239,6 +240,7 @@ my %optArgs = (
239
240
  '-c' => 1, '-coordformat' => 1,
240
241
  '-charset' => 0, # (optional arg; OK because arg cannot begin with "-")
241
242
  '-config' => 1,
243
+ '-csvdelim' => 1,
242
244
  '-d' => 1, '-dateformat' => 1,
243
245
  '-D' => 0, # necessary to avoid matching lower-case equivalent
244
246
  '-echo' => 1, '-echo1' => 1, '-echo2' => 1, '-echo3' => 1, '-echo4' => 1,
@@ -246,11 +248,12 @@ my %optArgs = (
246
248
  '-efile!' => 1, '-efile1!' => 1, '-efile2!' => 1, '-efile3!' => 1, '-efile4!' => 1,
247
249
  '-ext' => 1, '--ext' => 1, '-ext+' => 1, '--ext+' => 1,
248
250
  '-extension' => 1, '--extension' => 1, '-extension+' => 1, '--extension+' => 1,
249
- '-fileorder' => 1,
251
+ '-fileorder' => 1, '-fileorder0' => 1, '-fileorder1' => 1, '-fileorder2' => 1,
252
+ '-fileorder3' => 1, '-fileorder4' => 1, '-fileorder5' => 1,
250
253
  '-geotag' => 1,
251
254
  '-globaltimeshift' => 1,
252
255
  '-i' => 1, '-ignore' => 1,
253
- '-if' => 1, '-if0' => 1, '-if1' => 1, '-if2' => 1, '-if3' => 1, '-if4' => 1,
256
+ '-if' => 1, '-if0' => 1, '-if1' => 1, '-if2' => 1, '-if3' => 1, '-if4' => 1, '-if5' => 1,
254
257
  '-lang' => 0, # (optional arg; cannot begin with "-")
255
258
  '-listitem' => 1,
256
259
  '-o' => 1, '-out' => 1,
@@ -429,6 +432,7 @@ undef %countLink;
429
432
  undef %created;
430
433
  undef %csvTags;
431
434
  undef %database;
435
+ undef %endDir;
432
436
  undef %filterExt;
433
437
  undef %ignore;
434
438
  undef %printFmt;
@@ -500,6 +504,7 @@ $countGoodCr = 0;
500
504
  $countGoodWr = 0;
501
505
  $countNewDir = 0;
502
506
  $countSameWr = 0;
507
+ $csvDelim = ',';
503
508
  $csvSaveCount = 0;
504
509
  $fileTrailer = '';
505
510
  $filterFlag = 0;
@@ -821,7 +826,7 @@ for (;;) {
821
826
  next;
822
827
  }
823
828
  /^config$/i and Warn("Ignored -config option (not first on command line)\n"), shift, next;
824
- if (/^csv(\+?=.*)?/i) {
829
+ if (/^csv(\+?=.*)?$/i) {
825
830
  my $csvFile = $1;
826
831
  # must process on 2nd pass so -f and -charset options are available
827
832
  unless ($pass) {
@@ -841,7 +846,7 @@ for (;;) {
841
846
  if ($mt->Open(\*CSVFILE, $csvFile)) {
842
847
  binmode CSVFILE;
843
848
  require Image::ExifTool::Import;
844
- $msg = Image::ExifTool::Import::ReadCSV(\*CSVFILE, \%database, $forcePrint);
849
+ $msg = Image::ExifTool::Import::ReadCSV(\*CSVFILE, \%database, $forcePrint, $csvDelim);
845
850
  close(CSVFILE);
846
851
  } else {
847
852
  $msg = "Error opening CSV file '${csvFile}'";
@@ -852,6 +857,11 @@ for (;;) {
852
857
  $csv = 'CSV';
853
858
  next;
854
859
  }
860
+ if (/^csvdelim$/i) {
861
+ $csvDelim = shift;
862
+ defined $csvDelim or Error("Expecting argument for -csvDelim option\n"), $badCmd=1;
863
+ next;
864
+ }
855
865
  if (/^d$/ or $a eq 'dateformat') {
856
866
  my $fmt = shift;
857
867
  $fmt or Error("Expecting date format for -d option\n"), $badCmd=1, next;
@@ -1982,6 +1992,7 @@ sub GetImageInfo($$)
1982
1992
  }
1983
1993
  last unless $result;
1984
1994
  }
1995
+ undef @foundTags if $fastCondition; # ignore if we didn't get all tags
1985
1996
  }
1986
1997
  unless ($result) {
1987
1998
  $verbose and print $vout "-------- $file (failed condition)$progStr\n";
@@ -2235,7 +2246,9 @@ sub GetImageInfo($$)
2235
2246
  my $noDups = ($json or ($xml and $outFormat > 0));
2236
2247
  my $printConv = $et->Options('PrintConv');
2237
2248
  my $lastGroup = '';
2249
+ my $i = -1;
2238
2250
  TAG: foreach $tag (@foundTags) {
2251
+ ++$i; # keep track on index in @foundTags
2239
2252
  my $tagName = GetTagName($tag);
2240
2253
  my ($group, $valList);
2241
2254
  # get the value for this tag
@@ -2353,26 +2366,38 @@ TAG: foreach $tag (@foundTags) {
2353
2366
  }
2354
2367
  # save information for CSV output
2355
2368
  if ($csv) {
2356
- my $t = $group ? "$group:$tagName" : $tagName;
2357
- $t .= '#' if $tag =~ /#/; # add ValueConv "#" suffix if used
2369
+ my $tn = $tagName;
2370
+ $tn .= '#' if $tag =~ /#/; # add ValueConv "#" suffix if used
2371
+ my $gt = $group ? "$group:$tn" : $tn;
2358
2372
  # (tag-name case may be different if some tags don't exist
2359
2373
  # in a file, so all logic must use lower-case tag names)
2360
- my $lcTag = lc $t;
2374
+ my $lcTag = lc $gt;
2361
2375
  # override existing entry only if top priority
2362
2376
  next if defined $csvInfo{$lcTag} and $tag =~ /\(/;
2363
2377
  $csvInfo{$lcTag} = $val;
2364
2378
  if (defined $csvTags{$lcTag}) {
2365
2379
  # overwrite with actual extracted tag name
2366
2380
  # (note: can't check "if defined $val" here because -f may be used)
2367
- $csvTags{$lcTag} = $t if defined $$info{$tag};
2368
- } else {
2369
- # (don't save unextracted tag name unless -f was used)
2370
- $csvTags{$lcTag} = defined($val) ? $t : '';
2371
- if (@csvFiles == 1) {
2372
- push @csvTags, $lcTag; # save order of tags for first file
2373
- } elsif (@csvTags) {
2374
- undef @csvTags;
2375
- }
2381
+ $csvTags{$lcTag} = $gt if defined $$info{$tag};
2382
+ next;
2383
+ }
2384
+ # must check for "Unknown" group (for tags that don't exist)
2385
+ if ($group and defined $csvTags[$i] and $csvTags[$i] =~ /^(.*):$tn$/i) {
2386
+ next if $group eq 'Unknown'; # nothing more to do if we don't know tag group
2387
+ if ($1 eq 'unknown') {
2388
+ # replace unknown entry in CSV tag lookup and list
2389
+ delete $csvTags{$csvTags[$i]};
2390
+ $csvTags{$lcTag} = defined($val) ? $gt : '';
2391
+ $csvTags[$i] = $lcTag;
2392
+ next;
2393
+ }
2394
+ }
2395
+ # (don't save unextracted tag name unless -f was used)
2396
+ $csvTags{$lcTag} = defined($val) ? $gt : '';
2397
+ if (@csvFiles == 1) {
2398
+ push @csvTags, $lcTag; # save order of tags for first file
2399
+ } elsif (@csvTags) {
2400
+ undef @csvTags;
2376
2401
  }
2377
2402
  next;
2378
2403
  }
@@ -3298,7 +3323,7 @@ sub FormatCSV($)
3298
3323
  # the -b option is used to encode as Base64. It is unclear whether or not this
3299
3324
  # is valid CSV, but some readers may not like it. (If this becomes a problem,
3300
3325
  # in the future values may need to be truncated at the first NULL character.)
3301
- $val = qq{"$val"} if $val =~ s/"/""/g or $val =~ /(^\s+|\s+$)/ or $val =~ /[,\n\r]/;
3326
+ $val = qq{"$val"} if $val =~ s/"/""/g or $val =~ /(^\s+|\s+$)/ or $val =~ /[\n\r]|\Q$csvDelim/;
3302
3327
  return $val;
3303
3328
  }
3304
3329
 
@@ -3311,9 +3336,9 @@ sub PrintCSV()
3311
3336
  @csvTags or @csvTags = sort keys %csvTags;
3312
3337
  # make a list of tags actually found
3313
3338
  foreach $lcTag (@csvTags) {
3314
- push @tags, $csvTags{$lcTag} if $csvTags{$lcTag};
3339
+ push @tags, FormatCSV($csvTags{$lcTag}) if $csvTags{$lcTag};
3315
3340
  }
3316
- print join(',', 'SourceFile', @tags), "\n";
3341
+ print join($csvDelim, 'SourceFile', @tags), "\n";
3317
3342
  my $empty = defined($forcePrint) ? $forcePrint : '';
3318
3343
  foreach $file (@csvFiles) {
3319
3344
  my @vals = (FormatCSV($file)); # start with full file name
@@ -3324,7 +3349,7 @@ sub PrintCSV()
3324
3349
  defined $val or push(@vals,$empty), next;
3325
3350
  push @vals, FormatCSV($val);
3326
3351
  }
3327
- print join(',', @vals), "\n";
3352
+ print join($csvDelim, @vals), "\n";
3328
3353
  }
3329
3354
  }
3330
3355
 
@@ -3560,8 +3585,18 @@ sub ProcessFiles($;$)
3560
3585
  if ($list) {
3561
3586
  push(@$list, $file);
3562
3587
  } else {
3588
+ if (%endDir) {
3589
+ my ($d, $f) = Image::ExifTool::SplitFileName($file);
3590
+ next if $endDir{$d};
3591
+ }
3563
3592
  GetImageInfo($et, $file);
3564
3593
  $end and Warn("End called - $file\n");
3594
+ if ($endDir) {
3595
+ Warn("EndDir called - $file\n");
3596
+ my ($d, $f) = Image::ExifTool::SplitFileName($file);
3597
+ $endDir{$d} = 1;
3598
+ undef $endDir;
3599
+ }
3565
3600
  }
3566
3601
  }
3567
3602
  $et->Options(CharsetFileName => $enc) if $utf8FileName{$file};
@@ -3691,8 +3726,9 @@ sub ScanDir($$;$)
3691
3726
  if ($endDir) {
3692
3727
  $path =~ s(/$)();
3693
3728
  Warn("EndDir called - $path\n");
3694
- undef $endDir;
3729
+ $endDir{$path} = 1;
3695
3730
  $endThisDir = 1;
3731
+ undef $endDir;
3696
3732
  }
3697
3733
  }
3698
3734
  }
@@ -4486,6 +4522,7 @@ L<Input-output text formatting|/Input-output text formatting>
4486
4522
  -c FMT (-coordFormat) Set format for GPS coordinates
4487
4523
  -charset [[TYPE=]CHARSET] Specify encoding for special characters
4488
4524
  -csv[[+]=CSVFILE] Export/import tags in CSV format
4525
+ -csvDelim STR Set delimiter for CSV file
4489
4526
  -d FMT (-dateFormat) Set format for date/time values
4490
4527
  -D (-decimal) Show tag ID numbers in decimal
4491
4528
  -E,-ex,-ec (-escape(HTML|XML|C))Escape tag values for HTML, XML or C
@@ -5005,8 +5042,11 @@ tag names (with optional group names) for each column of the file, and
5005
5042
  values must be separated by commas. A special "SourceFile" column specifies
5006
5043
  the files associated with each row of information (and a SourceFile of "*"
5007
5044
  may be used to define default tags to be imported for all files which are
5008
- combined with any tags specified for the specific SourceFile processed).
5009
- The following examples demonstrate basic use of this option:
5045
+ combined with any tags specified for the specific SourceFile processed). The
5046
+ B<-csvDelim> option may be used to change the input/output field delimiter
5047
+ if something other than a comma is required.
5048
+
5049
+ The following examples demonstrate basic use of the B<-csv> option:
5010
5050
 
5011
5051
  # generate CSV file with common tags from all images in a directory
5012
5052
  exiftool -common -csv dir > out.csv
@@ -5053,6 +5093,11 @@ option. When processing a large number of files, it is recommended to
5053
5093
  either use the JSON (B<-j>) or XML (B<-X>) output format, or use B<-p> to
5054
5094
  generate a fixed-column CSV file instead of using the B<-csv> option.
5055
5095
 
5096
+ =item B<-csvDelim> I<STR>
5097
+
5098
+ Set the delimiter for separating CSV entries for the B<-csv> option.
5099
+ Default is ','.
5100
+
5056
5101
  =item B<-d> I<FMT> (B<-dateFormat>)
5057
5102
 
5058
5103
  Set the format for date/time tag values. The I<FMT> string may contain
@@ -5304,7 +5349,7 @@ with this command:
5304
5349
 
5305
5350
  produces output like this:
5306
5351
 
5307
- -- Generated by ExifTool 12.10 --
5352
+ -- Generated by ExifTool 12.11 --
5308
5353
  File: a.jpg - 2003:10:31 15:44:19
5309
5354
  (f/5.6, 1/60s, ISO 100)
5310
5355
  File: b.jpg - 2006:05:23 11:57:38
@@ -5712,7 +5757,8 @@ extracting any EXIF MakerNote information. B<-fast3> avoids extracting
5712
5757
  metadata from the file, and returns only pseudo System tags, but still reads
5713
5758
  the file header to obtain an educated guess at FileType. B<-fast4> doesn't
5714
5759
  even read the file header, and returns only System tags and a FileType based
5715
- on the file extension. Has no effect when writing.
5760
+ on the file extension. B<-fast5> also disables generation of the Composite
5761
+ tags (like B<-e>). Has no effect when writing.
5716
5762
 
5717
5763
  Note that a separate B<-fast> setting may be used for evaluation of a B<-if>
5718
5764
  condition, or when ordering files with the B<-fileOrder> option. See the
@@ -5780,7 +5826,7 @@ Adding I<NUM> to the B<-if> option causes a separate processing pass to be
5780
5826
  executed for evaluating I<EXPR> at a B<-fast> level given by I<NUM> (see the
5781
5827
  B<-fast> option documentation for details). Without I<NUM>, only one
5782
5828
  processing pass is done at the level specified by the B<-fast> option. For
5783
- example, using B<-if4> is possible if I<EXPR> uses only pseudo System tags,
5829
+ example, using B<-if5> is possible if I<EXPR> uses only pseudo System tags,
5784
5830
  and may significantly speed processing if enough files fail the condition.
5785
5831
 
5786
5832
  The expression has access to the current ExifTool object through C<$self>,
@@ -28,7 +28,7 @@ use vars qw($VERSION $RELEASE @ISA @EXPORT_OK %EXPORT_TAGS $AUTOLOAD @fileTypes
28
28
  %mimeType $swapBytes $swapWords $currentByteOrder %unpackStd
29
29
  %jpegMarker %specialTags %fileTypeLookup $testLen $exePath);
30
30
 
31
- $VERSION = '12.10';
31
+ $VERSION = '12.11';
32
32
  $RELEASE = '';
33
33
  @ISA = qw(Exporter);
34
34
  %EXPORT_TAGS = (
@@ -2505,6 +2505,7 @@ sub ExtractInfo($;@)
2505
2505
  } else {
2506
2506
  $self->Error('Unknown file type');
2507
2507
  }
2508
+ $self->BuildCompositeTags() if $fast == 4 and $$options{Composite};
2508
2509
  last; # don't read the file
2509
2510
  }
2510
2511
  if (@fileTypeList) {
@@ -5732,12 +5733,12 @@ sub ConvertFileSize($)
5732
5733
  {
5733
5734
  my $val = shift;
5734
5735
  $val < 2048 and return "$val bytes";
5735
- $val < 10240 and return sprintf('%.1f kB', $val / 1024);
5736
- $val < 2097152 and return sprintf('%.0f kB', $val / 1024);
5737
- $val < 10485760 and return sprintf('%.1f MB', $val / 1048576);
5738
- $val < 2147483648 and return sprintf('%.0f MB', $val / 1048576);
5739
- $val < 10737418240 and return sprintf('%.1f GB', $val / 1073741824);
5740
- return sprintf('%.0f GB', $val / 1073741824);
5736
+ $val < 10240 and return sprintf('%.1f KiB', $val / 1024);
5737
+ $val < 2097152 and return sprintf('%.0f KiB', $val / 1024);
5738
+ $val < 10485760 and return sprintf('%.1f MiB', $val / 1048576);
5739
+ $val < 2147483648 and return sprintf('%.0f MiB', $val / 1048576);
5740
+ $val < 10737418240 and return sprintf('%.1f GiB', $val / 1073741824);
5741
+ return sprintf('%.0f GiB', $val / 1073741824);
5741
5742
  }
5742
5743
 
5743
5744
  #------------------------------------------------------------------------------
@@ -644,10 +644,11 @@ file types. With a value of 2, ExifTool will also avoid extracting any EXIF
644
644
  MakerNote information, and will stop parsing at the IDAT chunk of PNG
645
645
  images. (By the PNG specification, metadata is allowed after IDAT, but
646
646
  ExifTool always writes it before because some utilities will ignore it
647
- otherwise.) When set to 3 or 4, only pseudo system tags and FileType are
648
- generated. For 3, the file header is read to provide an educated guess at
649
- FileType. For 4, the file is not read at all and FileType is determined
650
- based on the file's extension. Default is undef.
647
+ otherwise.) When set to 3 or higher, only pseudo system tags and FileType
648
+ are generated. For 3, the file header is read to provide an educated guess
649
+ at FileType. For 4, the file is not read at all and FileType is determined
650
+ based on the file's extension. For 5, generation of Composite tags is also
651
+ disabled (like setting L</Composite> to 0). Default is undef.
651
652
 
652
653
  =item Filter
653
654
 
@@ -88,7 +88,7 @@ sub ProcessCTMD($$$);
88
88
  sub ProcessExifInfo($$$);
89
89
  sub SwapWords($);
90
90
 
91
- $VERSION = '4.40';
91
+ $VERSION = '4.41';
92
92
 
93
93
  # Note: Removed 'USM' from 'L' lenses since it is redundant - PH
94
94
  # (or is it? Ref 32 shows 5 non-USM L-type lenses)
@@ -578,16 +578,17 @@ $VERSION = '4.40';
578
578
  61182.7 => 'Canon RF 15-35mm F2.8L IS USM',
579
579
  61182.8 => 'Canon RF 24-240mm F4-6.3 IS USM',
580
580
  61182.9 => 'Canon RF 70-200mm F2.8L IS USM',
581
- 61182.10 => 'Canon RF 600mm F11 IS STM',
582
- 61182.11 => 'Canon RF 600mm F11 IS STM + RF1.4x',
583
- 61182.12 => 'Canon RF 600mm F11 IS STM + RF2x',
584
- 61182.13 => 'Canon RF 800mm F11 IS STM',
585
- 61182.14 => 'Canon RF 800mm F11 IS STM + RF1.4x',
586
- 61182.15 => 'Canon RF 800mm F11 IS STM + RF2x',
587
- 61182.16 => 'Canon RF 24-105mm F4-7.1 IS STM',
588
- 61182.17 => 'Canon RF 100-500mm F4.5-7.1L IS USM',
589
- 61182.18 => 'Canon RF 100-500mm F4.5-7.1L IS USM + RF1.4x',
590
- 61182.19 => 'Canon RF 100-500mm F4.5-7.1L IS USM + RF2x',
581
+ 61182.10 => 'Canon RF 85mm F2 MACRO IS STM',
582
+ 61182.11 => 'Canon RF 600mm F11 IS STM',
583
+ 61182.12 => 'Canon RF 600mm F11 IS STM + RF1.4x',
584
+ 61182.13 => 'Canon RF 600mm F11 IS STM + RF2x',
585
+ 61182.14 => 'Canon RF 800mm F11 IS STM',
586
+ 61182.15 => 'Canon RF 800mm F11 IS STM + RF1.4x',
587
+ 61182.16 => 'Canon RF 800mm F11 IS STM + RF2x',
588
+ 61182.17 => 'Canon RF 24-105mm F4-7.1 IS STM',
589
+ 61182.18 => 'Canon RF 100-500mm F4.5-7.1L IS USM',
590
+ 61182.19 => 'Canon RF 100-500mm F4.5-7.1L IS USM + RF1.4x',
591
+ 61182.20 => 'Canon RF 100-500mm F4.5-7.1L IS USM + RF2x',
591
592
  65535 => 'n/a',
592
593
  );
593
594
 
@@ -6722,6 +6723,7 @@ my %ciMaxFocal = (
6722
6723
  264 => 'Canon RF 15-35mm F2.8L IS USM',
6723
6724
  265 => 'Canon RF 24-240mm F4-6.3 IS USM',
6724
6725
  266 => 'Canon RF 70-200mm F2.8L IS USM',
6726
+ 267 => 'Canon RF 85mm F2 MACRO IS STM',
6725
6727
  268 => 'Canon RF 600mm F11 IS STM',
6726
6728
  269 => 'Canon RF 600mm F11 IS STM + RF1.4x',
6727
6729
  270 => 'Canon RF 600mm F11 IS STM + RF2x',
@@ -23,14 +23,15 @@ my $charset;
23
23
 
24
24
  #------------------------------------------------------------------------------
25
25
  # Read CSV file
26
- # Inputs: 0) CSV file name, file ref or RAF ref, 1) database hash ref, 2) missing tag value
26
+ # Inputs: 0) CSV file name, file ref or RAF ref, 1) database hash ref,
27
+ # 2) missing tag value, 3) delimiter if other than ','
27
28
  # Returns: undef on success, or error string
28
29
  # Notes: There are various flavours of CSV, but here we assume that only
29
30
  # double quotes are escaped, and they are escaped by doubling them
30
- sub ReadCSV($$;$)
31
+ sub ReadCSV($$;$$)
31
32
  {
32
33
  local ($_, $/);
33
- my ($file, $database, $missingValue) = @_;
34
+ my ($file, $database, $missingValue, $delim) = @_;
34
35
  my ($buff, @tags, $found, $err, $raf, $openedFile);
35
36
 
36
37
  if (UNIVERSAL::isa($file, 'File::RandomAccess')) {
@@ -45,6 +46,7 @@ sub ReadCSV($$;$)
45
46
  $openedFile = 1;
46
47
  $raf = new File::RandomAccess(\*CSVFILE);
47
48
  }
49
+ $delim = ',' unless defined $delim;
48
50
  # set input record separator by first newline found in the file
49
51
  # (safe because first line should contain only tag names)
50
52
  while ($raf->Read($buff, 65536)) {
@@ -53,18 +55,18 @@ sub ReadCSV($$;$)
53
55
  $raf->Seek(0,0);
54
56
  while ($raf->ReadLine($buff)) {
55
57
  my (@vals, $v, $i, %fileInfo);
56
- my @toks = split ',', $buff;
58
+ my @toks = split /\Q$delim/, $buff;
57
59
  while (@toks) {
58
60
  ($v = shift @toks) =~ s/^ +//; # remove leading spaces
59
61
  if ($v =~ s/^"//) {
60
62
  # quoted value must end in an odd number of quotes
61
63
  while ($v !~ /("+)\s*$/ or not length($1) & 1) {
62
64
  if (@toks) {
63
- $v .= ',' . shift @toks;
65
+ $v .= $delim . shift @toks;
64
66
  } else {
65
67
  # read another line from the file
66
68
  $raf->ReadLine($buff) or last;
67
- @toks = split ',', $buff;
69
+ @toks = split /\Q$delim/, $buff;
68
70
  last unless @toks;
69
71
  $v .= shift @toks;
70
72
  }
@@ -330,9 +332,10 @@ Read CSV or JSON file into a database hash.
330
332
  2) Optional string used to represent an undefined (missing) tag value.
331
333
  (Used for deleting tags.)
332
334
 
333
- 3) [ReadJSON only] Optional character set for converting Unicode escape
334
- sequences in strings. Defaults to "UTF8". See the ExifTool Charset option
335
- for a list of valid settings.
335
+ 3) For ReadCSV this gives the delimiter for CSV entries, with a default of
336
+ ",". For ReadJSON this is the character set for converting Unicode escape
337
+ sequences in strings, with a default of "UTF8". See the ExifTool Charset
338
+ option for a list of valid character sets.
336
339
 
337
340
  =item Return Value:
338
341
 
@@ -28,8 +28,8 @@ sub ProcessMPImageList($$$);
28
28
  from this segment is stored as a JPEG trailer. The MPF tags are not
29
29
  writable, however the MPF segment may be deleted as a group (with "MPF:All")
30
30
  but then the JPEG trailer should also be deleted (with "Trailer:All"). See
31
- L<http://www.cipa.jp/std/documents/e/DC-007_E.pdf> for the official
32
- specification.
31
+ L<https://web.archive.org/web/20190713230858/http://www.cipa.jp/std/documents/e/DC-007_E.pdf>
32
+ for the official specification.
33
33
  },
34
34
  0xb000 => 'MPFVersion',
35
35
  0xb001 => 'NumberOfImages',
@@ -40,7 +40,7 @@ use Image::ExifTool qw(:DataAccess :Utils);
40
40
  use Image::ExifTool::Exif;
41
41
  use Image::ExifTool::APP12;
42
42
 
43
- $VERSION = '2.69';
43
+ $VERSION = '2.70';
44
44
 
45
45
  sub PrintLensInfo($$$);
46
46
 
@@ -109,6 +109,7 @@ my %olympusLensTypes = (
109
109
  '0 32 00' => 'Olympus Zuiko Digital ED 14-35mm F2.0 SWD', #PH
110
110
  '0 32 10' => 'Olympus M.Zuiko Digital ED 12-200mm F3.5-6.3', #IB
111
111
  '0 33 00' => 'Olympus Zuiko Digital 25mm F2.8', #PH
112
+ '0 33 10' => 'Olympus M.Zuiko Digital 150-400mm F4.5 TC1.25x IS Pro', #IB
112
113
  '0 34 00' => 'Olympus Zuiko Digital ED 9-18mm F4.0-5.6', #7
113
114
  '0 34 10' => 'Olympus M.Zuiko Digital ED 12-45mm F4.0 Pro', #IB
114
115
  '0 35 00' => 'Olympus Zuiko Digital 14-54mm F2.8-3.5 II', #PH
@@ -58,7 +58,7 @@ use Image::ExifTool::Exif;
58
58
  use Image::ExifTool::GPS;
59
59
  use Image::ExifTool::HP;
60
60
 
61
- $VERSION = '3.34';
61
+ $VERSION = '3.35';
62
62
 
63
63
  sub CryptShutterCount($$);
64
64
  sub PrintFilter($$$);
@@ -2894,13 +2894,20 @@ my %binaryDataAttrs = (
2894
2894
  Writable => 'string',
2895
2895
  Notes => 'left blank by some cameras',
2896
2896
  },
2897
- 0x022a => { #PH (K-5)
2897
+ 0x022a => [{ #PH (RICOH models (GR III))
2898
+ Name => 'FilterInfo',
2899
+ Condition => '$$self{Make} =~ /^RICOH/',
2900
+ SubDirectory => {
2901
+ TagTable => 'Image::ExifTool::Pentax::FilterInfo',
2902
+ ByteOrder => 'LittleEndian',
2903
+ },
2904
+ },{ #PH (K-5)
2898
2905
  Name => 'FilterInfo',
2899
2906
  SubDirectory => {
2900
2907
  TagTable => 'Image::ExifTool::Pentax::FilterInfo',
2901
2908
  ByteOrder => 'BigEndian',
2902
2909
  },
2903
- },
2910
+ }],
2904
2911
  0x022b => { #PH (K-5)
2905
2912
  Name => 'LevelInfo',
2906
2913
  SubDirectory => { TagTable => 'Image::ExifTool::Pentax::LevelInfo' },
@@ -21,8 +21,8 @@ $VERSION = '1.01';
21
21
  NOTES => q{
22
22
  These tags are part of the CIPA Stereo Still Image specification, and are
23
23
  found in the APP3 "Stim" segment of JPEG images. See
24
- L<http://www.cipa.jp/std/documents/e/DC-006_E.pdf> for the
25
- official specification.
24
+ L<https://web.archive.org/web/20190718152459/http://www.cipa.jp/std/documents/e/DC-006_E.pdf>
25
+ for the official specification.
26
26
  },
27
27
  0 => 'StimVersion',
28
28
  1 => {
@@ -15614,6 +15614,7 @@ These tags are used in Pentax/Asahi cameras.
15614
15614
  0x0228 FaceSize Pentax FaceSize
15615
15615
  0x0229 SerialNumber string
15616
15616
  0x022a FilterInfo Pentax FilterInfo
15617
+ Pentax FilterInfo
15617
15618
  0x022b LevelInfo Pentax LevelInfo
15618
15619
  0x022d WBLevels Pentax WBLevels
15619
15620
  0x022e Artist string
@@ -19939,8 +19940,8 @@ found in the APP2 "MPF" segment of JPEG images. MPImage data referenced
19939
19940
  from this segment is stored as a JPEG trailer. The MPF tags are not
19940
19941
  writable, however the MPF segment may be deleted as a group (with "MPF:All")
19941
19942
  but then the JPEG trailer should also be deleted (with "Trailer:All"). See
19942
- L<http://www.cipa.jp/std/documents/e/DC-007_E.pdf> for the official
19943
- specification.
19943
+ L<https://web.archive.org/web/20190713230858/http://www.cipa.jp/std/documents/e/DC-007_E.pdf>
19944
+ for the official specification.
19944
19945
 
19945
19946
  Tag ID Tag Name Writable
19946
19947
  ------ -------- --------
@@ -19985,8 +19986,8 @@ embedded images.
19985
19986
 
19986
19987
  These tags are part of the CIPA Stereo Still Image specification, and are
19987
19988
  found in the APP3 "Stim" segment of JPEG images. See
19988
- L<http://www.cipa.jp/std/documents/e/DC-006_E.pdf> for the
19989
- official specification.
19989
+ L<https://web.archive.org/web/20190718152459/http://www.cipa.jp/std/documents/e/DC-006_E.pdf>
19990
+ for the official specification.
19990
19991
 
19991
19992
  Tag ID Tag Name Writable
19992
19993
  ------ -------- --------
@@ -159,11 +159,12 @@ sub ConvInvISO6709($)
159
159
  my @a = split ' ', $val;
160
160
  if (@a == 2 or @a == 3) {
161
161
  # latitude must have 2 digits before the decimal, and longitude 3,
162
- # and all values must start with a "+" or "-"
163
- my @fmt = ('%s%02d','%s%03d','%s%d');
162
+ # and all values must start with a "+" or "-", and Google Photos
163
+ # requires at least 3 digits after the decimal point
164
+ my @fmt = ('%s%02d.%s%s','%s%03d.%s%s','%s%d.%s%s');
164
165
  foreach (@a) {
165
166
  return undef unless Image::ExifTool::IsFloat($_);
166
- $_ =~ s/^([-+]?)(\d+)/sprintf(shift(@fmt), $1 || '+', $2)/e;
167
+ $_ =~ s/^([-+]?)(\d+)\.?(\d*)/sprintf(shift(@fmt),$1||'+',$2,$3,length($3)<3 ? '0'x(3-length($3)) : '')/e;
167
168
  }
168
169
  return join '', @a, '/';
169
170
  }
@@ -4035,6 +4035,7 @@ sub WriteDirectory($$$;$)
4035
4035
  if ($dataPt or $$dirInfo{RAF}) {
4036
4036
  ++$$self{CHANGED};
4037
4037
  $out and print $out " Deleting $grp1\n";
4038
+ $self->Warn('ICC_Profile deleted. Image colors may be affected') if $grp1 eq 'ICC_Profile';
4038
4039
  # can no longer validate TIFF_END if deleting an entire IFD
4039
4040
  delete $$self{TIFF_END} if $dirName =~ /IFD/;
4040
4041
  }
@@ -5910,6 +5911,7 @@ sub WriteJPEG($$)
5910
5911
  # group delete of APP segments
5911
5912
  if ($$delGroup{$dirName}) {
5912
5913
  $verbose and print $out " Deleting $dirName segment\n";
5914
+ $self->Warn('ICC_Profile deleted. Image colors may be affected') if $dirName eq 'ICC_Profile';
5913
5915
  ++$$self{CHANGED};
5914
5916
  next Marker;
5915
5917
  }
@@ -1,6 +1,6 @@
1
1
  Summary: perl module for image data extraction
2
2
  Name: perl-Image-ExifTool
3
- Version: 12.10
3
+ Version: 12.11
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.10.0')
4
+ VERSION = Gem::Version.new('12.11.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.10.0
4
+ version: 12.11.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: 2020-11-13 00:00:00.000000000 Z
12
+ date: 2020-11-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: exiftool