exiftool_vendored 10.65.0 → 11.41.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.

Files changed (205) hide show
  1. checksums.yaml +4 -4
  2. data/bin/Changes +818 -19
  3. data/bin/MANIFEST +38 -0
  4. data/bin/META.json +1 -1
  5. data/bin/META.yml +1 -1
  6. data/bin/README +48 -44
  7. data/bin/arg_files/exif2xmp.args +4 -1
  8. data/bin/arg_files/gps2xmp.args +4 -1
  9. data/bin/arg_files/iptcCore.args +8 -0
  10. data/bin/arg_files/xmp2exif.args +4 -1
  11. data/bin/arg_files/xmp2gps.args +4 -1
  12. data/bin/config_files/dji.config +131 -0
  13. data/bin/config_files/example.config +6 -2
  14. data/bin/config_files/gps2utm.config +256 -256
  15. data/bin/config_files/nksc.config +146 -0
  16. data/bin/config_files/picasa_faces.config +382 -382
  17. data/bin/exiftool +688 -408
  18. data/bin/fmt_files/gpx.fmt +10 -6
  19. data/bin/fmt_files/gpx_wpt.fmt +10 -6
  20. data/bin/fmt_files/kml.fmt +8 -5
  21. data/bin/lib/File/RandomAccess.pm +48 -8
  22. data/bin/lib/File/RandomAccess.pod +21 -2
  23. data/bin/lib/Image/ExifTool.pm +645 -256
  24. data/bin/lib/Image/ExifTool.pod +219 -164
  25. data/bin/lib/Image/ExifTool/AES.pm +1 -1
  26. data/bin/lib/Image/ExifTool/AFCP.pm +3 -8
  27. data/bin/lib/Image/ExifTool/AIFF.pm +12 -4
  28. data/bin/lib/Image/ExifTool/APE.pm +1 -1
  29. data/bin/lib/Image/ExifTool/APP12.pm +1 -1
  30. data/bin/lib/Image/ExifTool/ASF.pm +19 -6
  31. data/bin/lib/Image/ExifTool/Apple.pm +13 -5
  32. data/bin/lib/Image/ExifTool/Audible.pm +1 -1
  33. data/bin/lib/Image/ExifTool/BMP.pm +1 -1
  34. data/bin/lib/Image/ExifTool/BPG.pm +17 -15
  35. data/bin/lib/Image/ExifTool/BZZ.pm +1 -1
  36. data/bin/lib/Image/ExifTool/BigTIFF.pm +30 -15
  37. data/bin/lib/Image/ExifTool/BuildTagLookup.pm +103 -52
  38. data/bin/lib/Image/ExifTool/Canon.pm +684 -112
  39. data/bin/lib/Image/ExifTool/CanonCustom.pm +119 -9
  40. data/bin/lib/Image/ExifTool/CanonRaw.pm +1 -1
  41. data/bin/lib/Image/ExifTool/CanonVRD.pm +13 -26
  42. data/bin/lib/Image/ExifTool/CaptureOne.pm +1 -1
  43. data/bin/lib/Image/ExifTool/Casio.pm +1 -1
  44. data/bin/lib/Image/ExifTool/Charset.pm +1 -1
  45. data/bin/lib/Image/ExifTool/DICOM.pm +12 -5
  46. data/bin/lib/Image/ExifTool/DJI.pm +51 -3
  47. data/bin/lib/Image/ExifTool/DNG.pm +15 -8
  48. data/bin/lib/Image/ExifTool/DPX.pm +1 -1
  49. data/bin/lib/Image/ExifTool/DV.pm +1 -1
  50. data/bin/lib/Image/ExifTool/DarwinCore.pm +63 -23
  51. data/bin/lib/Image/ExifTool/DjVu.pm +4 -2
  52. data/bin/lib/Image/ExifTool/EXE.pm +30 -6
  53. data/bin/lib/Image/ExifTool/Exif.pm +351 -109
  54. data/bin/lib/Image/ExifTool/FITS.pm +148 -0
  55. data/bin/lib/Image/ExifTool/FLAC.pm +2 -2
  56. data/bin/lib/Image/ExifTool/FLIF.pm +1 -1
  57. data/bin/lib/Image/ExifTool/FLIR.pm +109 -13
  58. data/bin/lib/Image/ExifTool/Fixup.pm +1 -1
  59. data/bin/lib/Image/ExifTool/Flash.pm +3 -3
  60. data/bin/lib/Image/ExifTool/FlashPix.pm +433 -9
  61. data/bin/lib/Image/ExifTool/Font.pm +2 -2
  62. data/bin/lib/Image/ExifTool/FotoStation.pm +1 -1
  63. data/bin/lib/Image/ExifTool/FujiFilm.pm +336 -16
  64. data/bin/lib/Image/ExifTool/GE.pm +1 -1
  65. data/bin/lib/Image/ExifTool/GIF.pm +5 -7
  66. data/bin/lib/Image/ExifTool/GIMP.pm +39 -3
  67. data/bin/lib/Image/ExifTool/GPS.pm +48 -22
  68. data/bin/lib/Image/ExifTool/GeoTiff.pm +23 -23
  69. data/bin/lib/Image/ExifTool/Geotag.pm +80 -45
  70. data/bin/lib/Image/ExifTool/GoPro.pm +709 -0
  71. data/bin/lib/Image/ExifTool/H264.pm +40 -18
  72. data/bin/lib/Image/ExifTool/HP.pm +1 -1
  73. data/bin/lib/Image/ExifTool/HTML.pm +19 -12
  74. data/bin/lib/Image/ExifTool/HtmlDump.pm +37 -26
  75. data/bin/lib/Image/ExifTool/ICC_Profile.pm +297 -23
  76. data/bin/lib/Image/ExifTool/ID3.pm +12 -7
  77. data/bin/lib/Image/ExifTool/IPTC.pm +48 -19
  78. data/bin/lib/Image/ExifTool/ISO.pm +1 -1
  79. data/bin/lib/Image/ExifTool/ITC.pm +1 -1
  80. data/bin/lib/Image/ExifTool/Import.pm +13 -9
  81. data/bin/lib/Image/ExifTool/InDesign.pm +3 -5
  82. data/bin/lib/Image/ExifTool/JPEG.pm +22 -11
  83. data/bin/lib/Image/ExifTool/JPEGDigest.pm +1 -1
  84. data/bin/lib/Image/ExifTool/JSON.pm +3 -3
  85. data/bin/lib/Image/ExifTool/JVC.pm +1 -1
  86. data/bin/lib/Image/ExifTool/Jpeg2000.pm +2 -2
  87. data/bin/lib/Image/ExifTool/Kodak.pm +1233 -58
  88. data/bin/lib/Image/ExifTool/KyoceraRaw.pm +1 -1
  89. data/bin/lib/Image/ExifTool/LNK.pm +1 -1
  90. data/bin/lib/Image/ExifTool/Lang/cs.pm +1 -1
  91. data/bin/lib/Image/ExifTool/Lang/de.pm +33 -24
  92. data/bin/lib/Image/ExifTool/Lang/en_ca.pm +64 -2
  93. data/bin/lib/Image/ExifTool/Lang/en_gb.pm +64 -2
  94. data/bin/lib/Image/ExifTool/Lang/es.pm +8 -4
  95. data/bin/lib/Image/ExifTool/Lang/fi.pm +46 -4
  96. data/bin/lib/Image/ExifTool/Lang/fr.pm +5 -3
  97. data/bin/lib/Image/ExifTool/Lang/it.pm +6 -3
  98. data/bin/lib/Image/ExifTool/Lang/ja.pm +15 -3
  99. data/bin/lib/Image/ExifTool/Lang/ko.pm +5 -2
  100. data/bin/lib/Image/ExifTool/Lang/nl.pm +6 -3
  101. data/bin/lib/Image/ExifTool/Lang/pl.pm +2 -2
  102. data/bin/lib/Image/ExifTool/Lang/ru.pm +1 -1
  103. data/bin/lib/Image/ExifTool/Lang/sv.pm +1 -1
  104. data/bin/lib/Image/ExifTool/Lang/tr.pm +4 -2
  105. data/bin/lib/Image/ExifTool/Lang/zh_cn.pm +1 -1
  106. data/bin/lib/Image/ExifTool/Lang/zh_tw.pm +1 -1
  107. data/bin/lib/Image/ExifTool/Leaf.pm +1 -1
  108. data/bin/lib/Image/ExifTool/Lytro.pm +4 -8
  109. data/bin/lib/Image/ExifTool/M2TS.pm +10 -9
  110. data/bin/lib/Image/ExifTool/MIE.pm +12 -8
  111. data/bin/lib/Image/ExifTool/MIEUnits.pod +1 -1
  112. data/bin/lib/Image/ExifTool/MIFF.pm +1 -1
  113. data/bin/lib/Image/ExifTool/MNG.pm +1 -1
  114. data/bin/lib/Image/ExifTool/MOI.pm +1 -1
  115. data/bin/lib/Image/ExifTool/MPC.pm +1 -1
  116. data/bin/lib/Image/ExifTool/MPEG.pm +2 -3
  117. data/bin/lib/Image/ExifTool/MPF.pm +6 -6
  118. data/bin/lib/Image/ExifTool/MWG.pm +4 -4
  119. data/bin/lib/Image/ExifTool/MXF.pm +2 -2
  120. data/bin/lib/Image/ExifTool/MacOS.pm +184 -34
  121. data/bin/lib/Image/ExifTool/MakerNotes.pm +101 -18
  122. data/bin/lib/Image/ExifTool/Matroska.pm +1 -1
  123. data/bin/lib/Image/ExifTool/Microsoft.pm +5 -3
  124. data/bin/lib/Image/ExifTool/Minolta.pm +89 -62
  125. data/bin/lib/Image/ExifTool/MinoltaRaw.pm +1 -1
  126. data/bin/lib/Image/ExifTool/Motorola.pm +1 -1
  127. data/bin/lib/Image/ExifTool/Nikon.pm +1511 -380
  128. data/bin/lib/Image/ExifTool/NikonCapture.pm +1 -1
  129. data/bin/lib/Image/ExifTool/NikonCustom.pm +2758 -2935
  130. data/bin/lib/Image/ExifTool/Nintendo.pm +1 -1
  131. data/bin/lib/Image/ExifTool/OOXML.pm +1 -1
  132. data/bin/lib/Image/ExifTool/Ogg.pm +1 -1
  133. data/bin/lib/Image/ExifTool/Olympus.pm +47 -8
  134. data/bin/lib/Image/ExifTool/OpenEXR.pm +1 -1
  135. data/bin/lib/Image/ExifTool/Opus.pm +1 -1
  136. data/bin/lib/Image/ExifTool/PCX.pm +138 -0
  137. data/bin/lib/Image/ExifTool/PDF.pm +58 -42
  138. data/bin/lib/Image/ExifTool/PGF.pm +1 -1
  139. data/bin/lib/Image/ExifTool/PICT.pm +1 -1
  140. data/bin/lib/Image/ExifTool/PLIST.pm +12 -5
  141. data/bin/lib/Image/ExifTool/PLUS.pm +1 -1
  142. data/bin/lib/Image/ExifTool/PNG.pm +108 -10
  143. data/bin/lib/Image/ExifTool/PPM.pm +3 -3
  144. data/bin/lib/Image/ExifTool/PSP.pm +1 -1
  145. data/bin/lib/Image/ExifTool/Palm.pm +1 -1
  146. data/bin/lib/Image/ExifTool/Panasonic.pm +299 -31
  147. data/bin/lib/Image/ExifTool/PanasonicRaw.pm +201 -19
  148. data/bin/lib/Image/ExifTool/Pentax.pm +164 -143
  149. data/bin/lib/Image/ExifTool/PhaseOne.pm +12 -5
  150. data/bin/lib/Image/ExifTool/PhotoCD.pm +9 -10
  151. data/bin/lib/Image/ExifTool/PhotoMechanic.pm +1 -1
  152. data/bin/lib/Image/ExifTool/Photoshop.pm +230 -60
  153. data/bin/lib/Image/ExifTool/PostScript.pm +29 -4
  154. data/bin/lib/Image/ExifTool/PrintIM.pm +1 -1
  155. data/bin/lib/Image/ExifTool/Qualcomm.pm +2 -2
  156. data/bin/lib/Image/ExifTool/QuickTime.pm +1539 -279
  157. data/bin/lib/Image/ExifTool/QuickTimeStream.pl +1857 -0
  158. data/bin/lib/Image/ExifTool/README +84 -46
  159. data/bin/lib/Image/ExifTool/RIFF.pm +116 -23
  160. data/bin/lib/Image/ExifTool/RSRC.pm +1 -1
  161. data/bin/lib/Image/ExifTool/RTF.pm +6 -4
  162. data/bin/lib/Image/ExifTool/Radiance.pm +1 -1
  163. data/bin/lib/Image/ExifTool/Rawzor.pm +3 -2
  164. data/bin/lib/Image/ExifTool/Real.pm +1 -1
  165. data/bin/lib/Image/ExifTool/Reconyx.pm +261 -7
  166. data/bin/lib/Image/ExifTool/Red.pm +325 -0
  167. data/bin/lib/Image/ExifTool/Ricoh.pm +3 -7
  168. data/bin/lib/Image/ExifTool/Samsung.pm +95 -25
  169. data/bin/lib/Image/ExifTool/Sanyo.pm +1 -1
  170. data/bin/lib/Image/ExifTool/Scalado.pm +1 -1
  171. data/bin/lib/Image/ExifTool/Shift.pl +26 -12
  172. data/bin/lib/Image/ExifTool/Shortcuts.pm +9 -2
  173. data/bin/lib/Image/ExifTool/Sigma.pm +36 -30
  174. data/bin/lib/Image/ExifTool/SigmaRaw.pm +3 -8
  175. data/bin/lib/Image/ExifTool/Sony.pm +531 -177
  176. data/bin/lib/Image/ExifTool/SonyIDC.pm +63 -3
  177. data/bin/lib/Image/ExifTool/Stim.pm +2 -2
  178. data/bin/lib/Image/ExifTool/TagInfoXML.pm +23 -23
  179. data/bin/lib/Image/ExifTool/TagLookup.pm +6352 -5062
  180. data/bin/lib/Image/ExifTool/TagNames.pod +3024 -565
  181. data/bin/lib/Image/ExifTool/Theora.pm +1 -1
  182. data/bin/lib/Image/ExifTool/Torrent.pm +2 -2
  183. data/bin/lib/Image/ExifTool/Unknown.pm +1 -1
  184. data/bin/lib/Image/ExifTool/VCard.pm +47 -9
  185. data/bin/lib/Image/ExifTool/Validate.pm +391 -99
  186. data/bin/lib/Image/ExifTool/Vorbis.pm +1 -1
  187. data/bin/lib/Image/ExifTool/WTV.pm +319 -0
  188. data/bin/lib/Image/ExifTool/WriteCanonRaw.pl +1 -1
  189. data/bin/lib/Image/ExifTool/WriteExif.pl +91 -18
  190. data/bin/lib/Image/ExifTool/WriteIPTC.pl +6 -6
  191. data/bin/lib/Image/ExifTool/WritePDF.pl +13 -12
  192. data/bin/lib/Image/ExifTool/WritePNG.pl +1 -1
  193. data/bin/lib/Image/ExifTool/WritePhotoshop.pl +1 -1
  194. data/bin/lib/Image/ExifTool/WritePostScript.pl +2 -2
  195. data/bin/lib/Image/ExifTool/WriteQuickTime.pl +764 -121
  196. data/bin/lib/Image/ExifTool/WriteXMP.pl +176 -67
  197. data/bin/lib/Image/ExifTool/Writer.pl +490 -246
  198. data/bin/lib/Image/ExifTool/XMP.pm +216 -76
  199. data/bin/lib/Image/ExifTool/XMP2.pl +54 -10
  200. data/bin/lib/Image/ExifTool/XMPStruct.pl +14 -11
  201. data/bin/lib/Image/ExifTool/ZIP.pm +60 -15
  202. data/bin/lib/Image/ExifTool/iWork.pm +12 -5
  203. data/bin/perl-Image-ExifTool.spec +46 -44
  204. data/lib/exiftool_vendored/version.rb +1 -1
  205. metadata +14 -4
