exiftool-vendored.pl 12.85.0 → 12.91.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.
Files changed (49) hide show
  1. package/bin/Changes +87 -0
  2. package/bin/MANIFEST +1 -0
  3. package/bin/META.json +1 -1
  4. package/bin/META.yml +16 -16
  5. package/bin/README +3 -2
  6. package/bin/build_geolocation +7 -4
  7. package/bin/build_tag_lookup +29 -11
  8. package/bin/config_files/example.config +5 -0
  9. package/bin/config_files/onone.config +28 -0
  10. package/bin/exiftool +23 -15
  11. package/bin/lib/Image/ExifTool/AIFF.pm +8 -4
  12. package/bin/lib/Image/ExifTool/ASF.pm +4 -1
  13. package/bin/lib/Image/ExifTool/BuildTagLookup.pm +14 -8
  14. package/bin/lib/Image/ExifTool/Canon.pm +102 -12
  15. package/bin/lib/Image/ExifTool/CanonRaw.pm +1 -1
  16. package/bin/lib/Image/ExifTool/CanonVRD.pm +5 -2
  17. package/bin/lib/Image/ExifTool/FujiFilm.pm +46 -4
  18. package/bin/lib/Image/ExifTool/Geolocation.dat +0 -0
  19. package/bin/lib/Image/ExifTool/Geolocation.pm +6 -0
  20. package/bin/lib/Image/ExifTool/ID3.pm +39 -33
  21. package/bin/lib/Image/ExifTool/InDesign.pm +8 -4
  22. package/bin/lib/Image/ExifTool/Jpeg2000.pm +0 -1
  23. package/bin/lib/Image/ExifTool/Lang/de.pm +2 -2
  24. package/bin/lib/Image/ExifTool/Matroska.pm +66 -10
  25. package/bin/lib/Image/ExifTool/MinoltaRaw.pm +2 -2
  26. package/bin/lib/Image/ExifTool/Nikon.pm +36 -2
  27. package/bin/lib/Image/ExifTool/Olympus.pm +27 -17
  28. package/bin/lib/Image/ExifTool/PNG.pm +10 -2
  29. package/bin/lib/Image/ExifTool/Panasonic.pm +1 -0
  30. package/bin/lib/Image/ExifTool/PanasonicRaw.pm +1 -0
  31. package/bin/lib/Image/ExifTool/Pentax.pm +80 -14
  32. package/bin/lib/Image/ExifTool/QuickTime.pm +58 -13
  33. package/bin/lib/Image/ExifTool/QuickTimeStream.pl +111 -8
  34. package/bin/lib/Image/ExifTool/RIFF.pm +20 -10
  35. package/bin/lib/Image/ExifTool/Samsung.pm +56 -19
  36. package/bin/lib/Image/ExifTool/Sony.pm +21 -11
  37. package/bin/lib/Image/ExifTool/TagLookup.pm +6808 -6788
  38. package/bin/lib/Image/ExifTool/TagNames.pod +120 -55
  39. package/bin/lib/Image/ExifTool/WriteIPTC.pl +1 -1
  40. package/bin/lib/Image/ExifTool/WriteQuickTime.pl +84 -15
  41. package/bin/lib/Image/ExifTool/Writer.pl +7 -4
  42. package/bin/lib/Image/ExifTool/XMP.pm +8 -8
  43. package/bin/lib/Image/ExifTool/XMP2.pl +51 -30
  44. package/bin/lib/Image/ExifTool/ZIP.pm +8 -4
  45. package/bin/lib/Image/ExifTool.pm +65 -42
  46. package/bin/lib/Image/ExifTool.pod +28 -20
  47. package/bin/perl-Image-ExifTool.spec +1 -1
  48. package/bin/pp_build_exe.args +4 -4
  49. package/package.json +3 -3
@@ -50,7 +50,7 @@ use Image::ExifTool::Exif;
50
50
  use Image::ExifTool::GPS;
51
51
  require Exporter;
52
52
 
53
- $VERSION = '3.65';
53
+ $VERSION = '3.66';
54
54
  @ISA = qw(Exporter);
55
55
  @EXPORT_OK = qw(EscapeXML UnescapeXML);
56
56
 
@@ -203,8 +203,9 @@ my %xmpNS = (
203
203
  hdr_metadata => 'http://ns.adobe.com/hdr-metadata/1.0/',
204
204
  hdrgm => 'http://ns.adobe.com/hdr-gain-map/1.0/',
205
205
  xmpDSA => 'http://leica-camera.com/digital-shift-assistant/1.0/',
206
- # Note: Not included due to namespace prefix conflict with Device:Container
207
- # Container => 'http://ns.google.com/photos/1.0/container/',
206
+ # Note: Google uses a prefix of 'Container', but this conflicts with the
207
+ # Device Container namespace, also by Google. So call this one GContainer
208
+ GContainer=> 'http://ns.google.com/photos/1.0/container/',
208
209
  );
209
210
 
210
211
  # build reverse namespace lookup
@@ -932,11 +933,10 @@ my %sRangeMask = (
932
933
  Name => 'xmpDSA',
933
934
  SubDirectory => { TagTable => 'Image::ExifTool::Panasonic::DSA' },
934
935
  },
935
- # Note: Note included due to namespace prefix conflict with Device:Container
936
- # Container => {
937
- # Name => 'Container',
938
- # SubDirectory => { TagTable => 'Image::ExifTool::XMP::Container' },
939
- # },
936
+ GContainer => {
937
+ Name => 'GContainer',
938
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::GContainer' },
939
+ },
940
940
  );