@@ -228,7 +228,7 @@ information from Ogg Vorbis audio headers.
228
228
 
229
229
  =head1 AUTHOR
230
230
 
231
- Copyright 2003-2017, Phil Harvey (phil at owl.phy.queensu.ca)
231
+ Copyright 2003-2019, Phil Harvey (phil at owl.phy.queensu.ca)
232
232
 
233
233
  This library is free software; you can redistribute it and/or modify it
234
234
  under the same terms as Perl itself.
@@ -0,0 +1,319 @@
1
+ #------------------------------------------------------------------------------
2
+ # File: WTV.pm
3
+ #
4
+ # Description: Read WTV meta information
5
+ #
6
+ # Revisions: 2018-05-30 - P. Harvey Created
7
+ #
8
+ # References: 1) https://wiki.multimedia.cx/index.php?title=WTV
9
+ #------------------------------------------------------------------------------
10
+
11
+ package Image::ExifTool::WTV;
12
+
13
+ use strict;
14
+ use vars qw($VERSION);
15
+ use Image::ExifTool qw(:DataAccess :Utils);
16
+
17
+ $VERSION = '1.00';
18
+
19
+ sub ProcessMetadata($$$);
20
+
21
+ my %timeInfo = (
22
+ # time looks like 100 ns intervals since 0:00 UTC Jan 1, 0001 (ref PH)
23
+ ValueConv => q{ # (719162 days from 0001:01:01 to 1970:01:01)
24
+ my $t = $val / 1e7 - 719162*24*3600;
25
+ return Image::ExifTool::ConvertUnixTime($t) . 'Z';
26
+ },
27
+ PrintConv => '$self->ConvertDateTime($val)',
28
+ );
29
+
30
+ my %bool = ( PrintConv => { 0 => 'No', 1 => 'Yes' }, PrintConvColumns => 2 );
31
+
32
+ # WTV chunks
33
+ %Image::ExifTool::WTV::Main = (
34
+ GROUPS => { 0 => 'WTV', 1 => 'WTV', 2 => 'Video' },
35
+ NOTES => 'Tags found in Windows recorded TV (WTV) videos.',
36
+ # 'timeline.table.0.header.Events' (not decoded)
37
+ # 'timeline.table.0.entries.Events' (not decoded)
38
+ # 'timeline' (not decoded)
39
+ # 'table.0.header.legacy_attrib' (not decoded)
40
+ 'table.0.entries.legacy_attrib' => {
41
+ Name => 'Metdata',
42
+ SubDirectory => { TagTable => 'Image::ExifTool::WTV::Metadata' },
43
+ },
44
+ # 'table.0.redirector.legacy_attrib' (not decoded)
45
+ # 'table.0.header.time' (not decoded)
46
+ # 'table.0.entries.time' (not decoded)
47
+ );
48
+
49
+ # Note: Many of these tags are similar to those found in Image::ExifTool::Microsoft::Xtra
50
+ # and Image::ExifTool::ASF::ExtendedDescr
51
+ %Image::ExifTool::WTV::Metadata = (
52
+ GROUPS => { 0 => 'WTV', 1 => 'WTV', 2 => 'Video' },
53
+ PROCESS_PROC => \&ProcessMetadata,
54
+ NOTES => 'ExifTool will extract any tag found, even if not in this table.',
55
+ VARS => { NO_ID => 1 },
56
+ 'Duration' => {
57
+ Name => 'Duration',
58
+ ValueConv => '$val/1e7',
59
+ PrintConv => 'ConvertDuration($val)',
60
+ },
61
+ 'Title' => { },
62
+ 'WM/Genre' => 'Genre',
63
+ 'WM/Language' => 'Language',
64
+ 'WM/MediaClassPrimaryID' => 'MediaClassPrimaryID',
65
+ 'WM/MediaClassSecondaryID' => 'MediaClassSecondaryID',
66
+ 'WM/MediaCredits' => 'MediaCredits',
67
+ 'WM/MediaIsDelay' => { Name => 'MediaIsDelay', %bool },
68
+ 'WM/MediaIsFinale' => { Name => 'MediaIsFinale', %bool },
69
+ 'WM/MediaIsLive' => { Name => 'MediaIsLive', %bool },
70
+ 'WM/MediaIsMovie' => { Name => 'MediaIsMovie', %bool },
71
+ 'WM/MediaIsPremiere' => { Name => 'MediaIsPremiere', %bool },
72
+ 'WM/MediaIsRepeat' => { Name => 'MediaIsRepeat', %bool },
73
+ 'WM/MediaIsSAP' => { Name => 'MediaIsSAP', %bool },
74
+ 'WM/MediaIsSport' => { Name => 'MediaIsSport', %bool },
75
+ 'WM/MediaIsStereo' => { Name => 'MediaIsStereo', %bool, Groups => { 2 => 'Audio' } },
76
+ 'WM/MediaIsSubtitled' => { Name => 'MediaIsSubtitled',%bool },
77
+ 'WM/MediaIsTape' => { Name => 'MediaIsTape', %bool },
78
+ 'WM/MediaNetworkAffiliation'=> 'MediaNetworkAffiliation',
79
+ 'WM/MediaOriginalBroadcastDateTime' => {
80
+ Name => 'MediaOriginalBroadcastDateTime',
81
+ Groups => { 2 => 'Time' },
82
+ ValueConv => '$val =~ tr/-T/: /; $val',
83
+ PrintConv => '$self->ConvertDateTime($val)',
84
+ },
85
+ 'WM/MediaOriginalChannel' => { Name => 'MediaOriginalChannel' },
86
+ 'WM/MediaOriginalChannelSubNumber' => { Name => 'MediaOriginalChannelSubNumber' },
87
+ 'WM/MediaOriginalRunTime' => {
88
+ Name => 'MediaOriginalRunTime',
89
+ ValueConv => '$val / 1e7',
90
+ PrintConv => 'ConvertDuration($val)',
91
+ },
92
+ 'WM/MediaStationCallSign' => 'MediaStationCallSign',
93
+ 'WM/MediaStationName' => 'MediaStationName',
94
+ 'WM/MediaThumbAspectRatioX' => 'MediaThumbAspectRatioX',
95
+ 'WM/MediaThumbAspectRatioY' => 'MediaThumbAspectRatioY',
96
+ 'WM/MediaThumbHeight' => 'MediaThumbHeight',
97
+ 'WM/MediaThumbRatingAttributes' => { Name => 'MediaThumbRatingAttributes' },
98
+ 'WM/MediaThumbRatingLevel' => 'MediaThumbRatingLevel',
99
+ 'WM/MediaThumbRatingSystem' => 'MediaThumbRatingSystem',
100
+ 'WM/MediaThumbRet' => 'MediaThumbRet',
101
+ 'WM/MediaThumbStride' => 'MediaThumbStride',
102
+ 'WM/MediaThumbTimeStamp' => { Name => 'MediaThumbTimeStamp', Notes => 'unknown units', Unknown => 1 },
103
+ 'WM/MediaThumbWidth' => 'MediaThumbWidth',
104
+ 'WM/OriginalReleaseTime' => {
105
+ Name => 'OriginalReleaseTime',
106
+ Groups => { 2 => 'Time' },
107
+ ValueConv => '$val=~tr/-T/: /; $val',
108
+ PrintConv => '$self->ConvertDateTime($val)',
109
+ },
110
+ 'WM/ParentalRating' => 'ParentalRating',
111
+ 'WM/ParentalRatingReason' => 'ParentalRatingReason',
112
+ 'WM/Provider' => 'Provider',
113
+ 'WM/ProviderCopyright' => 'ProviderCopyright',
114
+ 'WM/ProviderRating' => 'ProviderRating',
115
+ 'WM/SubTitle' => 'Subtitle',
116
+ 'WM/SubTitleDescription' => 'SubtitleDescription',
117
+ 'WM/VideoClosedCaptioning' => { Name => 'VideoClosedCaptioning', %bool },
118
+ 'WM/WMRVATSCContent' => { Name => 'ATSCContent', %bool },
119
+ 'WM/WMRVActualSoftPostPadding' => 'ActualSoftPostPadding',
120
+ 'WM/WMRVActualSoftPrePadding' => 'ActualSoftPrePadding',
121
+ 'WM/WMRVBitrate' => { Name => 'Bitrate', Notes => 'unknown units', Unknown => 1 },
122
+ 'WM/WMRVBrandingImageID' => 'BrandingImageID',
123
+ 'WM/WMRVBrandingName' => 'BrandingName',
124
+ 'WM/WMRVContentProtected' => { Name => 'ContentProtected', %bool },
125
+ 'WM/WMRVContentProtectedPercent' => 'ContentProtectedPercent',
126
+ 'WM/WMRVDTVContent' => { Name => 'DTVContent', %bool },
127
+ 'WM/WMRVEncodeTime' => { Name => 'EncodeTime', Groups => { 2 => 'Time' }, %timeInfo },
128
+ 'WM/WMRVEndTime' => { Name => 'EndTime', Groups => { 2 => 'Time' }, %timeInfo },
129
+ 'WM/WMRVExpirationDate' => { Name => 'ExpirationDate', Groups => { 2 => 'Time' }, %timeInfo, Unknown => 1 },
130
+ 'WM/WMRVExpirationSpan' => { Name => 'ExpirationSpan', Notes => 'unknown units', Unknown => 1 },
131
+ 'WM/WMRVHDContent' => { Name => 'HDContent', %bool },
132
+ 'WM/WMRVHardPostPadding' => 'HardPostPadding',
133
+ 'WM/WMRVHardPrePadding' => 'HardPrePadding',
134
+ 'WM/WMRVInBandRatingAttributes' => 'InBandRatingAttributes',
135
+ 'WM/WMRVInBandRatingLevel' => 'InBandRatingLevel',
136
+ 'WM/WMRVInBandRatingSystem' => 'InBandRatingSystem',
137
+ 'WM/WMRVKeepUntil' => 'KeepUntil',
138
+ 'WM/WMRVOriginalSoftPostPadding'=> 'OriginalSoftPostPadding',
139
+ 'WM/WMRVOriginalSoftPrePadding' => 'OriginalSoftPrePadding',
140
+ 'WM/WMRVProgramID' => 'ProgramID',
141
+ 'WM/WMRVQuality' => 'Quality',
142
+ 'WM/WMRVRequestID' => 'RequestID',
143
+ 'WM/WMRVScheduleItemID' => 'ScheduleItemID',
144
+ 'WM/WMRVSeriesUID' => 'SeriesUID',
145
+ 'WM/WMRVServiceID' => 'ServiceID',
146
+ 'WM/WMRVWatched' => { Name => 'Watched', %bool },
147
+ );
148
+
149
+ #------------------------------------------------------------------------------
150
+ # Read specified sectors from the file
151
+ # Inputs: 0) raf ref, 1) sector table ref, 2) offset in sector table, 3) sector size
152
+ # Returns: Data or undef on error
153
+ sub ReadSectors($$$$)
154
+ {
155
+ my ($raf, $secPt, $pos, $secSize) = @_;
156
+ my ($data, $buff);
157
+ while ($pos <= length($$secPt) - 4) {
158
+ my $sec = Get32u($secPt, $pos);
159
+ return undef if $sec == 0xffff; # (just in case)
160
+ last unless $sec; # a null marks the end of the sector table
161
+ defined($data) ? ($data .= $buff) : ($data = $buff);
162
+ return undef unless $raf->Seek($sec*$secSize,0) and $raf->Read($buff,$secSize) == $secSize;
163
+ $pos += 4;
164
+ }
165
+ return defined($data) ? $data . $buff : $buff;
166
+ }
167
+
168
+ #------------------------------------------------------------------------------
169
+ # Process WTV metadata
170
+ # Inputs: 0) ExifTool object reference, 1) dirInfo reference, 2) tag table ref
171
+ # Returns: 1 on success
172
+ sub ProcessMetadata($$$)
173
+ {
174
+ my ($et, $dirInfo, $tagTablePtr) = @_;
175
+ my $dataPt = $$dirInfo{DataPt};
176
+ my $pos = 0;
177
+ my $end = length $$dataPt;
178
+ $et->VerboseDir('WTV Metadata', undef, $end);
179
+ while ($pos + 0x18 < $end) {
180
+ last unless substr($$dataPt,$pos,16) eq "\x5a\xfe\xd7\x6d\xc8\x1d\x8f\x4a\x99\x22\xfa\xb1\x1c\x38\x14\x53";
181
+ my $fmt = Get32u($dataPt, $pos + 0x10);
182
+ my $len = Get32u($dataPt, $pos + 0x14);
183
+ my $str = '';
184
+ $pos += 0x18;
185
+ for (;;) {
186
+ $pos + 2 > $end and $et->Warn('Corrupt metadata directory'), last;
187
+ my $ch = substr($$dataPt, $pos, 2);
188
+ $pos += 2;
189
+ last if $ch eq "\0\0";
190
+ $str .= $ch;
191
+ }
192
+ last if $pos + $len > $end;
193
+ my $tag = $et->Decode($str, 'UCS2', undef, 'UTF8');
194
+ my $dat = substr($$dataPt, $pos, $len);
195
+ # add tag if not already there
196
+ unless ($$tagTablePtr{$tag}) {
197
+ my $name = $tag;
198
+ $name =~ s{^(WTV_Metadata_)?WM/(WMRV)?}{};
199
+ AddTagToTable($tagTablePtr, $tag, $name);
200
+ $et->VPrint(0, $$et{INDENT}, "[adding WTV:$name]\n");
201
+ }
202
+ my $val;
203
+ if ($fmt==0 or $fmt==3) { # int32u or boolean32
204
+ $val = Get32s(\$dat, 0);
205
+ } elsif ($fmt == 1) { # string
206
+ $val = $et->Decode($dat, 'UCS2');
207
+ } elsif ($fmt == 6) { # GUID
208
+ $val = unpack('H*', $dat);
209
+ } elsif ($fmt == 4) { # int64u (date/time values use this)
210
+ $val = Get64u(\$dat, 0);
211
+ } else {
212
+ $val = $dat;
213
+ $fmt = "Unknown($fmt)";
214
+ }
215
+ $et->HandleTag($tagTablePtr, $tag, $val,
216
+ Format => "format $fmt",
217
+ Size => length $dat,
218
+ );
219
+ $et->VerboseDump(\$dat);
220
+ $pos += $len;
221
+ }
222
+ }
223
+
224
+ #------------------------------------------------------------------------------
225
+ # Extract information from a WTV video
226
+ # Inputs: 0) ExifTool object reference, 1) dirInfo reference
227
+ # Returns: 1 on success, 0 if this wasn't a valid WTV file
228
+ sub ProcessWTV($$)
229
+ {
230
+ my ($et, $dirInfo) = @_;
231
+ my $raf = $$dirInfo{RAF};
232
+ my $verbose = $et->Options('Verbose');
233
+ my ($buff, $tagTablePtr, $pos, $len);
234
+
235
+ # verify this is a valid WTV file
236
+ return 0 unless $raf->Read($buff, 0x60) == 0x60;
237
+ return 0 unless $buff =~ /^\xb7\xd8\x00\x20\x37\x49\xda\x11\xa6\x4e\x00\x07\xe9\x5e\xad\x8d/;
238
+ $et->SetFileType();
239
+ SetByteOrder('II');
240
+ # 0x28 - int32u: sector size? (=0x1000) (PH NC)
241
+ # 0x38 - int32u: sector number for main WTV directory (PH assume this is a sector table, NC)
242
+ # 0x58 - int32u: total number of sectors in file
243
+ my $secSize = Get32u(\$buff, 0x28);
244
+ # in case I'm wrong about this, constrain sector size to
245
+ # either 0x1000 (standard) or 0x100 (ExifTool test file) - PH
246
+ $secSize = 0x1000 unless $secSize == 0x1000 or $secSize == 0x100;
247
+ $buff = ReadSectors($raf, \$buff, 0x38, $secSize); # read the WTV directory
248
+ return 0 unless defined $buff;
249
+ $tagTablePtr = GetTagTable('Image::ExifTool::WTV::Main');
250
+ # parse the WTV directory
251
+ $et->VerboseDir('WTV');
252
+ for ($pos=0; $pos<length($buff)-0x28; $pos+=$len) {
253
+ unless (substr($buff,$pos,0x10) eq "\x92\xb7\x74\x91\x59\x70\x70\x44\x88\xdf\x06\x3b\x82\xcc\x21\x3d") {
254
+ $et->Warn("WTV directory wasn't at expected location") unless $pos;
255
+ last;
256
+ }
257
+ $len = Get32u(\$buff, $pos+0x10);
258
+ last if $pos + $len > length($buff);
259
+ my $n = Get32u(\$buff, $pos + 0x20);
260
+ 0x28 + $n*2 + 8 > $len and $et->Warn('WTV directory error'), last;
261
+ my $tag = $et->Decode(substr($buff,$pos+0x28,$n*2), 'UCS2', undef, 'UTF8');
262
+ my $ptr = $pos + 0x28 + $n * 2;
263
+ my $flg = Get32u(\$buff, $ptr + 4);
264
+ if ($verbose) {
265
+ my $s = Get32s(\$buff, $ptr);
266
+ $s = sprintf('0x%x', $s) unless $s < 0;
267
+ $et->VPrint(1,"- Tag '${tag}' (sector=$s, flag=$flg)");
268
+ }
269
+ next unless $$tagTablePtr{$tag} and ($flg == 0 or $flg == 1);
270
+ my $sec = substr($buff, $ptr, 4);
271
+ my $data = ReadSectors($raf, \$sec, 0, $secSize);
272
+ last unless defined $data;
273
+ # read sectors from table if necessary (flag=1 indicates a sector table)
274
+ $data = ReadSectors($raf, \$data, 0, $secSize) if $flg == 1;
275
+ defined $data or $et->Warn("Error fetching data for $tag"), next;
276
+ $et->HandleTag($tagTablePtr, $tag, $data);
277
+ }
278
+ return 1;
279
+ }
280
+
281
+ 1; # end
282
+
283
+ __END__
284
+
285
+ =head1 NAME
286
+
287
+ Image::ExifTool::WTV - Read WTV meta information
288
+
289
+ =head1 SYNOPSIS
290
+
291
+ This module is used by Image::ExifTool
292
+
293
+ =head1 DESCRIPTION
294
+
295
+ This module contains definitions required by Image::ExifTool to read WTV
296
+ (Windows recorded TV show) videos.
297
+
298
+ =head1 AUTHOR
299
+
300
+ Copyright 2003-2019, Phil Harvey (phil at owl.phy.queensu.ca)
301
+
302
+ This library is free software; you can redistribute it and/or modify it
303
+ under the same terms as Perl itself.
304
+
305
+ =head1 REFERENCES
306
+
307
+ =over 4
308
+
309
+ =item L<https://wiki.multimedia.cx/index.php?title=WTV>
310
+
311
+ =back
312
+
313
+ =head1 SEE ALSO
314
+
315
+ L<Image::ExifTool::TagNames/WTV Tags>,
316
+ L<Image::ExifTool(3pm)|Image::ExifTool>
317
+
318
+ =cut
319
+
@@ -623,7 +623,7 @@ files, and would lead to far fewer problems with corrupted metadata.
623
623
 