941
941
 
942
942
  # hack to allow XML containing Dublin Core metadata to be handled like XMP (eg. EPUB - see ZIP.pm)
@@ -101,8 +101,22 @@ my %sPose = (
101
101
  my %sEarthPose = (
102
102
  STRUCT_NAME => 'EarthPose',
103
103
  NAMESPACE => { EarthPose => 'http://ns.google.com/photos/dd/1.0/earthpose/' },
104
- Latitude => { Writable => 'real', Groups => { 2 => 'Location' }, %latConv },
105
- Longitude => { Writable => 'real', Groups => { 2 => 'Location' }, %longConv },
104
+ Latitude => {
105
+ Writable => 'real',
106
+ Groups => { 2 => 'Location' },
107
+ ValueConv => 'Image::ExifTool::GPS::ToDegrees($val, 1)',
108
+ ValueConvInv => '$val',
109
+ PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1, "N")',
110
+ PrintConvInv => 'Image::ExifTool::GPS::ToDegrees($val, 1, "lat")',
111
+ },
112
+ Longitude => {
113
+ Writable => 'real',
114
+ Groups => { 2 => 'Location' },
115
+ ValueConv => 'Image::ExifTool::GPS::ToDegrees($val, 1)',
116
+ ValueConvInv => '$val',
117
+ PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1, "E")',
118
+ PrintConvInv => 'Image::ExifTool::GPS::ToDegrees($val, 1, "lon")',
119
+ },
106
120
  Altitude => {
107
121
  Writable => 'real',
108
122
  Groups => { 2 => 'Location' },
@@ -1921,6 +1935,7 @@ my %sACDSeeRegionStruct = (
1921
1935
  SpecialTypeID => { List => 'Bag' },
1922
1936
  PortraitNote => { },
1923
1937
  DisableAutoCreation => { List => 'Bag' },
1938
+ DisableSuggestedAction => { List => 'Bag' }, #forum16147
1924
1939
  hdrp_makernote => {
1925
1940
  Name => 'HDRPMakerNote',
1926
1941
  # decoded data starts with the following bytes, but nothing yet is known about its contents:
@@ -2109,35 +2124,41 @@ my %sACDSeeRegionStruct = (
2109
2124
  );
2110
2125
 
2111
2126
  # Google container tags (ref https://developer.android.com/guide/topics/media/platform/hdr-image-format)
2112
- # NOTE: Not included because these namespace prefixes conflict with Google's depth-map Device tags!
2127
+ # NOTE: The namespace prefix used by ExifTool is 'GContainer' instead of 'Container'
2128
+ # dueo to a conflict with Google's depth-map Device 'Container' namespace!
2113
2129
  # (see ../pics/GooglePixel8Pro.jpg sample image)
2114
- # %Image::ExifTool::XMP::Container = (
2115
- # %xmpTableDefaults,
2116
- # GROUPS => { 1 => 'XMP-Container', 2 => 'Image' },
2117
- # NAMESPACE => 'Container',
2118
- # NOTES => 'Google Container namespace.',
2119
- # Directory => {
2120
- # Name => 'ContainerDirectory',
2121
- # FlatName => 'Directory',
2122
- # List => 'Seq',
2123
- # Struct => {
2124
- # STRUCT_NAME => 'Directory',
2125
- # Item => {
2126
- # Namespace => 'Container',
2127
- # Struct => {
2128
- # STRUCT_NAME => 'Item',
2129
- # NAMESPACE => { Item => 'http://ns.google.com/photos/1.0/container/item/'},
2130
- # Mime => { },
2131
- # Semantic => { },
2132
- # Length => { Writable => 'integer' },
2133
- # Label => { },
2134
- # Padding => { Writable => 'integer' },
2135
- # URI => { },
2136
- # },
2137
- # },
2138
- # },
2139
- # },
2140
- # );
2130
+ %Image::ExifTool::XMP::GContainer = (
2131
+ %xmpTableDefaults,
2132
+ GROUPS => { 1 => 'XMP-GContainer', 2 => 'Image' },
2133
+ NAMESPACE => 'GContainer',
2134
+ NOTES => q{
2135
+ Google Container namespace. ExifTool uses the prefix 'GContainer' instead
2136
+ of 'Container' to avoid a conflict with the Google Device Container
2137
+ namespace.
2138
+ },
2139
+ Directory => {
2140
+ Name => 'ContainerDirectory',
2141
+ FlatName => 'Directory',
2142
+ List => 'Seq',
2143
+ Struct => {
2144
+ STRUCT_NAME => 'Directory',
2145
+ Item => {
2146
+ Namespace => 'GContainer',
2147
+ Struct => {
2148
+ STRUCT_NAME => 'Item',
2149
+ # (use 'GItem' to avoid conflict with Google Device Container Item)
2150
+ NAMESPACE => { GItem => 'http://ns.google.com/photos/1.0/container/item/'},
2151
+ Mime => { },
2152
+ Semantic => { },
2153
+ Length => { Writable => 'integer' },
2154
+ Label => { },
2155
+ Padding => { Writable => 'integer' },
2156
+ URI => { },
2157
+ },
2158
+ },
2159
+ },
2160
+ },
2161
+ );
2141
2162
 
2142
2163
  # Getty Images namespace (ref PH)
2143
2164
  %Image::ExifTool::XMP::GettyImages = (
@@ -20,7 +20,7 @@ use strict;
20
20
  use vars qw($VERSION $warnString);
21
21
  use Image::ExifTool qw(:DataAccess :Utils);
22
22
 
23
- $VERSION = '1.31';
23
+ $VERSION = '1.32';
24
24
 
25
25
  sub WarnProc($) { $warnString = $_[0]; }
26
26
 
@@ -325,9 +325,13 @@ sub ProcessRAR($$)
325
325
  last if $size < 0;
326
326
  next unless $size; # ignore blocks with no data
327
327
  # don't try to read very large blocks unless LargeFileSupport is enabled
328
- if ($size >= 0x80000000 and not $et->Options('LargeFileSupport')) {
329
- $et->Warn('Large block encountered. Aborting.');
330
- last;
328
+ if ($size >= 0x80000000) {
329
+ if (not $et->Options('LargeFileSupport')) {
330
+ $et->Warn('Large block encountered. Aborting.');
331
+ last;
332
+ } elsif ($et->Options('LargeFileSupport') eq '2') {
333
+ $et->WarnOnce('Processing large block (LargeFileSupport is 2)');
334
+ }
331
335
  }
332
336
  # process the block
333
337
  if ($type == 0x74) { # file block
@@ -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.85';
32
+ $VERSION = '12.91';
33
33
  $RELEASE = '';
34
34
  @ISA = qw(Exporter);
35
35
  %EXPORT_TAGS = (
@@ -145,17 +145,18 @@ sub ReadValue($$$;$$$);
145
145
  SigmaRaw JPEG GIMP Jpeg2000 GIF BMP BMP::OS2 BMP::Extra BPG BPG::Extensions
146
146
  WPG ICO PICT PNG MNG FLIF DjVu DPX OpenEXR ZISRAW MRC LIF MRC::FEI12 MIFF
147
147
  PCX PGF PSP PhotoCD Radiance Other::PFM PDF PostScript Photoshop::Header
148
- Photoshop::Layers Photoshop::ImageData FujiFilm::RAF FujiFilm::IFD
149
- FujiFilm::MRAW Samsung::Trailer Sony::SRF2 Sony::SR2SubIFD Sony::PMP ITC ID3
150
- ID3::Lyrics3 FLAC AAC Ogg Vorbis APE APE::NewHeader APE::OldHeader Audible
151
- MPC MPEG::Audio MPEG::Video MPEG::Xing M2TS QuickTime QuickTime::ImageFile
152
- QuickTime::Stream QuickTime::Tags360Fly Matroska Matroska::StdTag MOI MXF DV
153
- Flash Flash::FLV Real::Media Real::Audio Real::Metafile Red RIFF AIFF ASF
154
- WTV DICOM FITS XISF MIE JSON HTML XMP::SVG Palm Palm::MOBI Palm::EXTH
155
- Torrent EXE EXE::PEVersion EXE::PEString EXE::MachO EXE::PEF EXE::ELF
156
- EXE::AR EXE::CHM LNK Font VCard Text VCard::VCalendar VCard::VNote RSRC
157
- Rawzor ZIP ZIP::GZIP ZIP::RAR ZIP::RAR5 RTF OOXML iWork ISO FLIR::AFF
158
- FLIR::FPF MacOS MacOS::MDItem FlashPix::DocTable
148
+ Photoshop::Layers Photoshop::ImageData FujiFilm::RAFHeader FujiFilm::RAF
149
+ FujiFilm::IFD FujiFilm::MRAW Samsung::Trailer Sony::SRF2 Sony::SR2SubIFD
150
+ Sony::PMP ITC ID3 ID3::Lyrics3 FLAC AAC Ogg Vorbis APE APE::NewHeader
151
+ APE::OldHeader Audible MPC MPEG::Audio MPEG::Video MPEG::Xing M2TS QuickTime
152
+ QuickTime::ImageFile QuickTime::Stream QuickTime::Tags360Fly Matroska
153
+ Matroska::StdTag MOI MXF DV Flash Flash::FLV Real::Media Real::Audio
154
+ Real::Metafile Red RIFF AIFF ASF WTV DICOM FITS XISF MIE JSON HTML XMP::SVG
155
+ Palm Palm::MOBI Palm::EXTH Torrent EXE EXE::PEVersion EXE::PEString
156
+ EXE::MachO EXE::PEF EXE::ELF EXE::AR EXE::CHM LNK Font VCard Text
157
+ VCard::VCalendar VCard::VNote RSRC Rawzor ZIP ZIP::GZIP ZIP::RAR ZIP::RAR5
158
+ RTF OOXML iWork ISO FLIR::AFF FLIR::FPF MacOS MacOS::MDItem
159
+ FlashPix::DocTable
159
160
  );
160
161
 
161
162
  # alphabetical list of current Lang modules
@@ -426,7 +427,7 @@ my %createTypes = map { $_ => 1 } qw(XMP ICC MIE VRD DR4 EXIF EXV);
426
427
  # NDPI => ['TIFF', 'Hamamatsu NanoZoomer Digital Pathology Image'],
427
428
  NEF => ['TIFF', 'Nikon (RAW) Electronic Format'],
428
429
  NEWER => 'COS',
429
- NKA => ['NKA', 'Nikon NX Studio Settings'],
430
+ NKA => ['NKA', 'Nikon NX Studio Adjustments'],
430
431
  NKSC => ['XMP', 'Nikon Sidecar'],
431
432
  NMBTEMPLATE => ['ZIP','Apple Numbers Template'],
432
433
  NRW => ['TIFF', 'Nikon RAW (2)'],
@@ -1127,7 +1128,7 @@ my @availableOptions = (
1127
1128
  [ 'IgnoreTags', undef, 'list of tags to ignore when extracting' ],
1128
1129
  [ 'ImageHashType', 'MD5', 'image hash algorithm' ],
1129
1130
  [ 'Lang', $defaultLang, 'localized language for descriptions etc' ],
1130
- [ 'LargeFileSupport', undef, 'flag indicating support of 64-bit file offsets' ],
1131
+ [ 'LargeFileSupport', 1, 'flag indicating support of 64-bit file offsets' ],
1131
1132
  [ 'LimitLongValues', 60, 'length limit for long values' ],
1132
1133
  [ 'List', undef, '[deprecated, use ListSplit and ListJoin instead]' ],
1133
1134
  [ 'ListItem', undef, 'used to return a specific item from lists' ],
@@ -1815,6 +1816,7 @@ my %systemTagsNotes = (
1815
1816
  PrintConv => 'sprintf("%.3g s", $val)',
1816
1817
  },
1817
1818
  RAFVersion => { Notes => 'RAF file version number' },
1819
+ RAFCompression => { PrintConv => { 0 => 'Uncompressed', 2 => 'Compressed' } }, # 1 maybe lossy?
1818
1820
  JPEGDigest => {
1819
1821
  Notes => q{
1820
1822
  an MD5 digest of the JPEG quantization tables is combined with the component
@@ -2039,6 +2041,8 @@ my %systemTagsNotes = (
2039
2041
  my $lat = 1;
2040
2042
  foreach (@args) {
2041
2043
  next unless /^[-+]?\d/;
2044
+ my @reals = /\.\d+/g;
2045
+ next if @reals > 1; # (allow floating "lat lon" format)
2042
2046
  require Image::ExifTool::GPS;
2043
2047
  $_ = Image::ExifTool::GPS::ToDegrees($_, 1, $lat ? 'lat' : 'lon');
2044
2048
  $lat ^= 1;
@@ -2805,6 +2809,7 @@ sub ExtractInfo($;@)
2805
2809
  # (note that Windows directories will still show the
2806
2810
  # daylight savings time bug -- should fix this sometime)
2807
2811
  @stat = stat $$raf{FILE_PT};
2812
+ $stat[7] = undef if -p $$raf{FILE_PT}; # (pipe buffer size isn't useful)
2808
2813
  }
2809
2814
  my $fileSize = $stat[7];
2810
2815
  $self->FoundTag('FileSize', $stat[7]) if defined $stat[7];
@@ -4153,7 +4158,8 @@ sub GetFileType(;$$)
4153
4158
  #------------------------------------------------------------------------------
4154
4159
  # Return true if we can write the specified file type
4155
4160
  # Inputs: 0) file name or ext
4156
- # Returns: true if writable, 0 if not writable, undef if unrecognized
4161
+ # Returns: true if writable, 0 if not writable, '' if not writable due to extension,
4162
+ # undef if unrecognized
4157
4163
  sub CanWrite($)
4158
4164
  {
4159
4165
  local $_;
@@ -4162,7 +4168,7 @@ sub CanWrite($)
4162
4168
  if ($noWriteFile{$type}) {
4163
4169
  # can't write TIFF files with certain extensions (various RAW formats)
4164
4170
  my $ext = GetFileExtension($file) || uc($file);
4165
- return grep(/^$ext$/, @{$noWriteFile{$type}}) ? 0 : 1 if $ext;
4171
+ return grep(/^$ext$/, @{$noWriteFile{$type}}) ? '' : 1 if $ext;
4166
4172
  }
4167
4173
  if ($onlyWriteFile{$type}) {
4168
4174
  my $ext = GetFileExtension($file) || uc($file);
@@ -6859,11 +6865,12 @@ sub DirStart($$;$)
6859
6865
  #------------------------------------------------------------------------------
6860
6866
  # Extract metadata from a jpg image
6861
6867
  # Inputs: 0) ExifTool object reference, 1) dirInfo ref with RAF set
6868
+ # 2) tag table ref to process JPEG-like metadata
6862
6869
  # Returns: 1 on success, 0 if this wasn't a valid JPEG file
6863
- sub ProcessJPEG($$)
6870
+ sub ProcessJPEG($$;$)
6864
6871
  {
6865
6872
  local $_;
6866
- my ($self, $dirInfo) = @_;
6873
+ my ($self, $dirInfo, $optionalTagTable) = @_;
6867
6874
  my $options = $$self{OPTIONS};
6868
6875
  my $verbose = $$options{Verbose};
6869
6876
  my $out = $$options{TextOut};
@@ -6871,20 +6878,29 @@ sub ProcessJPEG($$)
6871
6878
  my $raf = $$dirInfo{RAF};
6872
6879
  my $req = $$self{REQ_TAG_LOOKUP};
6873
6880
  my $htmlDump = $$self{HTML_DUMP};
6874
- my %dumpParms = ( Out => $out );
6875
- my ($ch, $s, $length, $hash, $hashsize);
6881
+ my %dumpParms = ( Out => $out, Prefix => $$self{INDENT} );
6882
+ my ($ch, $s, $length, $hash, $hashsize, $indent);
6876
6883
  my ($success, $wantTrailer, $trailInfo, $foundSOS, $gotSize, %jumbfChunk);
6877
6884
  my (@iccChunk, $iccChunkCount, $iccChunksTotal, @flirChunk, $flirCount, $flirTotal);
6878
6885
  my ($preview, $scalado, @dqt, $subSampling, $dumpEnd, %extendedXMP);
6879
6886
 
6887
+ ($indent = $$self{INDENT}) =~ s/ $//;
6888
+ unless ($raf) {
6889
+ $raf = File::RandomAccess->new($$dirInfo{DataPt});
6890
+ $self->VerboseDir('JPEG', undef, length(${$$dirInfo{DataPt}}));
6891
+ }
6880
6892
  # get pointer to hash object if it exists and we are the top-level JPEG or JP2
6881
6893
  if ($$self{FILE_TYPE} =~ /^(JPEG|JP2)$/ and not $$self{DOC_NUM}) {
6882
6894
  $hash = $$self{ImageDataHash};
6883
6895
  $hashsize = 0;
6884
6896
  }
6885
-
6886
6897
  # check to be sure this is a valid JPG (or J2C, or EXV) file
6887
- return 0 unless $raf->Read($s, 2) == 2 and $s =~ /^\xff[\xd8\x4f\x01]/;
6898
+ if ($raf->Read($s, 2) == 2 and $s =~ /^\xff[\xd8\x4f\x01]/) {
6899
+ undef $optionalTagTable;
6900
+ } else {
6901
+ return 0 unless $optionalTagTable and $s =~ /^\xff[\xe0-\xef]/;
6902
+ $raf->Seek(-2, 1) or $self->Error('Seek error'), return 1;
6903
+ }
6888
6904
  if ($s eq "\xff\x01") {
6889
6905
  return 0 unless $raf->Read($s, 5) == 5 and $s eq 'Exiv2';
6890
6906
  $$self{FILE_TYPE} = 'EXV';
@@ -6902,7 +6918,7 @@ sub ProcessJPEG($$)
6902
6918
  $$raf{NoBuffer} = 1 if $self->Options('FastScan'); # disable buffering in FastScan mode
6903
6919
 
6904
6920
  $dumpParms{MaxLen} = 128 if $verbose < 4;
6905
- if ($htmlDump) {
6921
+ if ($htmlDump and not $optionalTagTable) {
6906
6922
  $dumpEnd = $raf->Tell();
6907
6923
  my ($n, $t, $m) = $s eq 'Exiv2' ? (7,'EXV','TEM') : (2,'JPEG','SOI');
6908
6924
  my $pos = $dumpEnd - $n;
@@ -6921,6 +6937,7 @@ sub ProcessJPEG($$)
6921
6937
  Marker: for (;;) {
6922
6938
  # set marker and data pointer for current segment
6923
6939
  my $marker = $nextMarker;
6940
+ last if $marker and $marker < 0;
6924
6941
  my $segDataPt = $nextSegDataPt;
6925
6942
  my $segPos = $nextSegPos;
6926
6943
  my $skipped;
@@ -6929,12 +6946,17 @@ sub ProcessJPEG($$)
6929
6946
  #
6930
6947
  # read ahead to the next segment unless we have reached EOI, SOS or SOD
6931
6948
  #
6932
- unless ($marker and ($marker==0xd9 or ($marker==0xda and not $wantTrailer and not $hash) or
6949
+ until ($marker and ($marker==0xd9 or ($marker==0xda and not $wantTrailer and not $hash) or
6933
6950
  $marker==0x93))
6934
6951
  {
6935
6952
  # read up to next marker (JPEG markers begin with 0xff)
6936
6953
  my $buff;
6937
- $raf->ReadLine($buff) or last;
6954
+ unless ($raf->ReadLine($buff)) {
6955
+ last Marker unless $optionalTagTable;
6956
+ $nextMarker = -1;
6957
+ $success = 1;
6958
+ last;
6959
+ }
6938
6960
  $skipped = length($buff) - 1;
6939
6961
  # JPEG markers can be padded with unlimited 0xff's
6940
6962
  for (;;) {
@@ -6946,21 +6968,21 @@ sub ProcessJPEG($$)
6946
6968
  # read segment data if it exists
6947
6969
  if (not defined $markerLenBytes{$nextMarker}) {
6948
6970
  # read record length word
6949
- last unless $raf->Read($s, 2) == 2;
6971
+ last Marker unless $raf->Read($s, 2) == 2;
6950
6972
  my $len = unpack('n',$s); # get data length
6951
- last unless defined($len) and $len >= 2;
6973
+ last Marker unless defined($len) and $len >= 2;
6952
6974
  $nextSegPos = $raf->Tell();
6953
6975
  $len -= 2; # subtract size of length word
6954
- last unless $raf->Read($buff, $len) == $len;
6976
+ last Marker unless $raf->Read($buff, $len) == $len;
6955
6977
  $nextSegDataPt = \$buff; # set pointer to our next data
6956
6978
  } elsif ($markerLenBytes{$nextMarker} == 4) {
6957
6979
  # handle J2C extensions with 4-byte length word
6958
- last unless $raf->Read($s, 4) == 4;
6980
+ last Marker unless $raf->Read($s, 4) == 4;
6959
6981
  my $len = unpack('N',$s); # get data length
6960
- last unless defined($len) and $len >= 4;
6982
+ last Marker unless defined($len) and $len >= 4;
6961
6983
  $nextSegPos = $raf->Tell();
6962
6984
  $len -= 4; # subtract size of length word
6963
- last unless $raf->Seek($len, 1);
6985
+ last Marker unless $raf->Seek($len, 1);
6964
6986
  } elsif ($hash and defined $marker and ($marker == 0x00 or $marker == 0xda or
6965
6987
  ($marker >= 0xd0 and $marker <= 0xd7)))
6966
6988
  {
@@ -6976,7 +6998,8 @@ sub ProcessJPEG($$)
6976
6998
  $hashsize += $skipped + 2;
6977
6999
  }
6978
7000
  # read second segment too if this was the first
6979
- next unless defined $marker;
7001
+ next Marker unless defined $marker;
7002
+ last;
6980
7003
  }
6981
7004
  # set some useful variables for the current segment
6982
7005
  my $markerName = JpegMarkerName($marker);
@@ -6996,7 +7019,7 @@ sub ProcessJPEG($$)
6996
7019
  if (($marker & 0xf0) == 0xc0 and ($marker == 0xc0 or $marker & 0x03)) {
6997
7020
  $length = length $$segDataPt;
6998
7021
  if ($verbose) {
6999
- print $out "JPEG $markerName ($length bytes):\n";
7022
+ print $out "${indent}JPEG $markerName ($length bytes):\n";
7000
7023
  HexDump($segDataPt, undef, %dumpParms, Addr=>$segPos) if $verbose>2;
7001
7024
  } elsif ($htmlDump) {
7002
7025
  $self->HDump($segPos-4, $length+4, "[JPEG $markerName]", undef, 0x08);
@@ -7039,7 +7062,7 @@ sub ProcessJPEG($$)
7039
7062
  next;
7040
7063
  } elsif ($marker == 0xd9) { # EOI
7041
7064
  pop @$path;
7042
- $verbose and print $out "JPEG EOI\n";
7065
+ $verbose and print $out "${indent}JPEG EOI\n";
7043
7066
  my $pos = $raf->Tell();
7044
7067
  $$self{TrailerStart} = $pos unless $$self{DOC_NUM};
7045
7068
  if ($htmlDump and $dumpEnd) {
@@ -7100,7 +7123,7 @@ sub ProcessJPEG($$)
7100
7123
  # adjust PreviewImageStart to this location
7101
7124
  my $actual = $pos + pos($buff) - 4;
7102
7125
  if ($start and $start ne $actual and $verbose > 1) {
7103
- print $out "(Fixed PreviewImage location: $start -> $actual)\n";
7126
+ print $out "${indent}(Fixed PreviewImage location: $start -> $actual)\n";
7104
7127
  }
7105
7128
  # update preview image offsets
7106
7129
  if ($start) {
@@ -7154,7 +7177,7 @@ sub ProcessJPEG($$)
7154
7177
  pop @$path;
7155
7178
  $foundSOS = 1;
7156
7179
  # all done with meta information unless we have a trailer
7157
- $verbose and print $out "JPEG SOS\n";
7180
+ $verbose and print $out "${indent}JPEG SOS\n";
7158
7181
  unless ($fast) {
7159
7182
  $trailInfo = IdentifyTrailer($raf);
7160
7183
  # process trailer now unless we are doing verbose dump
@@ -7194,7 +7217,7 @@ sub ProcessJPEG($$)
7194
7217
  last; # all done parsing file
7195
7218
  } elsif ($marker == 0x93) {
7196
7219
  pop @$path;
7197
- $verbose and print $out "JPEG SOD\n";
7220
+ $verbose and print $out "${indent}JPEG SOD\n";
7198
7221
  $success = 1;
7199
7222
  if ($hash and $$self{FILE_TYPE} eq 'JP2') {
7200
7223
  my $pos = $raf->Tell();
@@ -7205,7 +7228,7 @@ sub ProcessJPEG($$)
7205
7228
  last; # all done parsing file
7206
7229
  } elsif (defined $markerLenBytes{$marker}) {
7207
7230
  # handle other stand-alone markers and segments we skipped over
7208
- $verbose and $marker and print $out "JPEG $markerName\n";
7231
+ $verbose and $marker and print $out "${indent}JPEG $markerName\n";
7209
7232
  next;
7210
7233
  } elsif ($marker == 0xdb and length($$segDataPt) and # DQT
7211
7234
  # save the DQT data only if JPEGDigest has been requested
@@ -7225,7 +7248,7 @@ sub ProcessJPEG($$)
7225
7248
  $length = length $$segDataPt;
7226
7249
  $appBytes += $length + 4 if ($marker & 0xf0) == 0xe0; # total size of APP segments
7227
7250
  if ($verbose) {
7228
- print $out "JPEG $markerName ($length bytes):\n";
7251
+ print $out "${indent}JPEG $markerName ($length bytes):\n";
7229
7252
  if ($verbose > 2) {
7230
7253
  my %extraParms = ( Addr => $segPos );
7231
7254
  $extraParms{MaxLen} = 128 if $verbose == 4;
@@ -7383,7 +7406,7 @@ sub ProcessJPEG($$)
7383
7406
  # some software erroneously writes zeros for the chunk counts)
7384
7407
  my $chunkNum = Get8u($segDataPt, 6);
7385
7408
  my $chunksTot = Get8u($segDataPt, 7) + 1; # (note the "+ 1"!)
7386
- $verbose and printf $out "$$self{INDENT}FLIR chunk %d of %d\n",
7409
+ $verbose and printf $out "${indent}FLIR chunk %d of %d\n",
7387
7410
  $chunkNum + 1, $chunksTot;
7388
7411
  if (defined $flirTotal) {
7389
7412
  # abort parsing FLIR if the total chunk count is inconsistent
@@ -7448,7 +7471,7 @@ sub ProcessJPEG($$)
7448
7471
  # some software erroneously writes zeros for the chunk counts)
7449
7472
  my $chunkNum = Get8u($segDataPt, 12);
7450
7473
  my $chunksTot = Get8u($segDataPt, 13);
7451
- $verbose and print $out "$$self{INDENT}ICC_Profile chunk $chunkNum of $chunksTot\n";
7474
+ $verbose and print $out "${indent}ICC_Profile chunk $chunkNum of $chunksTot\n";
7452
7475
  if (defined $iccChunksTotal) {
7453
7476
  # abort parsing ICC_Profile if the total chunk count is inconsistent
7454
7477
  undef $iccChunkCount if $chunksTot != $iccChunksTotal;
@@ -8001,7 +8024,7 @@ sub ProcessJPEG($$)
8001
8024
  }
8002
8025
  }
8003
8026
  # print verbose hash message if necessary
8004
- print $out "$$self{INDENT}(ImageDataHash: $hashsize bytes of JPEG image data)\n" if $hashsize and $verbose;
8027
+ print $out "${indent}(ImageDataHash: $hashsize bytes of JPEG image data)\n" if $hashsize and $verbose;
8005
8028
  # calculate JPEGDigest if requested
8006
8029
  if (@dqt) {
8007
8030
  require Image::ExifTool::JPEGDigest;
@@ -583,7 +583,7 @@ Flag to generate Composite tags when extracting information. Default is 1.
583
583
 
584
584
  Flag to write new values in compressed format if possible. Has no effect
585
585
  unless the relevant compression library is available. Valid when writing
586
- metadata to PNG, JXL or MIE images. Setting this to zero causes JXL
586
+ metadata to PNG, JXL, HEIC or MIE images. Setting this to zero causes JXL
587
587
  metadata to be rewritten as uncompressed when edited. Default is undef.
588
588
 
589
589
  =item CoordFormat
@@ -731,9 +731,12 @@ to a string of the form "Lat,Lon" (eg. "44.56,-72.33") or city with optional
731
731
  state/province, country and/or country code (eg. "Paris,France") to act as a
732
732
  default for files not containing GPS or geolocation information, or include
733
733
  tag names with leading dollar signs separated by commas to specify the tags
734
- to use for the geolocation input. May also include regular expressions for
735
- more flexible matching. See L<https://exiftool.org/geolocation.html> for
736
- more details. Default is undef.
734
+ to use for the geolocation input. When "Lat,Lon" is specified, "num=##" may
735
+ be added to return the specified number of nearby cities (the L</Duplicates>
736
+ option must also be used for the duplicate tags to be returned). May
737
+ include regular expressions for more flexible matching of city names. See
738
+ L<https://exiftool.org/geolocation.html> for more details. Default is
739
+ undef.
737
740
 
738
741
  =item GeolocAltNames
739
742
 
@@ -873,8 +876,10 @@ set to undef to select the built-in default language. Default is 'en'.
873
876
 
874
877
  =item LargeFileSupport
875
878
 
876
- Flag to indicate that 64-bit file offsets are supported on this system.
877
- Default is undef.
879
+ Flag to indicate that 64-bit file offsets are supported on this system. If
880
+ not set, processing is aborted if a chunk larger than 2 GB is encountered.
881
+ Set to 1 to process large chunks, or 2 to process with a warning. Default
882
+ is 2.
878
883
 
879
884
  =item LimitLongValues
880
885
 
@@ -1100,6 +1105,10 @@ Format for serialized structures when reading/writing.
1100
1105
  JSON - JSON format
1101
1106
  JSONQ - JSON with quoted numerical values
1102
1107
 
1108
+ Note that the JSONQ setting causes all values in the exiftool application
1109
+ -json output to be quoted, regardless of whether or not they are in a
1110
+ structure.
1111
+
1103
1112
  =item SystemTags
1104
1113
 
1105
1114
  Flag to extract the following additional File System tags: FileAttributes,
@@ -2540,20 +2549,19 @@ RIFF, RMETA, RSRC, RTF, Radiance, Rawzor, Real, Real-CONT, Real-MDPR,
2540
2549
  Real-PROP, Real-RA3, Real-RA4, Real-RA5, Real-RJMD, Reconyx, Red, Ricoh,
2541
2550
  SPIFF, SR2, SR2DataIFD, SR2SubIFD, SRF#, SVG, Samsung, Sanyo, Scalado,
2542
2551
  Sigma, SigmaRaw, Sony, SonyIDC, Stim, SubIFD, System, Theora, Torrent,
2543
- Track#, UserData, UserDefined, VCalendar, VCard, VNote, Version0, Vorbis,
2544
- WTV, XML, XMP, XMP-DICOM, XMP-Device, XMP-GAudio, XMP-GCamera,
2545
- XMP-GCreations, XMP-GDepth, XMP-GFocus, XMP-GImage, XMP-GPano,
2546
- XMP-GSpherical, XMP-LImage, XMP-MP, XMP-MP1, XMP-PixelLive, XMP-aas,
2547
- XMP-acdsee, XMP-album, XMP-apple-fi, XMP-ast, XMP-aux, XMP-cc, XMP-cell,
2548
- XMP-crd, XMP-creatorAtom, XMP-crs, XMP-dc, XMP-dex, XMP-digiKam,
2549
- XMP-drone-dji, XMP-dwc, XMP-et, XMP-exif, XMP-exifEX, XMP-expressionmedia,
2550
- XMP-extensis, XMP-fpv, XMP-getty, XMP-hdr, XMP-hdrgm, XMP-ics, XMP-iptcCore,
2551
- XMP-iptcExt, XMP-lr, XMP-mediapro, XMP-microsoft, XMP-mwg-coll, XMP-mwg-kw,
2552
- XMP-mwg-rs, XMP-nine, XMP-panorama, XMP-pdf, XMP-pdfx, XMP-photomech,
2553
- XMP-photoshop, XMP-plus, XMP-pmi, XMP-prism, XMP-prl, XMP-prm, XMP-pur,
2554
- XMP-rdf, XMP-sdc, XMP-swf, XMP-tiff, XMP-x, XMP-xmp, XMP-xmpBJ, XMP-xmpDM,
2555
- XMP-xmpDSA, XMP-xmpMM, XMP-xmpNote, XMP-xmpPLUS, XMP-xmpRights, XMP-xmpTPg,
2556
- ZIP, iTunes
2552
+ Track#, UserData, VCalendar, VCard, VNote, Version0, Vorbis, WTV, XML, XMP,
2553
+ XMP-DICOM, XMP-Device, XMP-GAudio, XMP-GCamera, XMP-GCreations, XMP-GDepth,
2554
+ XMP-GFocus, XMP-GImage, XMP-GPano, XMP-GSpherical, XMP-LImage, XMP-MP,
2555
+ XMP-MP1, XMP-PixelLive, XMP-aas, XMP-acdsee, XMP-album, XMP-apple-fi,
2556
+ XMP-ast, XMP-aux, XMP-cc, XMP-cell, XMP-crd, XMP-creatorAtom, XMP-crs,
2557
+ XMP-dc, XMP-dex, XMP-digiKam, XMP-drone-dji, XMP-dwc, XMP-et, XMP-exif,
2558
+ XMP-exifEX, XMP-expressionmedia, XMP-extensis, XMP-fpv, XMP-getty, XMP-hdr,
2559
+ XMP-hdrgm, XMP-ics, XMP-iptcCore, XMP-iptcExt, XMP-lr, XMP-mediapro,
2560
+ XMP-microsoft, XMP-mwg-coll, XMP-mwg-kw, XMP-mwg-rs, XMP-nine, XMP-panorama,
2561
+ XMP-pdf, XMP-pdfx, XMP-photomech, XMP-photoshop, XMP-plus, XMP-pmi,
2562
+ XMP-prism, XMP-prl, XMP-prm, XMP-pur, XMP-rdf, XMP-sdc, XMP-swf, XMP-tiff,
2563
+ XMP-x, XMP-xmp, XMP-xmpBJ, XMP-xmpDM, XMP-xmpDSA, XMP-xmpMM, XMP-xmpNote,
2564
+ XMP-xmpPLUS, XMP-xmpRights, XMP-xmpTPg, ZIP, iTunes
2557
2565
 
2558
2566
  =item Family 2 (Category):
2559
2567
 
@@ -1,6 +1,6 @@
1
1
  Summary: perl module for image data extraction
2
2
  Name: perl-Image-ExifTool
3
- Version: 12.85
3
+ Version: 12.91
4
4
  Release: 1
5
5
  License: Artistic/GPL
6
6
  Group: Development/Libraries/Perl
@@ -21,10 +21,10 @@
21
21
  # 10) Copy zip archive to web servers.
22
22
  # 11) Update zip file version in link and text of html/index.html.
23
23
  #------------------------------------------------------------------------------
24
- -T exiftool-12.85
25
- #--info=FileVersion=12.8.5.0
26
- #--info=ProductVersion=12.8.5.0
27
- ##"--info=Build Date=2024:05:21 08:00:55-04:00"
24
+ -T exiftool-12.87
25
+ #--info=FileVersion=12.8.7.0
26
+ #--info=ProductVersion=12.8.7.0
27
+ ##"--info=Build Date=2024:06:13 09:46:51-04:00"
28
28
  ##"--info=Bundled Perl Version=ActivePerl 5.24.0"
29
29
  ##"--info=LegalCopyright=Copyright (c) 2003-2024, Phil Harvey"
30
30
  ##"--info=ProductName=ExifTool"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exiftool-vendored.pl",
3
- "version": "12.85.0",
3
+ "version": "12.91.0",
4
4
  "description": "Vendored perl ExifTool for Node.js",
5
5
  "main": "./index.js",
6
6
  "homepage": "https://github.com/mceachen/exiftool-vendored.pl#readme",
@@ -41,8 +41,8 @@
41
41
  }
42
42
  },
43
43
  "devDependencies": {
44
- "mocha": "^10.4.0",
44
+ "mocha": "^10.7.0",
45
45
  "npm-check-updates": "^16.14.20",
46
- "prettier": "^3.2.5"
46
+ "prettier": "^3.3.3"
47
47
  }
48
48
  }