624
624
  =head1 AUTHOR
625
625
 
626
- Copyright 2003-2017, Phil Harvey (phil at owl.phy.queensu.ca)
626
+ Copyright 2003-2019, Phil Harvey (phil at owl.phy.queensu.ca)
627
627
 
628
628
  This library is free software; you can redistribute it and/or modify it
629
629
  under the same terms as Perl itself.
@@ -85,7 +85,7 @@ sub GetCFAPattern($)
85
85
  foreach (@cols) {
86
86
  tr/ \]\[//d; # remove remaining brackets and any spaces
87
87
  my $c = $cfaLookup{lc($_)};
88
- defined $c or warn("Unknown color '$_'\n"), return undef;
88
+ defined $c or warn("Unknown color '${_}'\n"), return undef;
89
89
  push @a, $c;
90
90
  }
91
91
  }
@@ -130,11 +130,11 @@ sub EncodeExifText($$)
130
130
  #------------------------------------------------------------------------------
131
131
  # rebuild maker notes to properly contain all value data
132
132
  # (some manufacturers put value data outside maker notes!!)
133
- # Inputs: 0) ExifTool object ref, 1) tag table ref, 2) dirInfo ref
133
+ # Inputs: 0) ExifTool object ref, 1) dirInfo ref, 2) tag table ref
134
134
  # Returns: new maker note data (and creates MAKER_NOTE_FIXUP), or undef on error
135
135
  sub RebuildMakerNotes($$$)
136
136
  {
137
- my ($et, $tagTablePtr, $dirInfo) = @_;
137
+ my ($et, $dirInfo, $tagTablePtr) = @_;
138
138
  my $dirStart = $$dirInfo{DirStart};
139
139
  my $dirLen = $$dirInfo{DirLen};
140
140
  my $dataPt = $$dirInfo{DataPt};
@@ -178,7 +178,7 @@ sub RebuildMakerNotes($$$)
178
178
  # set GENERATE_PREVIEW_INFO flag so PREVIEW_INFO will be generated
179
179
  $$newTool{GENERATE_PREVIEW_INFO} = 1;
180
180
  # drop any large tags
181
- $$newTool{DROP_TAGS} = 1;
181
+ $$newTool{DropTags} = 1;
182
182
  # initialize other necessary data members
183
183
  $$newTool{FILE_TYPE} = $$et{FILE_TYPE};
184
184
  $$newTool{TIFF_TYPE} = $$et{TIFF_TYPE};
@@ -342,6 +342,68 @@ sub UpdateTiffEnd($$)
342
342
  }
343
343
  }
344
344
 
345
+ #------------------------------------------------------------------------------
346
+ # Validate image data size
347
+ # Inputs: 0) ExifTool ref, 1) validate info hash ref,
348
+ # 2) flag to issue error (ie. we're writing)
349
+ # - issues warning or error if problems found
350
+ sub ValidateImageData($$$;$)
351
+ {
352
+ local $_;
353
+ my ($et, $vInfo, $dirName, $errFlag) = @_;
354
+
355
+ # determine the expected size of the image data for an uncompressed image
356
+ # (0x102 BitsPerSample, 0x103 Compression and 0x115 SamplesPerPixel
357
+ # all default to a value of 1 if they don't exist)
358
+ if ((not defined $$vInfo{0x103} or $$vInfo{0x103} eq '1') and
359
+ $$vInfo{0x100} and $$vInfo{0x101} and ($$vInfo{0x117} or $$vInfo{0x145}))
360
+ {
361
+ my $samplesPerPix = $$vInfo{0x115} || 1;
362
+ my @bitsPerSample = $$vInfo{0x102} ? split(' ',$$vInfo{0x102}) : (1) x $samplesPerPix;
363
+ my $byteCountInfo = $$vInfo{0x117} || $$vInfo{0x145};
364
+ my $byteCounts = $$byteCountInfo[1];
365
+ my $totalBytes = 0;
366
+ $totalBytes += $_ foreach split ' ', $byteCounts;
367
+ my $minor;
368
+ $minor = 1 if $$et{DOC_NUM} or $$et{FILE_TYPE} ne 'TIFF';
369
+ unless (@bitsPerSample == $samplesPerPix) {
370
+ # (just a warning for this problem)
371
+ my $s = $samplesPerPix eq '1' ? '' : 's';
372
+ $et->Warn("$dirName BitsPerSample should have $samplesPerPix value$s", $minor);
373
+ push @bitsPerSample, $bitsPerSample[0] while @bitsPerSample < $samplesPerPix;
374
+ foreach (@bitsPerSample) {
375
+ $et->WarnOnce("$dirName BitsPerSample values are different", $minor) if $_ ne $bitsPerSample[0];
376
+ $et->WarnOnce("Invalid $dirName BitsPerSample value", $minor) if $_ < 1 or $_ > 32;
377
+ }
378
+ }
379
+ my $bitsPerPixel = 0;
380
+ $bitsPerPixel += $_ foreach @bitsPerSample;
381
+ my $expectedBytes = int(($$vInfo{0x100} * $$vInfo{0x101} * $bitsPerPixel + 7) / 8);
382
+ if ($expectedBytes != $totalBytes and
383
+ # (this problem seems normal for certain types of RAW files...)
384
+ $$et{TIFF_TYPE} !~ /^(K25|KDC|MEF|ORF|SRF)$/)
385
+ {
386
+ my ($adj, $minor);
387
+ if ($expectedBytes > $totalBytes) {
388
+ $adj = 'Under'; # undersized is a bigger problem because we may lose data
389
+ $minor = 0 unless $errFlag;
390
+ } else {
391
+ $adj = 'Over';
392
+ $minor = 1;
393
+ }
394
+ my $msg = "${adj}sized $dirName $$byteCountInfo[0]{Name} ($totalBytes bytes, but expected $expectedBytes)";
395
+ if (not defined $minor) {
396
+ # this is a serious error if we are writing the file and there
397
+ # is a chance that we may not copy all of the image data
398
+ # (but make it minor to allow the file to be written anyway)
399
+ $et->Error($msg, 1);
400
+ } else {
401
+ $et->Warn($msg, $minor);
402
+ }
403
+ }
404
+ }
405
+ }
406
+
345
407
  #------------------------------------------------------------------------------
346
408
  # Handle error while writing EXIF
347
409
  # Inputs: 0) ExifTool ref, 1) error string, 2) tag table ref
@@ -451,7 +513,7 @@ sub WriteExif($$$)
451
513
  my $verbose = $et->Options('Verbose');
452
514
  my $out = $et->Options('TextOut');
453
515
  my ($nextIfdPos, %offsetData, $inMakerNotes);
454
- my (@offsetInfo, %xDelete, $strEnc);
516
+ my (@offsetInfo, %validateInfo, %xDelete, $strEnc);
455
517
  my $deleteAll = 0;
456
518
  my $newData = ''; # initialize buffer to receive new directory data
457
519
  my @imageData; # image data blocks to copy later if requested
@@ -565,6 +627,9 @@ sub WriteExif($$$)
565
627
  $dataPos = $$dirInfo{DataPos};
566
628
  # changed if ForceWrite tag was was set to "FixBase"
567
629
  ++$$et{CHANGED} if $$et{FORCE_WRITE}{FixBase};
630
+ if ($$et{TIFF_TYPE} eq 'SRW' and $$et{Make} eq 'SAMSUNG' and $$et{Model} eq 'EK-GN120') {
631
+ $et->Error("EK-GN120 SRW files are too buggy to write");
632
+ }
568
633
  }
569
634
 
570
635
  # initialize variables to handle mandatory tags
@@ -645,7 +710,7 @@ Entry: for (;;) {
645
710
  # read next entry from existing directory
646
711
  #
647
712
  if ($index < $numEntries) {
648
- $entry = $dirStart + 2 + 12 * $index;
713
+ $entry = $dirStart + 2 + 12 * $index;
649
714
  $oldID = Get16u($dataPt, $entry);
650
715
  $readFormat = $oldFormat = Get16u($dataPt, $entry+2);
651
716
  $readCount = $oldCount = Get32u($dataPt, $entry+4);
@@ -711,7 +776,7 @@ Entry: for (;;) {
711
776
  #### eval FixOffsets ($valuePtr, $valEnd, $size, $tagID, $wFlag)
712
777
  eval $$dirInfo{FixOffsets};
713
778
  unless (defined $valuePtr) {
714
- unless ($$et{DROP_TAGS}) {
779
+ unless ($$et{DropTags}) {
715
780
  my $tagStr = $oldInfo ? $$oldInfo{Name} : sprintf("tag 0x%.4x",$oldID);
716
781
  return undef if $et->Error("Bad $name offset for $tagStr", $inMakerNotes);
717
782
  }
@@ -776,7 +841,8 @@ Entry: for (;;) {
776
841
  }
777
842
  }
778
843
  if ($oldSize > BINARY_DATA_LIMIT and $$origDirInfo{ImageData} and
779
- (not defined $oldInfo or ($oldInfo and not $$oldInfo{SubDirectory})))
844
+ (not defined $oldInfo or ($oldInfo and
845
+ (not $$oldInfo{SubDirectory} or $$oldInfo{ReadFromRAF}))))
780
846
  {
781
847
  # copy huge data blocks later instead of loading into memory
782
848
  $oldValue = ''; # dummy empty value
@@ -877,7 +943,7 @@ Entry: for (;;) {
877
943
  $et->Error("Invalid format ($oldFormName) for $name $$oldInfo{Name}", $inMakerNotes);
878
944
  ++$index; $oldID = $newID; next; # drop this tag
879
945
  }
880
- if ($$oldInfo{Drop} and $$et{DROP_TAGS} and
946
+ if ($$oldInfo{Drop} and $$et{DropTags} and
881
947
  ($$oldInfo{Drop} == 1 or $$oldInfo{Drop} < $oldSize))
882
948
  {
883
949
  ++$index; $oldID = $newID; next; # drop this tag
@@ -960,7 +1026,7 @@ Entry: for (;;) {
960
1026
  my $val = $et->GetNewValue($tagInfo);
961
1027
  defined $val or $mayDelete{$newID} = 1, next;
962
1028
  # must convert to binary for evaluating in Condition
963
- my $fmt = $$tagInfo{Writable} || $$tagInfo{Format};
1029
+ my $fmt = $$tagInfo{Format} || $$tagInfo{Writable};
964
1030
  if ($fmt) {
965
1031
  $val = WriteValue($val, $fmt, $$tagInfo{Count});
966
1032
  defined $val or $mayDelete{$newID} = 1, next;
@@ -1126,8 +1192,7 @@ NoWrite: next if $isNew > 0;
1126
1192
  $$newInfo{Name} ne 'PreviewImage')
1127
1193
  {
1128
1194
  my $name = $$newInfo{MakerNotes} ? 'MakerNotes' : $$newInfo{Name};
1129
- $et->Warn("$name too large to write in JPEG segment");
1130
- goto NoOverwrite; # GOTO!
1195
+ $et->Warn("Writing large value for $name",1);
1131
1196
  }
1132
1197
  # re-code if necessary
1133
1198
  if ($strEnc and $newFormName eq 'string') {
@@ -1261,9 +1326,6 @@ NoOverwrite: next if $isNew > 0;
1261
1326
  if ($dataTag eq 'PreviewImage') {
1262
1327
  # must set DEL_PREVIEW flag now if preview fit into IFD
1263
1328
  $$et{DEL_PREVIEW} = 1 if $len <= 4;
1264
- } elsif ($$et{FILE_TYPE} eq 'JPEG' and $len > 60000) {
1265
- delete $offsetData{$dataTag};
1266
- $err = "$dataTag not written (too large for JPEG segment)";
1267
1329
  }
1268
1330
  } else {
1269
1331
  $err = "$dataTag not found";
@@ -1324,6 +1386,7 @@ NoOverwrite: next if $isNew > 0;
1324
1386
  $subdirInfo{EntryBased} = $$sub{EntryBased};
1325
1387
  $subdirInfo{NoFixBase} = 1 if defined $$sub{Base};
1326
1388
  $subdirInfo{AutoFix} = $$sub{AutoFix};
1389
+ SetByteOrder($$sub{ByteOrder}) if $$sub{ByteOrder};
1327
1390
  }
1328
1391
  # get the proper tag table for these maker notes
1329
1392
  if ($oldInfo and $$oldInfo{SubDirectory}) {
@@ -1384,7 +1447,7 @@ NoOverwrite: next if $isNew > 0;
1384
1447
  }
1385
1448
  }
1386
1449
  if (defined $subdir) {
1387
- next unless length $subdir;
1450
+ length $subdir or SetByteOrder($saveOrder), next;
1388
1451
  my $valLen = length($valBuff);
1389
1452
  # restore existing header and substitute the new
1390
1453
  # maker notes for the old value
@@ -1450,7 +1513,8 @@ NoOverwrite: next if $isNew > 0;
1450
1513
  # process existing subdirectory unless we are overwriting it entirely
1451
1514
  } elsif ($$newInfo{SubDirectory} and $isNew <= 0 and not $isOverwriting
1452
1515
  # don't edit directory if Writable is set to 0
1453
- and (not defined $$newInfo{Writable} or $$newInfo{Writable}))
1516
+ and (not defined $$newInfo{Writable} or $$newInfo{Writable}) and
1517
+ not $$newInfo{ReadFromRAF})
1454
1518
  {
1455
1519
 
1456
1520
  my $subdir = $$newInfo{SubDirectory};
@@ -1742,6 +1806,7 @@ NoOverwrite: next if $isNew > 0;
1742
1806
  SetByteOrder($$newInfo{ByteOrder}) if $$newInfo{ByteOrder};
1743
1807
  @vals = ReadValue(\$oldValue, 0, $readFormName, $readCount, $oldSize);
1744
1808
  SetByteOrder($oldOrder);
1809
+ $validateInfo{$newID} = [$newInfo, join(' ',@vals)] unless $$newInfo{IsOffset};
1745
1810
  }
1746
1811
  # only support int32 pointers (for now)
1747
1812
  if ($formatSize[$newFormat] != 4 and $$newInfo{IsOffset}) {
@@ -1803,6 +1868,10 @@ NoOverwrite: next if $isNew > 0;
1803
1868
  my $offsetVal;
1804
1869
  # set proper count
1805
1870
  $newCount = int(($newSize + $fsize - 1) / $fsize) unless $oldInfo and $$oldInfo{FixedSize};
1871
+ if ($saveForValidate{$newID} and $tagTablePtr eq \%Image::ExifTool::Exif::Main) {
1872
+ my @vals = ReadValue(\$newValue, 0, $newFormName, $newCount, $newSize);
1873
+ $validateInfo{$newID} = join ' ',@vals;
1874
+ }
1806
1875
  if ($newSize > 4) {
1807
1876
  # zero-pad to an even number of bytes (required by EXIF standard)
1808
1877
  # and make sure we are a multiple of the format size
@@ -1877,6 +1946,10 @@ NoOverwrite: next if $isNew > 0;
1877
1946
  undef $allMandatory;
1878
1947
  }
1879
1948
  }
1949
+ if (%validateInfo) {
1950
+ ValidateImageData($et, \%validateInfo, $dirName, 1);
1951
+ undef %validateInfo;
1952
+ }
1880
1953
  if ($ignoreCount) {
1881
1954
  my $y = $ignoreCount > 1 ? 'ies' : 'y';
1882
1955
  my $verb = $$dirInfo{FixBase} ? 'Ignored' : 'Removed';
@@ -2477,7 +2550,7 @@ This file contains routines to write EXIF metadata.
2477
2550
 
2478
2551
  =head1 AUTHOR
2479
2552
 
2480
- Copyright 2003-2017, Phil Harvey (phil at owl.phy.queensu.ca)
2553
+ Copyright 2003-2019, Phil Harvey (phil at owl.phy.queensu.ca)
2481
2554
 
2482
2555
  This library is free software; you can redistribute it and/or modify it
2483
2556
  under the same terms as Perl itself.