exiftool_vendored 9.33.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 (864) hide show
  1. checksums.yaml +15 -0
  2. data/bin/Image-ExifTool-9.33/Changes +6241 -0
  3. data/bin/Image-ExifTool-9.33/MANIFEST +859 -0
  4. data/bin/Image-ExifTool-9.33/META.yml +27 -0
  5. data/bin/Image-ExifTool-9.33/Makefile.PL +41 -0
  6. data/bin/Image-ExifTool-9.33/README +227 -0
  7. data/bin/Image-ExifTool-9.33/arg_files/exif2iptc.args +24 -0
  8. data/bin/Image-ExifTool-9.33/arg_files/exif2xmp.args +38 -0
  9. data/bin/Image-ExifTool-9.33/arg_files/gps2xmp.args +20 -0
  10. data/bin/Image-ExifTool-9.33/arg_files/iptc2exif.args +17 -0
  11. data/bin/Image-ExifTool-9.33/arg_files/iptc2xmp.args +53 -0
  12. data/bin/Image-ExifTool-9.33/arg_files/iptcCore.args +172 -0
  13. data/bin/Image-ExifTool-9.33/arg_files/pdf2xmp.args +23 -0
  14. data/bin/Image-ExifTool-9.33/arg_files/xmp2exif.args +39 -0
  15. data/bin/Image-ExifTool-9.33/arg_files/xmp2gps.args +24 -0
  16. data/bin/Image-ExifTool-9.33/arg_files/xmp2iptc.args +62 -0
  17. data/bin/Image-ExifTool-9.33/arg_files/xmp2pdf.args +23 -0
  18. data/bin/Image-ExifTool-9.33/config_files/ExifTool_config +299 -0
  19. data/bin/Image-ExifTool-9.33/config_files/convert_regions.config +81 -0
  20. data/bin/Image-ExifTool-9.33/exiftool +5715 -0
  21. data/bin/Image-ExifTool-9.33/fmt_files/gpx.fmt +29 -0
  22. data/bin/Image-ExifTool-9.33/fmt_files/gpx_wpt.fmt +33 -0
  23. data/bin/Image-ExifTool-9.33/fmt_files/kml.fmt +53 -0
  24. data/bin/Image-ExifTool-9.33/html/ExifTool.html +1959 -0
  25. data/bin/Image-ExifTool-9.33/html/MIE1.1-20070121.pdf +0 -0
  26. data/bin/Image-ExifTool-9.33/html/Shift.html +173 -0
  27. data/bin/Image-ExifTool-9.33/html/TagNames/AFCP.html +53 -0
  28. data/bin/Image-ExifTool-9.33/html/TagNames/AIFF.html +146 -0
  29. data/bin/Image-ExifTool-9.33/html/TagNames/APE.html +149 -0
  30. data/bin/Image-ExifTool-9.33/html/TagNames/APP12.html +188 -0
  31. data/bin/Image-ExifTool-9.33/html/TagNames/ASF.html +1066 -0
  32. data/bin/Image-ExifTool-9.33/html/TagNames/BMP.html +110 -0
  33. data/bin/Image-ExifTool-9.33/html/TagNames/Canon.html +8062 -0
  34. data/bin/Image-ExifTool-9.33/html/TagNames/CanonCustom.html +2044 -0
  35. data/bin/Image-ExifTool-9.33/html/TagNames/CanonRaw.html +561 -0
  36. data/bin/Image-ExifTool-9.33/html/TagNames/CanonVRD.html +1222 -0
  37. data/bin/Image-ExifTool-9.33/html/TagNames/Casio.html +1569 -0
  38. data/bin/Image-ExifTool-9.33/html/TagNames/Composite.html +665 -0
  39. data/bin/Image-ExifTool-9.33/html/TagNames/DICOM.html +15762 -0
  40. data/bin/Image-ExifTool-9.33/html/TagNames/DNG.html +273 -0
  41. data/bin/Image-ExifTool-9.33/html/TagNames/DV.html +75 -0
  42. data/bin/Image-ExifTool-9.33/html/TagNames/DarwinCore.html +1445 -0
  43. data/bin/Image-ExifTool-9.33/html/TagNames/DjVu.html +313 -0
  44. data/bin/Image-ExifTool-9.33/html/TagNames/EXE.html +697 -0
  45. data/bin/Image-ExifTool-9.33/html/TagNames/EXIF.html +3244 -0
  46. data/bin/Image-ExifTool-9.33/html/TagNames/Extra.html +301 -0
  47. data/bin/Image-ExifTool-9.33/html/TagNames/FLAC.html +183 -0
  48. data/bin/Image-ExifTool-9.33/html/TagNames/FLIR.html +931 -0
  49. data/bin/Image-ExifTool-9.33/html/TagNames/Flash.html +419 -0
  50. data/bin/Image-ExifTool-9.33/html/TagNames/FlashPix.html +1435 -0
  51. data/bin/Image-ExifTool-9.33/html/TagNames/Font.html +485 -0
  52. data/bin/Image-ExifTool-9.33/html/TagNames/FotoStation.html +103 -0
  53. data/bin/Image-ExifTool-9.33/html/TagNames/FujiFilm.html +637 -0
  54. data/bin/Image-ExifTool-9.33/html/TagNames/GE.html +40 -0
  55. data/bin/Image-ExifTool-9.33/html/TagNames/GIF.html +116 -0
  56. data/bin/Image-ExifTool-9.33/html/TagNames/GIMP.html +140 -0
  57. data/bin/Image-ExifTool-9.33/html/TagNames/GPS.html +222 -0
  58. data/bin/Image-ExifTool-9.33/html/TagNames/GeoTiff.html +2177 -0
  59. data/bin/Image-ExifTool-9.33/html/TagNames/H264.html +393 -0
  60. data/bin/Image-ExifTool-9.33/html/TagNames/HP.html +155 -0
  61. data/bin/Image-ExifTool-9.33/html/TagNames/HTML.html +666 -0
  62. data/bin/Image-ExifTool-9.33/html/TagNames/ICC_Profile.html +710 -0
  63. data/bin/Image-ExifTool-9.33/html/TagNames/ID3.html +1473 -0
  64. data/bin/Image-ExifTool-9.33/html/TagNames/IPTC.html +895 -0
  65. data/bin/Image-ExifTool-9.33/html/TagNames/ITC.html +90 -0
  66. data/bin/Image-ExifTool-9.33/html/TagNames/JFIF.html +61 -0
  67. data/bin/Image-ExifTool-9.33/html/TagNames/JPEG.html +523 -0
  68. data/bin/Image-ExifTool-9.33/html/TagNames/JVC.html +56 -0
  69. data/bin/Image-ExifTool-9.33/html/TagNames/Jpeg2000.html +464 -0
  70. data/bin/Image-ExifTool-9.33/html/TagNames/Kodak.html +1759 -0
  71. data/bin/Image-ExifTool-9.33/html/TagNames/KyoceraRaw.html +92 -0
  72. data/bin/Image-ExifTool-9.33/html/TagNames/LNK.html +478 -0
  73. data/bin/Image-ExifTool-9.33/html/TagNames/Leaf.html +870 -0
  74. data/bin/Image-ExifTool-9.33/html/TagNames/M2TS.html +133 -0
  75. data/bin/Image-ExifTool-9.33/html/TagNames/MIE.html +1026 -0
  76. data/bin/Image-ExifTool-9.33/html/TagNames/MIFF.html +196 -0
  77. data/bin/Image-ExifTool-9.33/html/TagNames/MNG.html +847 -0
  78. data/bin/Image-ExifTool-9.33/html/TagNames/MPC.html +97 -0
  79. data/bin/Image-ExifTool-9.33/html/TagNames/MPEG.html +249 -0
  80. data/bin/Image-ExifTool-9.33/html/TagNames/MPF.html +199 -0
  81. data/bin/Image-ExifTool-9.33/html/TagNames/MWG.html +563 -0
  82. data/bin/Image-ExifTool-9.33/html/TagNames/MXF.html +6673 -0
  83. data/bin/Image-ExifTool-9.33/html/TagNames/Matroska.html +1069 -0
  84. data/bin/Image-ExifTool-9.33/html/TagNames/Microsoft.html +2066 -0
  85. data/bin/Image-ExifTool-9.33/html/TagNames/Minolta.html +2555 -0
  86. data/bin/Image-ExifTool-9.33/html/TagNames/MinoltaRaw.html +326 -0
  87. data/bin/Image-ExifTool-9.33/html/TagNames/Nikon.html +4467 -0
  88. data/bin/Image-ExifTool-9.33/html/TagNames/NikonCapture.html +776 -0
  89. data/bin/Image-ExifTool-9.33/html/TagNames/NikonCustom.html +3835 -0
  90. data/bin/Image-ExifTool-9.33/html/TagNames/OOXML.html +280 -0
  91. data/bin/Image-ExifTool-9.33/html/TagNames/Ogg.html +44 -0
  92. data/bin/Image-ExifTool-9.33/html/TagNames/Olympus.html +3386 -0
  93. data/bin/Image-ExifTool-9.33/html/TagNames/OpenEXR.html +222 -0
  94. data/bin/Image-ExifTool-9.33/html/TagNames/PDF.html +745 -0
  95. data/bin/Image-ExifTool-9.33/html/TagNames/PGF.html +80 -0
  96. data/bin/Image-ExifTool-9.33/html/TagNames/PICT.html +753 -0
  97. data/bin/Image-ExifTool-9.33/html/TagNames/PLIST.html +86 -0
  98. data/bin/Image-ExifTool-9.33/html/TagNames/PNG.html +515 -0
  99. data/bin/Image-ExifTool-9.33/html/TagNames/PSP.html +160 -0
  100. data/bin/Image-ExifTool-9.33/html/TagNames/Panasonic.html +1452 -0
  101. data/bin/Image-ExifTool-9.33/html/TagNames/PanasonicRaw.html +214 -0
  102. data/bin/Image-ExifTool-9.33/html/TagNames/Pentax.html +4332 -0
  103. data/bin/Image-ExifTool-9.33/html/TagNames/PhaseOne.html +258 -0
  104. data/bin/Image-ExifTool-9.33/html/TagNames/PhotoCD.html +402 -0
  105. data/bin/Image-ExifTool-9.33/html/TagNames/PhotoMechanic.html +196 -0
  106. data/bin/Image-ExifTool-9.33/html/TagNames/Photoshop.html +555 -0
  107. data/bin/Image-ExifTool-9.33/html/TagNames/PostScript.html +125 -0
  108. data/bin/Image-ExifTool-9.33/html/TagNames/PrintIM.html +31 -0
  109. data/bin/Image-ExifTool-9.33/html/TagNames/Qualcomm.html +4778 -0
  110. data/bin/Image-ExifTool-9.33/html/TagNames/QuickTime.html +3104 -0
  111. data/bin/Image-ExifTool-9.33/html/TagNames/RIFF.html +1164 -0
  112. data/bin/Image-ExifTool-9.33/html/TagNames/RSRC.html +74 -0
  113. data/bin/Image-ExifTool-9.33/html/TagNames/RTF.html +150 -0
  114. data/bin/Image-ExifTool-9.33/html/TagNames/Radiance.html +87 -0
  115. data/bin/Image-ExifTool-9.33/html/TagNames/Rawzor.html +45 -0
  116. data/bin/Image-ExifTool-9.33/html/TagNames/Real.html +780 -0
  117. data/bin/Image-ExifTool-9.33/html/TagNames/Reconyx.html +132 -0
  118. data/bin/Image-ExifTool-9.33/html/TagNames/Ricoh.html +456 -0
  119. data/bin/Image-ExifTool-9.33/html/TagNames/Samsung.html +419 -0
  120. data/bin/Image-ExifTool-9.33/html/TagNames/Sanyo.html +366 -0
  121. data/bin/Image-ExifTool-9.33/html/TagNames/Shortcuts.html +237 -0
  122. data/bin/Image-ExifTool-9.33/html/TagNames/Sigma.html +372 -0
  123. data/bin/Image-ExifTool-9.33/html/TagNames/SigmaRaw.html +403 -0
  124. data/bin/Image-ExifTool-9.33/html/TagNames/Sony.html +4279 -0
  125. data/bin/Image-ExifTool-9.33/html/TagNames/SonyIDC.html +267 -0
  126. data/bin/Image-ExifTool-9.33/html/TagNames/Stim.html +200 -0
  127. data/bin/Image-ExifTool-9.33/html/TagNames/Theora.html +102 -0
  128. data/bin/Image-ExifTool-9.33/html/TagNames/Unknown.html +31 -0
  129. data/bin/Image-ExifTool-9.33/html/TagNames/Vorbis.html +228 -0
  130. data/bin/Image-ExifTool-9.33/html/TagNames/XMP.html +7234 -0
  131. data/bin/Image-ExifTool-9.33/html/TagNames/ZIP.html +204 -0
  132. data/bin/Image-ExifTool-9.33/html/TagNames/iWork.html +49 -0
  133. data/bin/Image-ExifTool-9.33/html/TagNames/index.html +192 -0
  134. data/bin/Image-ExifTool-9.33/html/TagNames/style.css +31 -0
  135. data/bin/Image-ExifTool-9.33/html/ancient_history.html +6727 -0
  136. data/bin/Image-ExifTool-9.33/html/canon_raw.html +366 -0
  137. data/bin/Image-ExifTool-9.33/html/commentary.html +319 -0
  138. data/bin/Image-ExifTool-9.33/html/config.html +312 -0
  139. data/bin/Image-ExifTool-9.33/html/data_members.html +265 -0
  140. data/bin/Image-ExifTool-9.33/html/exiftool_pod.html +2338 -0
  141. data/bin/Image-ExifTool-9.33/html/faq.html +1434 -0
  142. data/bin/Image-ExifTool-9.33/html/filename.html +281 -0
  143. data/bin/Image-ExifTool-9.33/html/geotag.html +642 -0
  144. data/bin/Image-ExifTool-9.33/html/history.html +358 -0
  145. data/bin/Image-ExifTool-9.33/html/htmldump.html +732 -0
  146. data/bin/Image-ExifTool-9.33/html/idiosyncracies.html +251 -0
  147. data/bin/Image-ExifTool-9.33/html/index.html +1271 -0
  148. data/bin/Image-ExifTool-9.33/html/install.html +239 -0
  149. data/bin/Image-ExifTool-9.33/html/metafiles.html +266 -0
  150. data/bin/Image-ExifTool-9.33/html/overview.png +0 -0
  151. data/bin/Image-ExifTool-9.33/html/standards.html +277 -0
  152. data/bin/Image-ExifTool-9.33/html/struct.html +342 -0
  153. data/bin/Image-ExifTool-9.33/html/style.css +31 -0
  154. data/bin/Image-ExifTool-9.33/html/under.html +124 -0
  155. data/bin/Image-ExifTool-9.33/html/verbose.html +195 -0
  156. data/bin/Image-ExifTool-9.33/html/writing.html +239 -0
  157. data/bin/Image-ExifTool-9.33/lib/File/RandomAccess.pm +378 -0
  158. data/bin/Image-ExifTool-9.33/lib/File/RandomAccess.pod +231 -0
  159. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool.pm +6815 -0
  160. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool.pod +2385 -0
  161. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/AES.pm +501 -0
  162. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/AFCP.pm +284 -0
  163. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/AIFF.pm +271 -0
  164. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/APE.pm +262 -0
  165. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/APP12.pm +322 -0
  166. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/ASF.pm +884 -0
  167. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/BMP.pm +179 -0
  168. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/BZZ.pm +472 -0
  169. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/BigTIFF.pm +282 -0
  170. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/BuildTagLookup.pm +2400 -0
  171. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Canon.pm +7794 -0
  172. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/CanonCustom.pm +2523 -0
  173. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/CanonRaw.pm +931 -0
  174. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/CanonVRD.pm +1481 -0
  175. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/CaptureOne.pm +235 -0
  176. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Casio.pm +2013 -0
  177. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Charset.pm +396 -0
  178. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Charset/Arabic.pm +39 -0
  179. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Charset/Baltic.pm +35 -0
  180. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Charset/Cyrillic.pm +45 -0
  181. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Charset/Greek.pm +40 -0
  182. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Charset/Hebrew.pm +36 -0
  183. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Charset/JIS.pm +1735 -0
  184. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Charset/Latin.pm +24 -0
  185. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Charset/Latin2.pm +36 -0
  186. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Charset/MacArabic.pm +47 -0
  187. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Charset/MacChineseCN.pm +2088 -0
  188. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Charset/MacChineseTW.pm +3623 -0
  189. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Charset/MacCroatian.pm +43 -0
  190. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Charset/MacCyrillic.pm +47 -0
  191. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Charset/MacGreek.pm +45 -0
  192. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Charset/MacHebrew.pm +47 -0
  193. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Charset/MacIceland.pm +42 -0
  194. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Charset/MacJapanese.pm +1933 -0
  195. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Charset/MacKorean.pm +2720 -0
  196. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Charset/MacLatin2.pm +44 -0
  197. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Charset/MacRSymbol.pm +2087 -0
  198. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Charset/MacRoman.pm +42 -0
  199. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Charset/MacRomanian.pm +42 -0
  200. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Charset/MacThai.pm +49 -0
  201. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Charset/MacTurkish.pm +42 -0
  202. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Charset/PDFDoc.pm +28 -0
  203. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Charset/ShiftJIS.pm +1835 -0
  204. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Charset/Symbol.pm +54 -0
  205. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Charset/Thai.pm +41 -0
  206. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Charset/Turkish.pm +25 -0
  207. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Charset/Vietnam.pm +27 -0
  208. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/DICOM.pm +3835 -0
  209. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/DNG.pm +835 -0
  210. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/DV.pm +319 -0
  211. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/DarwinCore.pm +317 -0
  212. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/DjVu.pm +376 -0
  213. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/EXE.pm +1228 -0
  214. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Exif.pm +4542 -0
  215. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/FLAC.pm +296 -0
  216. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/FLIR.pm +972 -0
  217. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Fixup.pm +354 -0
  218. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Flash.pm +755 -0
  219. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/FlashPix.pm +1882 -0
  220. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Font.pm +643 -0
  221. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/FotoStation.pm +258 -0
  222. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/FujiFilm.pm +1020 -0
  223. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/GE.pm +80 -0
  224. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/GIF.pm +542 -0
  225. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/GIMP.pm +258 -0
  226. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/GPS.pm +511 -0
  227. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/GeoTiff.pm +2187 -0
  228. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Geotag.pm +1173 -0
  229. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/H264.pm +1102 -0
  230. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/HP.pm +262 -0
  231. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/HTML.pm +576 -0
  232. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/HtmlDump.pm +895 -0
  233. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/ICC_Profile.pm +999 -0
  234. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/ID3.pm +1532 -0
  235. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/IPTC.pm +1244 -0
  236. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/ITC.pm +215 -0
  237. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Import.pm +308 -0
  238. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/InDesign.pm +277 -0
  239. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/JPEG.pm +588 -0
  240. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/JPEGDigest.pm +2511 -0
  241. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/JVC.pm +130 -0
  242. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Jpeg2000.pm +881 -0
  243. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Kodak.pm +2014 -0
  244. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/KyoceraRaw.pm +173 -0
  245. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/LNK.pm +723 -0
  246. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Lang/cs.pm +1586 -0
  247. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Lang/de.pm +7356 -0
  248. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Lang/en_ca.pm +557 -0
  249. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Lang/en_gb.pm +572 -0
  250. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Lang/es.pm +4016 -0
  251. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Lang/fi.pm +2856 -0
  252. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Lang/fr.pm +4720 -0
  253. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Lang/it.pm +7917 -0
  254. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Lang/ja.pm +5815 -0
  255. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Lang/ko.pm +2332 -0
  256. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Lang/nl.pm +3220 -0
  257. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Lang/pl.pm +1140 -0
  258. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Lang/ru.pm +769 -0
  259. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Lang/sv.pm +639 -0
  260. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Lang/tr.pm +544 -0
  261. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Lang/zh_cn.pm +1329 -0
  262. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Lang/zh_tw.pm +802 -0
  263. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Leaf.pm +515 -0
  264. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/M2TS.pm +729 -0
  265. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/MIE.pm +2561 -0
  266. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/MIEUnits.pod +377 -0
  267. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/MIFF.pm +279 -0
  268. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/MNG.pm +684 -0
  269. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/MPC.pm +156 -0
  270. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/MPEG.pm +736 -0
  271. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/MPF.pm +289 -0
  272. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/MWG.pm +736 -0
  273. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/MXF.pm +3032 -0
  274. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/MakerNotes.pm +1573 -0
  275. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Matroska.pm +891 -0
  276. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Microsoft.pm +879 -0
  277. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Minolta.pm +2833 -0
  278. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/MinoltaRaw.pm +534 -0
  279. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Nikon.pm +6116 -0
  280. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/NikonCapture.pm +911 -0
  281. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/NikonCustom.pm +4405 -0
  282. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/OOXML.pm +409 -0
  283. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Ogg.pm +237 -0
  284. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Olympus.pm +3582 -0
  285. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/OpenEXR.pm +324 -0
  286. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/PDF.pm +2327 -0
  287. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/PGF.pm +143 -0
  288. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/PICT.pm +1260 -0
  289. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/PLIST.pm +449 -0
  290. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/PNG.pm +1100 -0
  291. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/PPM.pm +169 -0
  292. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/PSP.pm +305 -0
  293. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Panasonic.pm +1995 -0
  294. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/PanasonicRaw.pm +535 -0
  295. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Pentax.pm +5489 -0
  296. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/PhaseOne.pm +557 -0
  297. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/PhotoCD.pm +507 -0
  298. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/PhotoMechanic.pm +256 -0
  299. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Photoshop.pm +629 -0
  300. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/PostScript.pm +693 -0
  301. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/PrintIM.pm +125 -0
  302. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Qualcomm.pm +1344 -0
  303. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/QuickTime.pm +3519 -0
  304. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/README +944 -0
  305. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/RIFF.pm +1322 -0
  306. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/RSRC.pm +241 -0
  307. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/RTF.pm +383 -0
  308. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Radiance.pm +144 -0
  309. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Rawzor.pm +190 -0
  310. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Real.pm +736 -0
  311. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Reconyx.pm +190 -0
  312. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Ricoh.pm +741 -0
  313. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Samsung.pm +820 -0
  314. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Sanyo.pm +439 -0
  315. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Shift.pl +594 -0
  316. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Shortcuts.pm +291 -0
  317. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Sigma.pm +574 -0
  318. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/SigmaRaw.pm +649 -0
  319. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Sony.pm +5722 -0
  320. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/SonyIDC.pm +330 -0
  321. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Stim.pm +196 -0
  322. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/TagInfoXML.pm +792 -0
  323. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/TagLookup.pm +8005 -0
  324. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/TagNames.pod +25950 -0
  325. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Theora.pm +145 -0
  326. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Unknown.pm +66 -0
  327. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Vorbis.pm +237 -0
  328. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/WriteCanonRaw.pl +637 -0
  329. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/WriteExif.pl +3674 -0
  330. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/WriteIPTC.pl +702 -0
  331. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/WritePDF.pl +759 -0
  332. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/WritePNG.pl +330 -0
  333. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/WritePhotoshop.pl +266 -0
  334. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/WritePostScript.pl +777 -0
  335. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/WriteXMP.pl +1318 -0
  336. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/Writer.pl +5779 -0
  337. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/XMP.pm +3634 -0
  338. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/XMP2.pl +1298 -0
  339. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/XMPStruct.pl +813 -0
  340. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/ZIP.pm +623 -0
  341. data/bin/Image-ExifTool-9.33/lib/Image/ExifTool/iWork.pm +223 -0
  342. data/bin/Image-ExifTool-9.33/perl-Image-ExifTool.spec +104 -0
  343. data/bin/Image-ExifTool-9.33/t/AFCP.t +44 -0
  344. data/bin/Image-ExifTool-9.33/t/AFCP_2.out +37 -0
  345. data/bin/Image-ExifTool-9.33/t/AFCP_3.out +20 -0
  346. data/bin/Image-ExifTool-9.33/t/AIFF.t +28 -0
  347. data/bin/Image-ExifTool-9.33/t/AIFF_2.out +31 -0
  348. data/bin/Image-ExifTool-9.33/t/APE.t +38 -0
  349. data/bin/Image-ExifTool-9.33/t/APE_2.out +28 -0
  350. data/bin/Image-ExifTool-9.33/t/APE_3.out +57 -0
  351. data/bin/Image-ExifTool-9.33/t/ASF.t +28 -0
  352. data/bin/Image-ExifTool-9.33/t/ASF_2.out +54 -0
  353. data/bin/Image-ExifTool-9.33/t/BMP.t +28 -0
  354. data/bin/Image-ExifTool-9.33/t/BMP_2.out +21 -0
  355. data/bin/Image-ExifTool-9.33/t/BigTIFF.t +28 -0
  356. data/bin/Image-ExifTool-9.33/t/BigTIFF_2.out +19 -0
  357. data/bin/Image-ExifTool-9.33/t/Canon.t +41 -0
  358. data/bin/Image-ExifTool-9.33/t/CanonRaw.t +126 -0
  359. data/bin/Image-ExifTool-9.33/t/CanonRaw_2.out +165 -0
  360. data/bin/Image-ExifTool-9.33/t/CanonRaw_4.out +217 -0
  361. data/bin/Image-ExifTool-9.33/t/CanonRaw_5.out +207 -0
  362. data/bin/Image-ExifTool-9.33/t/CanonRaw_6.out +231 -0
  363. data/bin/Image-ExifTool-9.33/t/CanonRaw_7.out +247 -0
  364. data/bin/Image-ExifTool-9.33/t/CanonVRD.t +129 -0
  365. data/bin/Image-ExifTool-9.33/t/CanonVRD_11.out +118 -0
  366. data/bin/Image-ExifTool-9.33/t/CanonVRD_12.out +12 -0
  367. data/bin/Image-ExifTool-9.33/t/CanonVRD_2.out +116 -0
  368. data/bin/Image-ExifTool-9.33/t/CanonVRD_3.out +116 -0
  369. data/bin/Image-ExifTool-9.33/t/CanonVRD_4.out +2 -0
  370. data/bin/Image-ExifTool-9.33/t/CanonVRD_5.out +3 -0
  371. data/bin/Image-ExifTool-9.33/t/CanonVRD_6.out +3 -0
  372. data/bin/Image-ExifTool-9.33/t/CanonVRD_7.out +2 -0
  373. data/bin/Image-ExifTool-9.33/t/CanonVRD_8.out +2 -0
  374. data/bin/Image-ExifTool-9.33/t/CanonVRD_9.out +1 -0
  375. data/bin/Image-ExifTool-9.33/t/Canon_2.out +350 -0
  376. data/bin/Image-ExifTool-9.33/t/Canon_3.out +3 -0
  377. data/bin/Image-ExifTool-9.33/t/Casio.t +54 -0
  378. data/bin/Image-ExifTool-9.33/t/Casio_2.out +70 -0
  379. data/bin/Image-ExifTool-9.33/t/Casio_3.out +100 -0
  380. data/bin/Image-ExifTool-9.33/t/Casio_4.out +26 -0
  381. data/bin/Image-ExifTool-9.33/t/Casio_5.out +78 -0
  382. data/bin/Image-ExifTool-9.33/t/Casio_6.out +115 -0
  383. data/bin/Image-ExifTool-9.33/t/DICOM.t +28 -0
  384. data/bin/Image-ExifTool-9.33/t/DICOM_2.out +108 -0
  385. data/bin/Image-ExifTool-9.33/t/DNG.t +39 -0
  386. data/bin/Image-ExifTool-9.33/t/DNG_2.out +326 -0
  387. data/bin/Image-ExifTool-9.33/t/DNG_3.out +4 -0
  388. data/bin/Image-ExifTool-9.33/t/DV.t +27 -0
  389. data/bin/Image-ExifTool-9.33/t/DV_2.out +24 -0
  390. data/bin/Image-ExifTool-9.33/t/DjVu.t +28 -0
  391. data/bin/Image-ExifTool-9.33/t/DjVu_2.out +44 -0
  392. data/bin/Image-ExifTool-9.33/t/EXE.t +31 -0
  393. data/bin/Image-ExifTool-9.33/t/EXE_2.out +40 -0
  394. data/bin/Image-ExifTool-9.33/t/EXE_3.out +15 -0
  395. data/bin/Image-ExifTool-9.33/t/EXE_4.out +14 -0
  396. data/bin/Image-ExifTool-9.33/t/ExifTool.t +284 -0
  397. data/bin/Image-ExifTool-9.33/t/ExifTool_16.out +180 -0
  398. data/bin/Image-ExifTool-9.33/t/ExifTool_17.out +594 -0
  399. data/bin/Image-ExifTool-9.33/t/ExifTool_2.out +399 -0
  400. data/bin/Image-ExifTool-9.33/t/ExifTool_20.out +1 -0
  401. data/bin/Image-ExifTool-9.33/t/ExifTool_21.out +1 -0
  402. data/bin/Image-ExifTool-9.33/t/ExifTool_22.out +1 -0
  403. data/bin/Image-ExifTool-9.33/t/ExifTool_23.out +6 -0
  404. data/bin/Image-ExifTool-9.33/t/ExifTool_24.out +3 -0
  405. data/bin/Image-ExifTool-9.33/t/ExifTool_25.out +13 -0
  406. data/bin/Image-ExifTool-9.33/t/ExifTool_26.out +12 -0
  407. data/bin/Image-ExifTool-9.33/t/ExifTool_3.out +87 -0
  408. data/bin/Image-ExifTool-9.33/t/ExifTool_4.out +41 -0
  409. data/bin/Image-ExifTool-9.33/t/ExifTool_5.out +6 -0
  410. data/bin/Image-ExifTool-9.33/t/ExifTool_6.out +68 -0
  411. data/bin/Image-ExifTool-9.33/t/ExifTool_7.out +125 -0
  412. data/bin/Image-ExifTool-9.33/t/ExifTool_8.out +125 -0
  413. data/bin/Image-ExifTool-9.33/t/ExifTool_9.out +33 -0
  414. data/bin/Image-ExifTool-9.33/t/FLAC.t +37 -0
  415. data/bin/Image-ExifTool-9.33/t/FLAC_2.out +25 -0
  416. data/bin/Image-ExifTool-9.33/t/FLAC_3.out +19 -0
  417. data/bin/Image-ExifTool-9.33/t/FLIR.t +30 -0
  418. data/bin/Image-ExifTool-9.33/t/FLIR_2.out +104 -0
  419. data/bin/Image-ExifTool-9.33/t/FLIR_3.out +47 -0
  420. data/bin/Image-ExifTool-9.33/t/Flash.t +37 -0
  421. data/bin/Image-ExifTool-9.33/t/FlashPix.t +30 -0
  422. data/bin/Image-ExifTool-9.33/t/FlashPix_2.out +48 -0
  423. data/bin/Image-ExifTool-9.33/t/Flash_2.out +20 -0
  424. data/bin/Image-ExifTool-9.33/t/Flash_3.out +53 -0
  425. data/bin/Image-ExifTool-9.33/t/Font.t +30 -0
  426. data/bin/Image-ExifTool-9.33/t/Font_2.out +23 -0
  427. data/bin/Image-ExifTool-9.33/t/Font_3.out +35 -0
  428. data/bin/Image-ExifTool-9.33/t/Font_4.out +26 -0
  429. data/bin/Image-ExifTool-9.33/t/Font_5.out +26 -0
  430. data/bin/Image-ExifTool-9.33/t/Font_6.out +36 -0
  431. data/bin/Image-ExifTool-9.33/t/Font_7.out +36 -0
  432. data/bin/Image-ExifTool-9.33/t/FotoStation.t +38 -0
  433. data/bin/Image-ExifTool-9.33/t/FotoStation_2.out +39 -0
  434. data/bin/Image-ExifTool-9.33/t/FotoStation_3.out +3 -0
  435. data/bin/Image-ExifTool-9.33/t/FujiFilm.t +78 -0
  436. data/bin/Image-ExifTool-9.33/t/FujiFilm_2.out +87 -0
  437. data/bin/Image-ExifTool-9.33/t/FujiFilm_3.out +88 -0
  438. data/bin/Image-ExifTool-9.33/t/FujiFilm_4.out +117 -0
  439. data/bin/Image-ExifTool-9.33/t/FujiFilm_5.out +1 -0
  440. data/bin/Image-ExifTool-9.33/t/GE.t +46 -0
  441. data/bin/Image-ExifTool-9.33/t/GE_2.out +84 -0
  442. data/bin/Image-ExifTool-9.33/t/GE_3.out +84 -0
  443. data/bin/Image-ExifTool-9.33/t/GIF.t +83 -0
  444. data/bin/Image-ExifTool-9.33/t/GIF_2.out +40 -0
  445. data/bin/Image-ExifTool-9.33/t/GIF_3.out +41 -0
  446. data/bin/Image-ExifTool-9.33/t/GIF_4.out +16 -0
  447. data/bin/Image-ExifTool-9.33/t/GIMP.t +27 -0
  448. data/bin/Image-ExifTool-9.33/t/GIMP_2.out +63 -0
  449. data/bin/Image-ExifTool-9.33/t/GPS.t +42 -0
  450. data/bin/Image-ExifTool-9.33/t/GPS_2.out +94 -0
  451. data/bin/Image-ExifTool-9.33/t/GPS_3.out +96 -0
  452. data/bin/Image-ExifTool-9.33/t/GeoTiff.t +36 -0
  453. data/bin/Image-ExifTool-9.33/t/GeoTiff_2.out +36 -0
  454. data/bin/Image-ExifTool-9.33/t/GeoTiff_3.out +36 -0
  455. data/bin/Image-ExifTool-9.33/t/Geotag.t +164 -0
  456. data/bin/Image-ExifTool-9.33/t/Geotag_2.out +9 -0
  457. data/bin/Image-ExifTool-9.33/t/Geotag_3.out +6 -0
  458. data/bin/Image-ExifTool-9.33/t/Geotag_5.out +1 -0
  459. data/bin/Image-ExifTool-9.33/t/Geotag_6.out +9 -0
  460. data/bin/Image-ExifTool-9.33/t/Geotag_7.out +53 -0
  461. data/bin/Image-ExifTool-9.33/t/Geotag_8.out +15 -0
  462. data/bin/Image-ExifTool-9.33/t/HTML.t +28 -0
  463. data/bin/Image-ExifTool-9.33/t/HTML_2.out +68 -0
  464. data/bin/Image-ExifTool-9.33/t/IPTC.t +157 -0
  465. data/bin/Image-ExifTool-9.33/t/IPTC_2.out +58 -0
  466. data/bin/Image-ExifTool-9.33/t/IPTC_4.out +56 -0
  467. data/bin/Image-ExifTool-9.33/t/IPTC_5.out +1 -0
  468. data/bin/Image-ExifTool-9.33/t/IPTC_6.out +2 -0
  469. data/bin/Image-ExifTool-9.33/t/IPTC_7.out +1 -0
  470. data/bin/Image-ExifTool-9.33/t/IPTC_8.out +20 -0
  471. data/bin/Image-ExifTool-9.33/t/ITC.t +28 -0
  472. data/bin/Image-ExifTool-9.33/t/ITC_2.out +19 -0
  473. data/bin/Image-ExifTool-9.33/t/InDesign.t +61 -0
  474. data/bin/Image-ExifTool-9.33/t/InDesign_2.out +19 -0
  475. data/bin/Image-ExifTool-9.33/t/InDesign_3.out +21 -0
  476. data/bin/Image-ExifTool-9.33/t/InDesign_4.out +11 -0
  477. data/bin/Image-ExifTool-9.33/t/JVC.t +36 -0
  478. data/bin/Image-ExifTool-9.33/t/JVC_2.out +3 -0
  479. data/bin/Image-ExifTool-9.33/t/JVC_3.out +3 -0
  480. data/bin/Image-ExifTool-9.33/t/Jpeg2000.t +49 -0
  481. data/bin/Image-ExifTool-9.33/t/Jpeg2000_2.out +63 -0
  482. data/bin/Image-ExifTool-9.33/t/Jpeg2000_3.out +51 -0
  483. data/bin/Image-ExifTool-9.33/t/Jpeg2000_4.out +15 -0
  484. data/bin/Image-ExifTool-9.33/t/Kodak.t +40 -0
  485. data/bin/Image-ExifTool-9.33/t/Kodak_2.out +109 -0
  486. data/bin/Image-ExifTool-9.33/t/Kodak_3.out +119 -0
  487. data/bin/Image-ExifTool-9.33/t/KyoceraRaw.t +28 -0
  488. data/bin/Image-ExifTool-9.33/t/KyoceraRaw_2.out +27 -0
  489. data/bin/Image-ExifTool-9.33/t/LNK.t +28 -0
  490. data/bin/Image-ExifTool-9.33/t/LNK_2.out +45 -0
  491. data/bin/Image-ExifTool-9.33/t/Lang.t +40 -0
  492. data/bin/Image-ExifTool-9.33/t/Lang_1.out +1 -0
  493. data/bin/Image-ExifTool-9.33/t/Lang_10.out +46 -0
  494. data/bin/Image-ExifTool-9.33/t/Lang_11.out +46 -0
  495. data/bin/Image-ExifTool-9.33/t/Lang_12.out +46 -0
  496. data/bin/Image-ExifTool-9.33/t/Lang_13.out +46 -0
  497. data/bin/Image-ExifTool-9.33/t/Lang_14.out +46 -0
  498. data/bin/Image-ExifTool-9.33/t/Lang_15.out +46 -0
  499. data/bin/Image-ExifTool-9.33/t/Lang_16.out +46 -0
  500. data/bin/Image-ExifTool-9.33/t/Lang_17.out +46 -0
  501. data/bin/Image-ExifTool-9.33/t/Lang_18.out +46 -0
  502. data/bin/Image-ExifTool-9.33/t/Lang_2.out +46 -0
  503. data/bin/Image-ExifTool-9.33/t/Lang_3.out +46 -0
  504. data/bin/Image-ExifTool-9.33/t/Lang_4.out +46 -0
  505. data/bin/Image-ExifTool-9.33/t/Lang_5.out +46 -0
  506. data/bin/Image-ExifTool-9.33/t/Lang_6.out +46 -0
  507. data/bin/Image-ExifTool-9.33/t/Lang_7.out +46 -0
  508. data/bin/Image-ExifTool-9.33/t/Lang_8.out +46 -0
  509. data/bin/Image-ExifTool-9.33/t/Lang_9.out +46 -0
  510. data/bin/Image-ExifTool-9.33/t/M2TS.t +29 -0
  511. data/bin/Image-ExifTool-9.33/t/M2TS_2.out +27 -0
  512. data/bin/Image-ExifTool-9.33/t/MIE.t +82 -0
  513. data/bin/Image-ExifTool-9.33/t/MIE_2.out +67 -0
  514. data/bin/Image-ExifTool-9.33/t/MIE_3.out +134 -0
  515. data/bin/Image-ExifTool-9.33/t/MIE_5.out +1 -0
  516. data/bin/Image-ExifTool-9.33/t/MIE_6.out +1 -0
  517. data/bin/Image-ExifTool-9.33/t/MIFF.t +28 -0
  518. data/bin/Image-ExifTool-9.33/t/MIFF_2.out +108 -0
  519. data/bin/Image-ExifTool-9.33/t/MP3.t +29 -0
  520. data/bin/Image-ExifTool-9.33/t/MP3_2.out +45 -0
  521. data/bin/Image-ExifTool-9.33/t/MWG.t +72 -0
  522. data/bin/Image-ExifTool-9.33/t/MWG_2.out +13 -0
  523. data/bin/Image-ExifTool-9.33/t/MWG_3.out +8 -0
  524. data/bin/Image-ExifTool-9.33/t/MWG_4.out +5 -0
  525. data/bin/Image-ExifTool-9.33/t/MWG_5.out +22 -0
  526. data/bin/Image-ExifTool-9.33/t/MXF.t +27 -0
  527. data/bin/Image-ExifTool-9.33/t/MXF_2.out +78 -0
  528. data/bin/Image-ExifTool-9.33/t/Matroska.t +29 -0
  529. data/bin/Image-ExifTool-9.33/t/Matroska_2.out +64 -0
  530. data/bin/Image-ExifTool-9.33/t/Minolta.t +50 -0
  531. data/bin/Image-ExifTool-9.33/t/Minolta_2.out +133 -0
  532. data/bin/Image-ExifTool-9.33/t/Minolta_3.out +146 -0
  533. data/bin/Image-ExifTool-9.33/t/Minolta_4.out +148 -0
  534. data/bin/Image-ExifTool-9.33/t/Nikon.t +114 -0
  535. data/bin/Image-ExifTool-9.33/t/Nikon_2.out +82 -0
  536. data/bin/Image-ExifTool-9.33/t/Nikon_3.out +98 -0
  537. data/bin/Image-ExifTool-9.33/t/Nikon_4.out +174 -0
  538. data/bin/Image-ExifTool-9.33/t/Nikon_5.out +167 -0
  539. data/bin/Image-ExifTool-9.33/t/Nikon_7.out +260 -0
  540. data/bin/Image-ExifTool-9.33/t/Nikon_8.out +4 -0
  541. data/bin/Image-ExifTool-9.33/t/Olympus.t +85 -0
  542. data/bin/Image-ExifTool-9.33/t/Olympus_2.out +79 -0
  543. data/bin/Image-ExifTool-9.33/t/Olympus_3.out +81 -0
  544. data/bin/Image-ExifTool-9.33/t/Olympus_4.out +192 -0
  545. data/bin/Image-ExifTool-9.33/t/Olympus_5.out +264 -0
  546. data/bin/Image-ExifTool-9.33/t/Olympus_6.out +151 -0
  547. data/bin/Image-ExifTool-9.33/t/Olympus_7.out +482 -0
  548. data/bin/Image-ExifTool-9.33/t/OpenEXR.t +28 -0
  549. data/bin/Image-ExifTool-9.33/t/OpenEXR_2.out +23 -0
  550. data/bin/Image-ExifTool-9.33/t/PDF.t +295 -0
  551. data/bin/Image-ExifTool-9.33/t/PDF_10.out +10 -0
  552. data/bin/Image-ExifTool-9.33/t/PDF_11.out +10 -0
  553. data/bin/Image-ExifTool-9.33/t/PDF_12.out +9 -0
  554. data/bin/Image-ExifTool-9.33/t/PDF_14.out +5 -0
  555. data/bin/Image-ExifTool-9.33/t/PDF_15.out +6 -0
  556. data/bin/Image-ExifTool-9.33/t/PDF_16.out +4 -0
  557. data/bin/Image-ExifTool-9.33/t/PDF_17.out +4 -0
  558. data/bin/Image-ExifTool-9.33/t/PDF_18.out +5 -0
  559. data/bin/Image-ExifTool-9.33/t/PDF_19.out +6 -0
  560. data/bin/Image-ExifTool-9.33/t/PDF_2.out +117 -0
  561. data/bin/Image-ExifTool-9.33/t/PDF_20.out +4 -0
  562. data/bin/Image-ExifTool-9.33/t/PDF_22.out +3 -0
  563. data/bin/Image-ExifTool-9.33/t/PDF_4.out +12 -0
  564. data/bin/Image-ExifTool-9.33/t/PDF_5.out +8 -0
  565. data/bin/Image-ExifTool-9.33/t/PDF_6.out +9 -0
  566. data/bin/Image-ExifTool-9.33/t/PDF_7.out +11 -0
  567. data/bin/Image-ExifTool-9.33/t/PDF_8.out +9 -0
  568. data/bin/Image-ExifTool-9.33/t/PDF_9.out +9 -0
  569. data/bin/Image-ExifTool-9.33/t/PGF.t +28 -0
  570. data/bin/Image-ExifTool-9.33/t/PGF_2.out +32 -0
  571. data/bin/Image-ExifTool-9.33/t/PICT.t +28 -0
  572. data/bin/Image-ExifTool-9.33/t/PICT_2.out +15 -0
  573. data/bin/Image-ExifTool-9.33/t/PLIST.t +31 -0
  574. data/bin/Image-ExifTool-9.33/t/PLIST_2.out +20 -0
  575. data/bin/Image-ExifTool-9.33/t/PLIST_3.out +20 -0
  576. data/bin/Image-ExifTool-9.33/t/PNG.t +75 -0
  577. data/bin/Image-ExifTool-9.33/t/PNG_2.out +22 -0
  578. data/bin/Image-ExifTool-9.33/t/PNG_3.out +118 -0
  579. data/bin/Image-ExifTool-9.33/t/PNG_4.out +12 -0
  580. data/bin/Image-ExifTool-9.33/t/PPM.t +40 -0
  581. data/bin/Image-ExifTool-9.33/t/PPM_2.out +15 -0
  582. data/bin/Image-ExifTool-9.33/t/PPM_3.out +9 -0
  583. data/bin/Image-ExifTool-9.33/t/PSP.t +28 -0
  584. data/bin/Image-ExifTool-9.33/t/PSP_2.out +32 -0
  585. data/bin/Image-ExifTool-9.33/t/Panasonic.t +60 -0
  586. data/bin/Image-ExifTool-9.33/t/Panasonic_2.out +99 -0
  587. data/bin/Image-ExifTool-9.33/t/Panasonic_3.out +119 -0
  588. data/bin/Image-ExifTool-9.33/t/Panasonic_4.out +177 -0
  589. data/bin/Image-ExifTool-9.33/t/Panasonic_5.out +228 -0
  590. data/bin/Image-ExifTool-9.33/t/Pentax.t +50 -0
  591. data/bin/Image-ExifTool-9.33/t/Pentax_2.out +219 -0
  592. data/bin/Image-ExifTool-9.33/t/Pentax_3.out +262 -0
  593. data/bin/Image-ExifTool-9.33/t/Pentax_4.out +123 -0
  594. data/bin/Image-ExifTool-9.33/t/PhotoCD.t +28 -0
  595. data/bin/Image-ExifTool-9.33/t/PhotoCD_2.out +35 -0
  596. data/bin/Image-ExifTool-9.33/t/PhotoMechanic.t +38 -0
  597. data/bin/Image-ExifTool-9.33/t/PhotoMechanic_2.out +81 -0
  598. data/bin/Image-ExifTool-9.33/t/PhotoMechanic_3.out +2 -0
  599. data/bin/Image-ExifTool-9.33/t/Photoshop.t +42 -0
  600. data/bin/Image-ExifTool-9.33/t/Photoshop_2.out +96 -0
  601. data/bin/Image-ExifTool-9.33/t/Photoshop_3.out +108 -0
  602. data/bin/Image-ExifTool-9.33/t/PostScript.t +49 -0
  603. data/bin/Image-ExifTool-9.33/t/PostScript_2.out +64 -0
  604. data/bin/Image-ExifTool-9.33/t/PostScript_3.out +132 -0
  605. data/bin/Image-ExifTool-9.33/t/QuickTime.t +31 -0
  606. data/bin/Image-ExifTool-9.33/t/QuickTime_2.out +128 -0
  607. data/bin/Image-ExifTool-9.33/t/QuickTime_3.out +69 -0
  608. data/bin/Image-ExifTool-9.33/t/RIFF.t +31 -0
  609. data/bin/Image-ExifTool-9.33/t/RIFF_2.out +24 -0
  610. data/bin/Image-ExifTool-9.33/t/RIFF_3.out +52 -0
  611. data/bin/Image-ExifTool-9.33/t/RIFF_4.out +16 -0
  612. data/bin/Image-ExifTool-9.33/t/RTF.t +27 -0
  613. data/bin/Image-ExifTool-9.33/t/RTF_2.out +20 -0
  614. data/bin/Image-ExifTool-9.33/t/Radiance.t +28 -0
  615. data/bin/Image-ExifTool-9.33/t/Radiance_2.out +22 -0
  616. data/bin/Image-ExifTool-9.33/t/Real.t +46 -0
  617. data/bin/Image-ExifTool-9.33/t/Real_2.out +68 -0
  618. data/bin/Image-ExifTool-9.33/t/Real_3.out +18 -0
  619. data/bin/Image-ExifTool-9.33/t/Real_4.out +11 -0
  620. data/bin/Image-ExifTool-9.33/t/Ricoh.t +47 -0
  621. data/bin/Image-ExifTool-9.33/t/Ricoh_2.out +70 -0
  622. data/bin/Image-ExifTool-9.33/t/Ricoh_3.out +98 -0
  623. data/bin/Image-ExifTool-9.33/t/Ricoh_4.out +112 -0
  624. data/bin/Image-ExifTool-9.33/t/Sanyo.t +39 -0
  625. data/bin/Image-ExifTool-9.33/t/Sanyo_2.out +101 -0
  626. data/bin/Image-ExifTool-9.33/t/Sanyo_3.out +111 -0
  627. data/bin/Image-ExifTool-9.33/t/Sigma.t +60 -0
  628. data/bin/Image-ExifTool-9.33/t/Sigma_2.out +91 -0
  629. data/bin/Image-ExifTool-9.33/t/Sigma_3.out +94 -0
  630. data/bin/Image-ExifTool-9.33/t/Sigma_4.out +63 -0
  631. data/bin/Image-ExifTool-9.33/t/Sigma_5.out +192 -0
  632. data/bin/Image-ExifTool-9.33/t/Sony.t +62 -0
  633. data/bin/Image-ExifTool-9.33/t/Sony_2.out +84 -0
  634. data/bin/Image-ExifTool-9.33/t/Sony_3.out +85 -0
  635. data/bin/Image-ExifTool-9.33/t/Sony_5.out +32 -0
  636. data/bin/Image-ExifTool-9.33/t/TestLib.pm +417 -0
  637. data/bin/Image-ExifTool-9.33/t/Unknown.t +36 -0
  638. data/bin/Image-ExifTool-9.33/t/Unknown_2.out +90 -0
  639. data/bin/Image-ExifTool-9.33/t/Unknown_3.out +90 -0
  640. data/bin/Image-ExifTool-9.33/t/Vorbis.t +28 -0
  641. data/bin/Image-ExifTool-9.33/t/Vorbis_2.out +28 -0
  642. data/bin/Image-ExifTool-9.33/t/Writer.t +913 -0
  643. data/bin/Image-ExifTool-9.33/t/Writer_10.out +240 -0
  644. data/bin/Image-ExifTool-9.33/t/Writer_11.out +37 -0
  645. data/bin/Image-ExifTool-9.33/t/Writer_13.out +160 -0
  646. data/bin/Image-ExifTool-9.33/t/Writer_14.out +67 -0
  647. data/bin/Image-ExifTool-9.33/t/Writer_15.out +171 -0
  648. data/bin/Image-ExifTool-9.33/t/Writer_16.out +1 -0
  649. data/bin/Image-ExifTool-9.33/t/Writer_17.out +1 -0
  650. data/bin/Image-ExifTool-9.33/t/Writer_18.out +3 -0
  651. data/bin/Image-ExifTool-9.33/t/Writer_19.out +34 -0
  652. data/bin/Image-ExifTool-9.33/t/Writer_2.out +168 -0
  653. data/bin/Image-ExifTool-9.33/t/Writer_22.out +4 -0
  654. data/bin/Image-ExifTool-9.33/t/Writer_24.out +1 -0
  655. data/bin/Image-ExifTool-9.33/t/Writer_25.out +38 -0
  656. data/bin/Image-ExifTool-9.33/t/Writer_26.out +32 -0
  657. data/bin/Image-ExifTool-9.33/t/Writer_27.out +14 -0
  658. data/bin/Image-ExifTool-9.33/t/Writer_28.out +1 -0
  659. data/bin/Image-ExifTool-9.33/t/Writer_29.out +2 -0
  660. data/bin/Image-ExifTool-9.33/t/Writer_30.out +2 -0
  661. data/bin/Image-ExifTool-9.33/t/Writer_31.out +97 -0
  662. data/bin/Image-ExifTool-9.33/t/Writer_32.out +3 -0
  663. data/bin/Image-ExifTool-9.33/t/Writer_33.out +3 -0
  664. data/bin/Image-ExifTool-9.33/t/Writer_34.out +3 -0
  665. data/bin/Image-ExifTool-9.33/t/Writer_35.out +187 -0
  666. data/bin/Image-ExifTool-9.33/t/Writer_36.out +2 -0
  667. data/bin/Image-ExifTool-9.33/t/Writer_37.out +2 -0
  668. data/bin/Image-ExifTool-9.33/t/Writer_38.out +62 -0
  669. data/bin/Image-ExifTool-9.33/t/Writer_39.out +4 -0
  670. data/bin/Image-ExifTool-9.33/t/Writer_4.out +85 -0
  671. data/bin/Image-ExifTool-9.33/t/Writer_40.out +4 -0
  672. data/bin/Image-ExifTool-9.33/t/Writer_41.out +3 -0
  673. data/bin/Image-ExifTool-9.33/t/Writer_42.out +5 -0
  674. data/bin/Image-ExifTool-9.33/t/Writer_43.out +5 -0
  675. data/bin/Image-ExifTool-9.33/t/Writer_44.out +2 -0
  676. data/bin/Image-ExifTool-9.33/t/Writer_45.out +1 -0
  677. data/bin/Image-ExifTool-9.33/t/Writer_46.out +77 -0
  678. data/bin/Image-ExifTool-9.33/t/Writer_47.out +56 -0
  679. data/bin/Image-ExifTool-9.33/t/Writer_48.out +29 -0
  680. data/bin/Image-ExifTool-9.33/t/Writer_50.out +3 -0
  681. data/bin/Image-ExifTool-9.33/t/Writer_51.out +386 -0
  682. data/bin/Image-ExifTool-9.33/t/Writer_6.out +182 -0
  683. data/bin/Image-ExifTool-9.33/t/Writer_7.out +149 -0
  684. data/bin/Image-ExifTool-9.33/t/Writer_9.out +237 -0
  685. data/bin/Image-ExifTool-9.33/t/XMP.t +521 -0
  686. data/bin/Image-ExifTool-9.33/t/XMP_10.out +33 -0
  687. data/bin/Image-ExifTool-9.33/t/XMP_11.out +59 -0
  688. data/bin/Image-ExifTool-9.33/t/XMP_12.out +4 -0
  689. data/bin/Image-ExifTool-9.33/t/XMP_13.out +5 -0
  690. data/bin/Image-ExifTool-9.33/t/XMP_14.out +3 -0
  691. data/bin/Image-ExifTool-9.33/t/XMP_15.out +3 -0
  692. data/bin/Image-ExifTool-9.33/t/XMP_16.out +5 -0
  693. data/bin/Image-ExifTool-9.33/t/XMP_17.out +6 -0
  694. data/bin/Image-ExifTool-9.33/t/XMP_18.out +10 -0
  695. data/bin/Image-ExifTool-9.33/t/XMP_19.out +35 -0
  696. data/bin/Image-ExifTool-9.33/t/XMP_2.out +138 -0
  697. data/bin/Image-ExifTool-9.33/t/XMP_20.out +35 -0
  698. data/bin/Image-ExifTool-9.33/t/XMP_21.out +38 -0
  699. data/bin/Image-ExifTool-9.33/t/XMP_22.out +38 -0
  700. data/bin/Image-ExifTool-9.33/t/XMP_23.out +9 -0
  701. data/bin/Image-ExifTool-9.33/t/XMP_24.out +31 -0
  702. data/bin/Image-ExifTool-9.33/t/XMP_25.out +28 -0
  703. data/bin/Image-ExifTool-9.33/t/XMP_26.out +52 -0
  704. data/bin/Image-ExifTool-9.33/t/XMP_27.out +93 -0
  705. data/bin/Image-ExifTool-9.33/t/XMP_28.out +44 -0
  706. data/bin/Image-ExifTool-9.33/t/XMP_29.out +24 -0
  707. data/bin/Image-ExifTool-9.33/t/XMP_3.out +136 -0
  708. data/bin/Image-ExifTool-9.33/t/XMP_30.out +90 -0
  709. data/bin/Image-ExifTool-9.33/t/XMP_31.out +19 -0
  710. data/bin/Image-ExifTool-9.33/t/XMP_32.out +2 -0
  711. data/bin/Image-ExifTool-9.33/t/XMP_34.out +2 -0
  712. data/bin/Image-ExifTool-9.33/t/XMP_36.out +18 -0
  713. data/bin/Image-ExifTool-9.33/t/XMP_37.out +35 -0
  714. data/bin/Image-ExifTool-9.33/t/XMP_39.out +44 -0
  715. data/bin/Image-ExifTool-9.33/t/XMP_40.out +3 -0
  716. data/bin/Image-ExifTool-9.33/t/XMP_41.out +175 -0
  717. data/bin/Image-ExifTool-9.33/t/XMP_5.out +29 -0
  718. data/bin/Image-ExifTool-9.33/t/XMP_6.out +87 -0
  719. data/bin/Image-ExifTool-9.33/t/XMP_7.out +118 -0
  720. data/bin/Image-ExifTool-9.33/t/XMP_8.out +17 -0
  721. data/bin/Image-ExifTool-9.33/t/XMP_9.out +36 -0
  722. data/bin/Image-ExifTool-9.33/t/ZIP.t +69 -0
  723. data/bin/Image-ExifTool-9.33/t/ZIP_2.out +18 -0
  724. data/bin/Image-ExifTool-9.33/t/ZIP_3.out +17 -0
  725. data/bin/Image-ExifTool-9.33/t/ZIP_4.out +213 -0
  726. data/bin/Image-ExifTool-9.33/t/ZIP_5.out +134 -0
  727. data/bin/Image-ExifTool-9.33/t/ZIP_6.out +49 -0
  728. data/bin/Image-ExifTool-9.33/t/ZIP_7.out +28 -0
  729. data/bin/Image-ExifTool-9.33/t/images/AFCP.jpg +0 -0
  730. data/bin/Image-ExifTool-9.33/t/images/AIFF.aif +0 -0
  731. data/bin/Image-ExifTool-9.33/t/images/APE.ape +0 -0
  732. data/bin/Image-ExifTool-9.33/t/images/APE.mpc +0 -0
  733. data/bin/Image-ExifTool-9.33/t/images/ASF.wmv +0 -0
  734. data/bin/Image-ExifTool-9.33/t/images/BMP.bmp +0 -0
  735. data/bin/Image-ExifTool-9.33/t/images/BigTIFF.btf +0 -0
  736. data/bin/Image-ExifTool-9.33/t/images/Canon.jpg +0 -0
  737. data/bin/Image-ExifTool-9.33/t/images/Canon1DmkIII.jpg +0 -0
  738. data/bin/Image-ExifTool-9.33/t/images/CanonRaw.cr2 +0 -0
  739. data/bin/Image-ExifTool-9.33/t/images/CanonRaw.crw +0 -0
  740. data/bin/Image-ExifTool-9.33/t/images/CanonVRD.vrd +0 -0
  741. data/bin/Image-ExifTool-9.33/t/images/CaptureOne.eip +0 -0
  742. data/bin/Image-ExifTool-9.33/t/images/Casio.jpg +0 -0
  743. data/bin/Image-ExifTool-9.33/t/images/Casio2.jpg +0 -0
  744. data/bin/Image-ExifTool-9.33/t/images/CasioQVCI.jpg +0 -0
  745. data/bin/Image-ExifTool-9.33/t/images/DICOM.dcm +0 -0
  746. data/bin/Image-ExifTool-9.33/t/images/DNG.dng +0 -0
  747. data/bin/Image-ExifTool-9.33/t/images/DV.dv +0 -0
  748. data/bin/Image-ExifTool-9.33/t/images/DjVu.djvu +0 -0
  749. data/bin/Image-ExifTool-9.33/t/images/EXE.elf +0 -0
  750. data/bin/Image-ExifTool-9.33/t/images/EXE.exe +0 -0
  751. data/bin/Image-ExifTool-9.33/t/images/EXE.macho +0 -0
  752. data/bin/Image-ExifTool-9.33/t/images/ExifTool.jpg +0 -0
  753. data/bin/Image-ExifTool-9.33/t/images/ExifTool.tif +0 -0
  754. data/bin/Image-ExifTool-9.33/t/images/ExtendedXMP.jpg +0 -0
  755. data/bin/Image-ExifTool-9.33/t/images/FLAC.flac +0 -0
  756. data/bin/Image-ExifTool-9.33/t/images/FLAC.ogg +0 -0
  757. data/bin/Image-ExifTool-9.33/t/images/FLIR.fpf +0 -0
  758. data/bin/Image-ExifTool-9.33/t/images/FLIR.jpg +0 -0
  759. data/bin/Image-ExifTool-9.33/t/images/Flash.flv +0 -0
  760. data/bin/Image-ExifTool-9.33/t/images/Flash.swf +0 -0
  761. data/bin/Image-ExifTool-9.33/t/images/FlashPix.ppt +0 -0
  762. data/bin/Image-ExifTool-9.33/t/images/Font.afm +28 -0
  763. data/bin/Image-ExifTool-9.33/t/images/Font.dfont +0 -0
  764. data/bin/Image-ExifTool-9.33/t/images/Font.pfa +38 -0
  765. data/bin/Image-ExifTool-9.33/t/images/Font.pfb +0 -0
  766. data/bin/Image-ExifTool-9.33/t/images/Font.pfm +0 -0
  767. data/bin/Image-ExifTool-9.33/t/images/Font.ttf +0 -0
  768. data/bin/Image-ExifTool-9.33/t/images/FotoStation.jpg +0 -0
  769. data/bin/Image-ExifTool-9.33/t/images/FujiFilm.jpg +0 -0
  770. data/bin/Image-ExifTool-9.33/t/images/FujiFilm.raf +0 -0
  771. data/bin/Image-ExifTool-9.33/t/images/GE.jpg +0 -0
  772. data/bin/Image-ExifTool-9.33/t/images/GIF.gif +0 -0
  773. data/bin/Image-ExifTool-9.33/t/images/GIMP.xcf +0 -0
  774. data/bin/Image-ExifTool-9.33/t/images/GPS.jpg +0 -0
  775. data/bin/Image-ExifTool-9.33/t/images/GeoTiff.tif +0 -0
  776. data/bin/Image-ExifTool-9.33/t/images/Geotag.gpx +23 -0
  777. data/bin/Image-ExifTool-9.33/t/images/Geotag.igc +24 -0
  778. data/bin/Image-ExifTool-9.33/t/images/Geotag.log +13 -0
  779. data/bin/Image-ExifTool-9.33/t/images/Geotag.xml +23 -0
  780. data/bin/Image-ExifTool-9.33/t/images/Geotag2.log +7 -0
  781. data/bin/Image-ExifTool-9.33/t/images/HTML.html +77 -0
  782. data/bin/Image-ExifTool-9.33/t/images/IPTC.jpg +0 -0
  783. data/bin/Image-ExifTool-9.33/t/images/ITC.itc +0 -0
  784. data/bin/Image-ExifTool-9.33/t/images/InDesign.indd +0 -0
  785. data/bin/Image-ExifTool-9.33/t/images/JVC.jpg +0 -0
  786. data/bin/Image-ExifTool-9.33/t/images/JVC2.jpg +0 -0
  787. data/bin/Image-ExifTool-9.33/t/images/Jpeg2000.j2c +0 -0
  788. data/bin/Image-ExifTool-9.33/t/images/Jpeg2000.jp2 +0 -0
  789. data/bin/Image-ExifTool-9.33/t/images/Kodak.jpg +0 -0
  790. data/bin/Image-ExifTool-9.33/t/images/KyoceraRaw.raw +0 -0
  791. data/bin/Image-ExifTool-9.33/t/images/LNK.lnk +0 -0
  792. data/bin/Image-ExifTool-9.33/t/images/M2TS.mts +0 -0
  793. data/bin/Image-ExifTool-9.33/t/images/MIE.mie +0 -0
  794. data/bin/Image-ExifTool-9.33/t/images/MIFF.miff +0 -0
  795. data/bin/Image-ExifTool-9.33/t/images/MP3.mp3 +0 -0
  796. data/bin/Image-ExifTool-9.33/t/images/MWG.jpg +0 -0
  797. data/bin/Image-ExifTool-9.33/t/images/MXF.mxf +0 -0
  798. data/bin/Image-ExifTool-9.33/t/images/Matroska.mkv +0 -0
  799. data/bin/Image-ExifTool-9.33/t/images/Minolta.jpg +0 -0
  800. data/bin/Image-ExifTool-9.33/t/images/Minolta.mrw +0 -0
  801. data/bin/Image-ExifTool-9.33/t/images/Nikon.jpg +0 -0
  802. data/bin/Image-ExifTool-9.33/t/images/Nikon.nef +0 -0
  803. data/bin/Image-ExifTool-9.33/t/images/NikonD2Hs.jpg +0 -0
  804. data/bin/Image-ExifTool-9.33/t/images/NikonD70.jpg +0 -0
  805. data/bin/Image-ExifTool-9.33/t/images/OOXML.docx +0 -0
  806. data/bin/Image-ExifTool-9.33/t/images/Olympus.jpg +0 -0
  807. data/bin/Image-ExifTool-9.33/t/images/Olympus2.jpg +0 -0
  808. data/bin/Image-ExifTool-9.33/t/images/OlympusE1.jpg +0 -0
  809. data/bin/Image-ExifTool-9.33/t/images/OpenDoc.ods +0 -0
  810. data/bin/Image-ExifTool-9.33/t/images/OpenEXR.exr +0 -0
  811. data/bin/Image-ExifTool-9.33/t/images/PDF.pdf +0 -0
  812. data/bin/Image-ExifTool-9.33/t/images/PDF2.pdf +0 -0
  813. data/bin/Image-ExifTool-9.33/t/images/PGF.pgf +0 -0
  814. data/bin/Image-ExifTool-9.33/t/images/PICT.pict +0 -0
  815. data/bin/Image-ExifTool-9.33/t/images/PLIST-bin.plist +0 -0
  816. data/bin/Image-ExifTool-9.33/t/images/PLIST-xml.plist +35 -0
  817. data/bin/Image-ExifTool-9.33/t/images/PNG.png +0 -0
  818. data/bin/Image-ExifTool-9.33/t/images/PPM.ppm +5 -0
  819. data/bin/Image-ExifTool-9.33/t/images/PSP.psp +0 -0
  820. data/bin/Image-ExifTool-9.33/t/images/Panasonic.jpg +0 -0
  821. data/bin/Image-ExifTool-9.33/t/images/Panasonic.rw2 +0 -0
  822. data/bin/Image-ExifTool-9.33/t/images/Pentax.avi +0 -0
  823. data/bin/Image-ExifTool-9.33/t/images/Pentax.jpg +0 -0
  824. data/bin/Image-ExifTool-9.33/t/images/PhotoCD.pcd +0 -0
  825. data/bin/Image-ExifTool-9.33/t/images/PhotoMechanic.jpg +0 -0
  826. data/bin/Image-ExifTool-9.33/t/images/Photoshop.psd +0 -0
  827. data/bin/Image-ExifTool-9.33/t/images/PostScript.eps +108 -0
  828. data/bin/Image-ExifTool-9.33/t/images/QuickTime.m4a +0 -0
  829. data/bin/Image-ExifTool-9.33/t/images/QuickTime.mov +0 -0
  830. data/bin/Image-ExifTool-9.33/t/images/RIFF.avi +0 -0
  831. data/bin/Image-ExifTool-9.33/t/images/RIFF.wav +0 -0
  832. data/bin/Image-ExifTool-9.33/t/images/RIFF.webp +0 -0
  833. data/bin/Image-ExifTool-9.33/t/images/RTF.rtf +25 -0
  834. data/bin/Image-ExifTool-9.33/t/images/Radiance.hdr +0 -0
  835. data/bin/Image-ExifTool-9.33/t/images/Real.ra +0 -0
  836. data/bin/Image-ExifTool-9.33/t/images/Real.ram +1 -0
  837. data/bin/Image-ExifTool-9.33/t/images/Real.rm +0 -0
  838. data/bin/Image-ExifTool-9.33/t/images/Ricoh.jpg +0 -0
  839. data/bin/Image-ExifTool-9.33/t/images/Ricoh2.jpg +0 -0
  840. data/bin/Image-ExifTool-9.33/t/images/Sanyo.jpg +0 -0
  841. data/bin/Image-ExifTool-9.33/t/images/Sigma.jpg +0 -0
  842. data/bin/Image-ExifTool-9.33/t/images/Sigma.x3f +0 -0
  843. data/bin/Image-ExifTool-9.33/t/images/SigmaDP2.x3f +0 -0
  844. data/bin/Image-ExifTool-9.33/t/images/Sony.jpg +0 -0
  845. data/bin/Image-ExifTool-9.33/t/images/Sony.pmp +0 -0
  846. data/bin/Image-ExifTool-9.33/t/images/Unknown.jpg +0 -0
  847. data/bin/Image-ExifTool-9.33/t/images/Vorbis.ogg +0 -0
  848. data/bin/Image-ExifTool-9.33/t/images/Writer.jpg +0 -0
  849. data/bin/Image-ExifTool-9.33/t/images/XMP.inx +108 -0
  850. data/bin/Image-ExifTool-9.33/t/images/XMP.jpg +0 -0
  851. data/bin/Image-ExifTool-9.33/t/images/XMP.svg +33 -0
  852. data/bin/Image-ExifTool-9.33/t/images/XMP.xml +98 -0
  853. data/bin/Image-ExifTool-9.33/t/images/XMP.xmp +99 -0
  854. data/bin/Image-ExifTool-9.33/t/images/XMP2.xmp +25 -0
  855. data/bin/Image-ExifTool-9.33/t/images/XMP3.xmp +43 -0
  856. data/bin/Image-ExifTool-9.33/t/images/XMP4.xmp +93 -0
  857. data/bin/Image-ExifTool-9.33/t/images/XMP5.xmp +158 -0
  858. data/bin/Image-ExifTool-9.33/t/images/ZIP.gz +0 -0
  859. data/bin/Image-ExifTool-9.33/t/images/ZIP.zip +0 -0
  860. data/bin/Image-ExifTool-9.33/t/images/iWork.numbers +0 -0
  861. data/lib/exiftool_vendored.rb +10 -0
  862. data/lib/exiftool_vendored/version.rb +3 -0
  863. data/lib/exiftool_vendored/version_extractor.rb +17 -0
  864. metadata +977 -0
@@ -0,0 +1,282 @@
1
+ #------------------------------------------------------------------------------
2
+ # File: BigTIFF.pm
3
+ #
4
+ # Description: Read Big TIFF meta information
5
+ #
6
+ # Revisions: 07/03/2007 - P. Harvey Created
7
+ #
8
+ # References: 1) http://www.awaresystems.be/imaging/tiff/bigtiff.html
9
+ #------------------------------------------------------------------------------
10
+
11
+ package Image::ExifTool::BigTIFF;
12
+
13
+ use strict;
14
+ use vars qw($VERSION);
15
+ use Image::ExifTool qw(:DataAccess :Utils);
16
+ use Image::ExifTool::Exif;
17
+
18
+ $VERSION = '1.05';
19
+
20
+ my $maxOffset = 0x7fffffff; # currently supported maximum data offset/size
21
+
22
+ #------------------------------------------------------------------------------
23
+ # Process Big IFD directory
24
+ # Inputs: 0) ExifTool object ref, 1) dirInfo ref, 2) tag table ref
25
+ # Returns: 1 on success, otherwise returns 0 and sets a Warning
26
+ sub ProcessBigIFD($$$)
27
+ {
28
+ my ($exifTool, $dirInfo, $tagTablePtr) = @_;
29
+ my $raf = $$dirInfo{RAF};
30
+ my $verbose = $exifTool->{OPTIONS}->{Verbose};
31
+ my $htmlDump = $exifTool->{HTML_DUMP};
32
+ my $dirName = $$dirInfo{DirName};
33
+ my $dirStart = $$dirInfo{DirStart};
34
+
35
+ $verbose = -1 if $htmlDump; # mix htmlDump into verbose so we can test for both at once
36
+
37
+ # loop through IFD chain
38
+ for (;;) {
39
+ if ($dirStart > $maxOffset and not $exifTool->Options('LargeFileSupport')) {
40
+ $exifTool->Warn('Huge offsets not supported (LargeFileSupport not set)');
41
+ last;
42
+ }
43
+ unless ($raf->Seek($dirStart, 0)) {
44
+ $exifTool->Warn("Bad $dirName offset");
45
+ return 0;
46
+ }
47
+ my ($dirBuff, $index);
48
+ unless ($raf->Read($dirBuff, 8) == 8) {
49
+ $exifTool->Warn("Truncated $dirName count");
50
+ return 0;
51
+ }
52
+ my $numEntries = Image::ExifTool::Get64u(\$dirBuff, 0);
53
+ $verbose > 0 and $exifTool->VerboseDir($dirName, $numEntries);
54
+ my $bsize = $numEntries * 20;
55
+ if ($bsize > $maxOffset) {
56
+ $exifTool->Warn('Huge directory counts not yet supported');
57
+ last;
58
+ }
59
+ my $bufPos = $raf->Tell();
60
+ unless ($raf->Read($dirBuff, $bsize) == $bsize) {
61
+ $exifTool->Warn("Truncated $dirName directory");
62
+ return 0;
63
+ }
64
+ my $nextIFD;
65
+ $raf->Read($nextIFD, 8) == 8 or undef $nextIFD; # try to read next IFD pointer
66
+ if ($htmlDump) {
67
+ $exifTool->HDump($bufPos-8, 8, "$dirName entries", "Entry count: $numEntries");
68
+ if (defined $nextIFD) {
69
+ my $tip = sprintf("Offset: 0x%.8x", Image::ExifTool::Get64u(\$nextIFD, 0));
70
+ $exifTool->HDump($bufPos + 20 * $numEntries, 8, "Next IFD", $tip, 0);
71
+ }
72
+ }
73
+ # loop through all entries in this BigTIFF IFD
74
+ for ($index=0; $index<$numEntries; ++$index) {
75
+ my $entry = 20 * $index;
76
+ my $tagID = Get16u(\$dirBuff, $entry);
77
+ my $format = Get16u(\$dirBuff, $entry+2);
78
+ my $count = Image::ExifTool::Get64u(\$dirBuff, $entry+4);
79
+ my $formatSize = $Image::ExifTool::Exif::formatSize[$format];
80
+ unless (defined $formatSize) {
81
+ $exifTool->HDump($bufPos+$entry,20,"[invalid IFD entry]",
82
+ "Bad format value: $format", 1);
83
+ # warn unless the IFD was just padded with zeros
84
+ $exifTool->Warn(sprintf("Unknown format ($format) for $dirName tag 0x%x",$tagID));
85
+ return 0; # assume corrupted IFD
86
+ }
87
+ my $formatStr = $Image::ExifTool::Exif::formatName[$format];
88
+ my $size = $count * $formatSize;
89
+ my $tagInfo = $exifTool->GetTagInfo($tagTablePtr, $tagID);
90
+ next unless defined $tagInfo or $verbose;
91
+ my $valuePtr = $entry + 12;
92
+ my ($valBuff, $valBase, $rational);
93
+ if ($size > 8) {
94
+ if ($size > $maxOffset) {
95
+ $exifTool->Warn("Can't handle $dirName entry $index (huge size)");
96
+ next;
97
+ }
98
+ $valuePtr = Image::ExifTool::Get64u(\$dirBuff, $valuePtr);
99
+ if ($valuePtr > $maxOffset and not $exifTool->Options('LargeFileSupport')) {
100
+ $exifTool->Warn("Can't handle $dirName entry $index (LargeFileSupport not set)");
101
+ next;
102
+ }
103
+ unless ($raf->Seek($valuePtr, 0) and $raf->Read($valBuff, $size) == $size) {
104
+ $exifTool->Warn("Error reading $dirName entry $index");
105
+ next;
106
+ }
107
+ $valBase = 0;
108
+ } else {
109
+ $valBuff = substr($dirBuff, $valuePtr, $size);
110
+ $valBase = $bufPos;
111
+ }
112
+ if (defined $tagInfo and not $tagInfo) {
113
+ # GetTagInfo() required the value for a Condition
114
+ $tagInfo = $exifTool->GetTagInfo($tagTablePtr, $tagID, \$valBuff);
115
+ }
116
+ my $val = ReadValue(\$valBuff, 0, $formatStr, $count, $size, \$rational);
117
+ if ($htmlDump) {
118
+ my $tval = $val;
119
+ # show numerator/denominator separately for rational numbers
120
+ $tval .= " ($rational)" if defined $rational;
121
+ my ($tagName, $colName);
122
+ if ($tagID == 0x927c and $dirName eq 'ExifIFD') {
123
+ $tagName = 'MakerNotes';
124
+ } elsif ($tagInfo) {
125
+ $tagName = $$tagInfo{Name};
126
+ } else {
127
+ $tagName = sprintf("Tag 0x%.4x",$tagID);
128
+ }
129
+ my $dname = sprintf("$dirName-%.2d", $index);
130
+ # build our tool tip
131
+ my $tip = sprintf("Tag ID: 0x%.4x\n", $tagID) .
132
+ "Format: $formatStr\[$count]\nSize: $size bytes\n";
133
+ if ($size > 8) {
134
+ $tip .= sprintf("Value offset: 0x%.8x\n", $valuePtr);
135
+ $colName = "<span class=H>$tagName</span>";
136
+ } else {
137
+ $colName = $tagName;
138
+ }
139
+ $tval = substr($tval,0,28) . '[...]' if length($tval) > 32;
140
+ if ($formatStr =~ /^(string|undef|binary)/) {
141
+ # translate non-printable characters
142
+ $tval =~ tr/\x00-\x1f\x7f-\xff/./;
143
+ } elsif ($tagInfo and Image::ExifTool::IsInt($tval)) {
144
+ if ($$tagInfo{IsOffset}) {
145
+ $tval = sprintf('0x%.4x', $tval);
146
+ } elsif ($$tagInfo{PrintHex}) {
147
+ $tval = sprintf('0x%x', $tval);
148
+ }
149
+ }
150
+ $tip .= "Value: $tval";
151
+ $exifTool->HDump($entry+$bufPos, 20, "$dname $colName", $tip, 1);
152
+ if ($size > 8) {
153
+ # add value data block
154
+ my $flg = ($tagInfo and $$tagInfo{SubDirectory} and $$tagInfo{MakerNotes}) ? 4 : 0;
155
+ $exifTool->HDump($valuePtr,$size,"$tagName value",'SAME', $flg);
156
+ }
157
+ }
158
+ if ($tagInfo and $$tagInfo{SubIFD}) {
159
+ # process all SubIFD's as BigTIFF
160
+ $verbose > 0 and $exifTool->VerboseInfo($tagID, $tagInfo,
161
+ Table => $tagTablePtr,
162
+ Index => $index,
163
+ Value => $val,
164
+ DataPt => \$valBuff,
165
+ DataPos => $valBase + $valuePtr,
166
+ Start => 0,
167
+ Size => $size,
168
+ Format => $formatStr,
169
+ Count => $count,
170
+ );
171
+ my @offsets = split ' ', $val;
172
+ my $i;
173
+ for ($i=0; $i<scalar(@offsets); ++$i) {
174
+ my $subdirName = $$tagInfo{Name};
175
+ $subdirName .= $i if $i;
176
+ my %subdirInfo = (
177
+ RAF => $raf,
178
+ DataPos => 0,
179
+ DirStart => $offsets[$i],
180
+ DirName => $subdirName,
181
+ Parent => $dirInfo,
182
+ );
183
+ $exifTool->ProcessDirectory(\%subdirInfo, $tagTablePtr, \&ProcessBigIFD);
184
+ }
185
+ } else {
186
+ my $tagKey = $exifTool->HandleTag($tagTablePtr, $tagID, $val,
187
+ Index => $index,
188
+ DataPt => \$valBuff,
189
+ DataPos => $valBase + $valuePtr,
190
+ Start => 0,
191
+ Size => $size,
192
+ Format => $formatStr,
193
+ TagInfo => $tagInfo,
194
+ RAF => $raf,
195
+ );
196
+ $tagKey and $exifTool->SetGroup($tagKey, $dirName);
197
+ }
198
+ }
199
+ last unless $dirName =~ /^(IFD|SubIFD)(\d*)$/;
200
+ $dirName = $1 . (($2 || 0) + 1);
201
+ defined $nextIFD or $exifTool->Warn("Bad $dirName pointer"), return 0;
202
+ $dirStart = Image::ExifTool::Get64u(\$nextIFD, 0);
203
+ $dirStart or last;
204
+ }
205
+ return 1;
206
+ }
207
+
208
+ #------------------------------------------------------------------------------
209
+ # Extract meta information from a BigTIFF image
210
+ # Inputs: 0) ExifTool object reference, 1) dirInfo reference
211
+ # Returns: 1 on success, 0 if this wasn't a valid BigTIFF image
212
+ sub ProcessBTF($$)
213
+ {
214
+ my ($exifTool, $dirInfo) = @_;
215
+ my $raf = $$dirInfo{RAF};
216
+ my $buff;
217
+
218
+ return 0 unless $raf->Read($buff, 16) == 16;
219
+ return 0 unless $buff =~ /^(MM\0\x2b\0\x08\0\0|II\x2b\0\x08\0\0\0)/;
220
+ if ($$dirInfo{OutFile}) {
221
+ $exifTool->Error('ExifTool does not support writing of BigTIFF images');
222
+ return 1;
223
+ }
224
+ $exifTool->SetFileType('BTF'); # set the FileType tag
225
+ SetByteOrder(substr($buff, 0, 2));
226
+ my $offset = Image::ExifTool::Get64u(\$buff, 8);
227
+ if ($exifTool->{HTML_DUMP}) {
228
+ my $o = (GetByteOrder() eq 'II') ? 'Little' : 'Big';
229
+ $exifTool->HDump(0, 8, "BigTIFF header", "Byte order: $o endian", 0);
230
+ $exifTool->HDump(8, 8, "IFD0 pointer", sprintf("Offset: 0x%.8x",$offset), 0);
231
+ }
232
+ my %dirInfo = (
233
+ RAF => $raf,
234
+ DataPos => 0,
235
+ DirStart => $offset,
236
+ DirName => 'IFD0',
237
+ Parent => 'BigTIFF',
238
+ );
239
+ my $tagTablePtr = GetTagTable('Image::ExifTool::Exif::Main');
240
+ $exifTool->ProcessDirectory(\%dirInfo, $tagTablePtr, \&ProcessBigIFD);
241
+ return 1;
242
+ }
243
+
244
+ 1; # end
245
+
246
+ __END__
247
+
248
+ =head1 NAME
249
+
250
+ Image::ExifTool::BigTIFF - Read Big TIFF meta information
251
+
252
+ =head1 SYNOPSIS
253
+
254
+ This module is used by Image::ExifTool
255
+
256
+ =head1 DESCRIPTION
257
+
258
+ This module contains routines required by Image::ExifTool to read meta
259
+ information in BigTIFF images.
260
+
261
+ =head1 AUTHOR
262
+
263
+ Copyright 2003-2013, Phil Harvey (phil at owl.phy.queensu.ca)
264
+
265
+ This library is free software; you can redistribute it and/or modify it
266
+ under the same terms as Perl itself.
267
+
268
+ =head1 REFERENCES
269
+
270
+ =over 4
271
+
272
+ =item L<http://www.awaresystems.be/imaging/tiff/bigtiff.html>
273
+
274
+ =back
275
+
276
+ =head1 SEE ALSO
277
+
278
+ L<Image::ExifTool::TagNames/EXIF Tags>,
279
+ L<Image::ExifTool(3pm)|Image::ExifTool>
280
+
281
+ =cut
282
+
@@ -0,0 +1,2400 @@
1
+ #------------------------------------------------------------------------------
2
+ # File: BuildTagLookup.pm
3
+ #
4
+ # Description: Utility to build tag lookup tables in Image::ExifTool::TagLookup.pm
5
+ #
6
+ # Revisions: 12/31/2004 - P. Harvey Created
7
+ # 02/15/2005 - PH Added ability to generate TagNames documentation
8
+ #
9
+ # Notes: Documentation for the tag tables may either be placed in the
10
+ # %docs hash below or in a NOTES entry in the table itself, and
11
+ # individual tags may have their own Notes entry.
12
+ #------------------------------------------------------------------------------
13
+
14
+ package Image::ExifTool::BuildTagLookup;
15
+
16
+ use strict;
17
+ require Exporter;
18
+
19
+ BEGIN {
20
+ # prevent ExifTool from loading the user config file
21
+ $Image::ExifTool::configFile = '';
22
+ $Image::ExifTool::debug = 1; # enabled debug messages
23
+ }
24
+
25
+ use vars qw($VERSION @ISA);
26
+ use Image::ExifTool qw(:Utils :Vars);
27
+ use Image::ExifTool::Exif;
28
+ use Image::ExifTool::Shortcuts;
29
+ use Image::ExifTool::HTML qw(EscapeHTML);
30
+ use Image::ExifTool::IPTC;
31
+ use Image::ExifTool::XMP;
32
+ use Image::ExifTool::Canon;
33
+ use Image::ExifTool::Nikon;
34
+
35
+ $VERSION = '2.63';
36
+ @ISA = qw(Exporter);
37
+
38
+ sub NumbersFirst;
39
+
40
+ my $numbersFirst = 1; # set to -1 to sort numbers last
41
+
42
+ # list of all tables in plug-in modules
43
+ my @pluginTables = ('Image::ExifTool::MWG::Composite');
44
+
45
+ # colors for html pages
46
+ my $noteFont = "<span class=n>";
47
+ my $noteFontSmall = "<span class='n s'>";
48
+
49
+ my $docType = q{<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
50
+ "http://www.w3.org/TR/html4/loose.dtd">
51
+ };
52
+
53
+ my $homePage = 'http://owl.phy.queensu.ca/~phil/exiftool';
54
+
55
+ # tweak the ordering of tables in the documentation
56
+ my %tweakOrder = (
57
+ # this => comes after this
58
+ # ------- -----------------
59
+ JPEG => '-', # JPEG comes first
60
+ IPTC => 'Exif', # put IPTC after EXIF,
61
+ GPS => 'XMP', # etc...
62
+ Composite => 'Extra',
63
+ GeoTiff => 'GPS',
64
+ CanonVRD=> 'CanonCustom',
65
+ FLIR => 'Casio',
66
+ FujiFilm => 'FLIR',
67
+ Kodak => 'JVC',
68
+ 'Kodak::IFD' => 'Kodak::Unknown',
69
+ 'Kodak::TextualInfo' => 'Kodak::IFD',
70
+ 'Kodak::Processing' => 'Kodak::TextualInfo',
71
+ Leaf => 'Kodak',
72
+ Nikon => 'Minolta',
73
+ NikonCustom => 'Nikon',
74
+ NikonCapture => 'NikonCustom',
75
+ Olympus => 'NikonCapture',
76
+ Minolta => 'Leaf',
77
+ Pentax => 'Panasonic',
78
+ SonyIDC => 'Sony',
79
+ Unknown => 'SonyIDC',
80
+ DNG => 'Unknown',
81
+ PrintIM => 'ICC_Profile',
82
+ Vorbis => 'Ogg',
83
+ ID3 => 'PostScript',
84
+ MinoltaRaw => 'KyoceraRaw',
85
+ KyoceraRaw => 'CanonRaw',
86
+ SigmaRaw => 'PanasonicRaw',
87
+ PhotoMechanic => 'FotoStation',
88
+ Microsoft => 'PhotoMechanic',
89
+ 'Microsoft::MP'=> 'Microsoft::MP1',
90
+ GIMP => 'Microsoft',
91
+ 'Nikon::CameraSettingsD300' => 'Nikon::ShotInfoD300b',
92
+ 'Pentax::LensData' => 'Pentax::LensInfo2',
93
+ 'Sony::SRF2' => 'Sony::SRF',
94
+ 'Samsung::PictureWizard' => 'Samsung::Type2', # (necessary because Samsung doesn't have a main table)
95
+ 'Samsung::INFO' => 'Samsung::PictureWizard', # (ditto)
96
+ 'Samsung::MP4' => 'Samsung::INFO', # (ditto)
97
+ 'Samsung::Thumbnail' => 'Samsung::MP4', # (ditto)
98
+ 'Samsung::sec' => 'Samsung::Thumbnail', # (ditto)
99
+ DarwinCore => 'AFCP',
100
+ 'MWG::Regions' => 'MWG::Composite',
101
+ 'MWG::Keywords' => 'MWG::Regions',
102
+ 'MWG::Collections' => 'MWG::Keywords',
103
+ );
104
+
105
+ # list of all recognized Format strings
106
+ # (not a complete list, but this is all we use so far)
107
+ # (also, formats like "var_X[Y]" are allowed for any valid X)
108
+ my %formatOK = (
109
+ %Image::ExifTool::Exif::formatNumber,
110
+ 0 => 1,
111
+ 1 => 1,
112
+ real => 1,
113
+ integer => 1,
114
+ date => 1,
115
+ boolean => 1,
116
+ rational => 1,
117
+ 'lang-alt' => 1,
118
+ fixed16u => 1,
119
+ fixed16s => 1,
120
+ fixed32u => 1,
121
+ fixed32s => 1,
122
+ extended => 1,
123
+ resize => 1,
124
+ digits => 1,
125
+ int16uRev => 1,
126
+ rational32u => 1,
127
+ rational32s => 1,
128
+ pstring => 1,
129
+ var_string => 1,
130
+ var_int16u => 1,
131
+ var_pstr32 => 1,
132
+ # Matroska
133
+ signed => 1,
134
+ unsigned => 1,
135
+ utf8 => 1,
136
+ );
137
+
138
+ my $caseInsensitive; # flag to ignore case when sorting tag names
139
+
140
+ # Descriptions for the TagNames documentation
141
+ # (descriptions may also be defined in tag table NOTES)
142
+ # Note: POD headers in these descriptions start with '~' instead of '=' to keep
143
+ # from confusing POD parsers which apparently parse inside quoted strings.
144
+ my %docs = (
145
+ PodHeader => q{
146
+ ~head1 NAME
147
+
148
+ Image::ExifTool::TagNames - ExifTool tag name documentation
149
+
150
+ ~head1 DESCRIPTION
151
+
152
+ This document contains a complete list of ExifTool tag names, organized into
153
+ tables based on information type. Tag names are used to reference specific
154
+ meta information extracted from or written to a file.
155
+
156
+ ~head1 TAG TABLES
157
+ },
158
+ ExifTool => q{
159
+ The tables listed below give the names of all tags recognized by ExifTool.
160
+ },
161
+ ExifTool2 => q{
162
+ B<Tag ID>, B<Index#> or B<Sequence> is given in the first column of each
163
+ table. A B<Tag ID> is the computer-readable equivalent of a tag name, and
164
+ is the identifier that is actually stored in the file. B<Index#> refers to
165
+ the location of a value when found at a fixed position within a data block
166
+ (B<#> is the multiplier for calculating a byte offset: B<1>, B<2> or B<4>).
167
+ B<Sequence> gives the order of values for a serial data stream.
168
+
169
+ A B<Tag Name> is the handle by which the information is accessed in
170
+ ExifTool. In some instances, more than one name may correspond to a single
171
+ tag ID. In these cases, the actual name used depends on the context in
172
+ which the information is found. Case is not significant for tag names. A
173
+ question mark (C<?>) after a tag name indicates that the information is
174
+ either not understood, not verified, or not very useful -- these tags are
175
+ not extracted by ExifTool unless the Unknown (-u) option is enabled. Be
176
+ aware that some tag names are different than the descriptions printed out by
177
+ default when extracting information with exiftool. To see the tag names
178
+ instead of the descriptions, use C<exiftool -s>.
179
+
180
+ The B<Writable> column indicates whether the tag is writable by ExifTool.
181
+ Anything but an C<N> in this column means the tag is writable. A C<Y>
182
+ indicates writable information that is either unformatted or written using
183
+ the existing format. Other expressions give details about the information
184
+ format, and vary depending on the general type of information. The format
185
+ name may be followed by a number in square brackets to indicate the number
186
+ of values written, or the number of characters in a fixed-length string
187
+ (including a null terminator which is added if required).
188
+
189
+ A plus sign (C<+>) after an entry in the B<Writable> column indicates a
190
+ "list" tag which supports multiple values and allows individual values to be
191
+ added and deleted. A slash (C</>) indicates an "avoided" tag that is not
192
+ created when writing if another same-named tag may be created instead. To
193
+ write these tags, the group should be specified. A tilde (C<~>) indicates a
194
+ tag this is writable only when the print conversion is disabled (by setting
195
+ PrintConv to 0, using the -n option, or suffixing the tag name with a C<#>
196
+ character). An exclamation point (C<!>) indicates a tag that is considered
197
+ unsafe to write under normal circumstances. These "unsafe" tags are not set
198
+ when calling SetNewValuesFromFile() or copied with the exiftool
199
+ -tagsFromFile option unless specified explicitly, and care should be taken
200
+ when editing them manually since they may affect the way an image is
201
+ rendered. An asterisk (C<*>) indicates a "protected" tag which is not
202
+ writable directly, but is written automatically by ExifTool (often when a
203
+ corresponding Composite or Extra tag is written). A colon (C<:>) indicates
204
+ a mandatory tag which may be added automatically when writing.
205
+
206
+ The HTML version of these tables also lists possible B<Values> for
207
+ discrete-valued tags, as well as B<Notes> for some tags. The B<Values> are
208
+ listed as the computer-readable and human-readable values on the left and
209
+ right hand side of an equals sign (C<=>) respectively. The human-readable
210
+ values are used by default when reading and writing, but the
211
+ computer-readable values may be accessed by disabling the value conversion
212
+ with the -n option on the command line, by setting the ValueConv option to 0
213
+ in the API, or or on a per-tag basis by adding a hash (C<#>) after the tag
214
+ name.
215
+
216
+ B<Note>: If you are familiar with common meta-information tag names, you may
217
+ find that some ExifTool tag names are different than expected. The usual
218
+ reason for this is to make the tag names more consistent across different
219
+ types of meta information. To determine a tag name, either consult this
220
+ documentation or run C<exiftool -s> on a file containing the information in
221
+ question.
222
+ },
223
+ EXIF => q{
224
+ EXIF stands for "Exchangeable Image File Format". This type of information
225
+ is formatted according to the TIFF specification, and may be found in JPG,
226
+ TIFF, PNG, JP2, PGF, MIFF, HDP, PSP and XCF images, as well as many
227
+ TIFF-based RAW images, and even some AVI and MOV videos.
228
+
229
+ The EXIF meta information is organized into different Image File Directories
230
+ (IFD's) within an image. The names of these IFD's correspond to the
231
+ ExifTool family 1 group names. When writing EXIF information, the default
232
+ B<Group> listed below is used unless another group is specified.
233
+
234
+ The table below lists all EXIF tags. Also listed are TIFF, DNG, HDP and
235
+ other tags which are not part of the EXIF specification, but may co-exist
236
+ with EXIF tags in some images. Tags which are part of the EXIF 2.3
237
+ specification have an underlined B<Tag Name> in the HTML version of this
238
+ documentation. See
239
+ L<http://www.cipa.jp/english/hyoujunka/kikaku/pdf/DC-008-2012_E.pdf> for the
240
+ official EXIF 2.3 specification.
241
+ },
242
+ GPS => q{
243
+ These GPS tags are part of the EXIF standard, and are stored in a separate
244
+ IFD within the EXIF information.
245
+
246
+ ExifTool is very flexible about the input format when writing lat/long
247
+ coordinates, and will accept from 1 to 3 floating point numbers (for decimal
248
+ degrees, degrees and minutes, or degrees, minutes and seconds) separated by
249
+ just about anything, and will format them properly according to the EXIF
250
+ specification.
251
+
252
+ Some GPS tags have values which are fixed-length strings. For these, the
253
+ indicated string lengths include a null terminator which is added
254
+ automatically by ExifTool. Remember that the descriptive values are used
255
+ when writing (ie. 'Above Sea Level', not '0') unless the print conversion is
256
+ disabled (with '-n' on the command line or the PrintConv option in the API,
257
+ or by suffixing the tag name with a C<#> character).
258
+
259
+ When adding GPS information to an image, it is important to set all of the
260
+ following tags: GPSLatitude, GPSLatitudeRef, GPSLongitude, GPSLongitudeRef,
261
+ and GPSAltitude and GPSAltitudeRef if the altitude is known. ExifTool will
262
+ write the required GPSVersionID tag automatically if new a GPS IFD is added
263
+ to an image.
264
+ },
265
+ XMP => q{
266
+ XMP stands for "Extensible Metadata Platform", an XML/RDF-based metadata
267
+ format which is being pushed by Adobe. Information in this format can be
268
+ embedded in many different image file types including JPG, JP2, TIFF, GIF,
269
+ EPS, PDF, PSD, IND, INX, PNG, DJVU, SVG, PGF, MIFF, XCF, CRW, DNG and a
270
+ variety of proprietary TIFF-based RAW images, as well as MOV, AVI, ASF, WMV,
271
+ FLV, SWF and MP4 videos, and WMA and audio formats supporting ID3v2
272
+ information.
273
+
274
+ The XMP B<Tag ID>'s aren't listed because in most cases they are identical
275
+ to the B<Tag Name> (aside from differences in case). Tags with different
276
+ ID's are mentioned in the B<Notes> column of the HTML version of this
277
+ document.
278
+
279
+ All XMP information is stored as character strings. The B<Writable> column
280
+ specifies the information format: C<string> is an unformatted string,
281
+ C<integer> is a string of digits (possibly beginning with a '+' or '-'),
282
+ C<real> is a floating point number, C<rational> is entered as a floating
283
+ point number but stored as two C<integer> strings separated by a '/'
284
+ character, C<date> is a date/time string entered in the format "YYYY:mm:dd
285
+ HH:MM:SS[.ss][+/-HH:MM]", C<boolean> is either "True" or "False", C<struct>
286
+ indicates a structured tag, and C<lang-alt> is a tag that supports alternate
287
+ languages.
288
+
289
+ When reading, C<struct> tags are extracted only if the Struct (-struct)
290
+ option is used. Otherwise the corresponding "flattened" tags, indicated by
291
+ an underline (C<_>) after the B<Writable> type, are extracted. When
292
+ copying, by default both structured and flattened tags are available, but
293
+ the flattened tags are considered "unsafe" so they they aren't copied unless
294
+ specified explicitly. The Struct option may be disabled by setting Struct
295
+ to 0 via the API or with --struct on the command line to copy only flattened
296
+ tags, or enabled by setting Struct to 1 via the API or with -struct on the
297
+ command line to copy only as structures. When writing, the Struct option
298
+ has no effect, and both structured and flattened tags may be written. See
299
+ L<http://owl.phy.queensu.ca/~phil/exiftool/struct.html> for more details.
300
+
301
+ Individual languages for C<lang-alt> tags are accessed by suffixing the tag
302
+ name with a '-', followed by an RFC 3066 language code (ie. "XMP:Title-fr",
303
+ or "Rights-en-US"). (See L<http://www.ietf.org/rfc/rfc3066.txt> for the RFC
304
+ 3066 specification.) A C<lang-alt> tag with no language code accesses the
305
+ "x-default" language, but causes other languages for this tag to be deleted
306
+ when writing. The "x-default" language code may be specified when writing
307
+ to preserve other existing languages (ie. "XMP-dc:Description-x-default").
308
+ When reading, "x-default" is not specified.
309
+
310
+ The XMP tags are organized according to schema B<Namespace> in the following
311
+ tables. Note that a few of the longer namespace prefixes given below have
312
+ been shortened for convenience (since the family 1 group names are derived
313
+ from these by adding a leading "XMP-"). In cases where a tag name exists in
314
+ more than one namespace, less common namespaces are avoided when writing.
315
+ However, any namespace may be written by specifying a family 1 group name
316
+ for the tag, ie) XMP-exif:Contrast or XMP-crs:Contrast. When deciding on
317
+ which tags to add to an image, using standard schemas such as
318
+ L<dc|/XMP dc Tags>, L<xmp|/XMP xmp Tags>, L<iptcCore|/XMP iptcCore Tags>
319
+ and L<iptcExt|/XMP iptcExt Tags> is recommended if possible.
320
+
321
+ For structures, the heading of the first column is B<Field Name>. Field
322
+ names are very similar to tag names, except they are used to identify fields
323
+ inside structures instead of stand-alone tags. See
324
+ L<the Field Name section of the Structured Information documentation|http://owl.phy.queensu.ca/~phil/exiftool/struct.html#Fields> for more
325
+ details.
326
+
327
+ ExifTool will extract XMP information even if it is not listed in these
328
+ tables, but other tags are not writable unless added as user-defined tags in
329
+ the L<ExifTool config file|../config.html>. For example, the C<pdfx> namespace doesn't have a
330
+ predefined set of tag names because it is used to store application-defined
331
+ PDF information, so although this information will be extracted, it is only
332
+ writable if the corresponding user-defined tags have been created.
333
+
334
+ The tables below list tags from the official XMP specification (with an
335
+ underlined B<Namespace> in the HTML version of this documentation), as well
336
+ as extensions from various other sources. See
337
+ L<http://www.adobe.com/devnet/xmp/> for the official XMP specification.
338
+ },
339
+ IPTC => q{
340
+ The tags listed below are part of the International Press Telecommunications
341
+ Council (IPTC) and the Newspaper Association of America (NAA) Information
342
+ Interchange Model (IIM). This is an older meta information format, slowly
343
+ being phased out in favor of XMP -- the newer IPTCCore specification uses
344
+ XMP format. IPTC information may be embedded in JPG, TIFF, PNG, MIFF, PS,
345
+ PDF, PSD, XCF and DNG images.
346
+
347
+ IPTC information is separated into different records, each of which has its
348
+ own set of tags. See
349
+ L<http://www.iptc.org/std/IIM/4.1/specification/IIMV4.1.pdf> for the
350
+ official IPTC IIM specification.
351
+
352
+ This specification dictates a length for ASCII (C<string> or C<digits>) and
353
+ binary (C<undef>) values. These lengths are given in square brackets after
354
+ the B<Writable> format name. For tags where a range of lengths is allowed,
355
+ the minimum and maximum lengths are separated by a comma within the
356
+ brackets. IPTC strings are not null terminated. When writing, ExifTool
357
+ issues a minor warning and truncates the value if it is longer than allowed
358
+ by the IPTC specification. Minor errors may be ignored with the
359
+ IgnoreMinorErrors (-m) option, allowing longer values to be written, but
360
+ beware that values like this may cause problems for some other IPTC readers.
361
+
362
+ Separate IPTC date and time tags may be written with a combined date/time
363
+ value and ExifTool automagically takes the appropriate part of the date/time
364
+ string depending on whether a date or time tag is being written. This is
365
+ very useful when copying date/time values to IPTC from other metadata
366
+ formats.
367
+
368
+ IPTC time values include a timezone offset. If written with a value which
369
+ doesn't include a timezone then the current local timezone offset is used
370
+ (unless written with a combined date/time, in which case the local timezone
371
+ offset at the specified date/time is used, which may be different due to
372
+ changes in daylight savings time).
373
+ },
374
+ Photoshop => q{
375
+ Photoshop tags are found in PSD and PSB files, as well as inside embedded
376
+ Photoshop information in many other file types (JPEG, TIFF, PDF, PNG to name
377
+ a few).
378
+
379
+ Many Photoshop tags are marked as Unknown (indicated by a question mark
380
+ after the tag name) because the information they provide is not very useful
381
+ under normal circumstances I<[and because Adobe denied my application for
382
+ their file format documentation -- apparently open source software is too
383
+ big a concept for them]>. These unknown tags are not extracted unless the
384
+ Unknown (-u) option is used.
385
+ },
386
+ PrintIM => q{
387
+ The format of the PrintIM information is known, however no PrintIM tags have
388
+ been decoded. Use the Unknown (-u) option to extract PrintIM information.
389
+ },
390
+ GeoTiff => q{
391
+ ExifTool extracts the following tags from GeoTIFF images. See
392
+ L<http://www.remotesensing.org/geotiff/spec/geotiffhome.html> for the
393
+ complete GeoTIFF specification.
394
+ },
395
+ JFIF => q{
396
+ The following information is extracted from the JPEG JFIF header. See
397
+ L<http://www.jpeg.org/public/jfif.pdf> for the JFIF 1.02 specification.
398
+ },
399
+ Kodak => q{
400
+ Many Kodak models don't store the maker notes in standard IFD format, and
401
+ these formats vary with different models. Some information has been
402
+ decoded, but much of the Kodak information remains unknown.
403
+ },
404
+ 'Kodak SpecialEffects' => q{
405
+ The Kodak SpecialEffects and Borders tags are found in sub-IFD's within the
406
+ Kodak JPEG APP3 "Meta" segment.
407
+ },
408
+ Minolta => q{
409
+ These tags are used by Minolta, Konica/Minolta as well as some Sony cameras.
410
+ Minolta doesn't make things easy for decoders because the meaning of some
411
+ tags and the location where some information is stored is different for
412
+ different camera models. (Take MinoltaQuality for example, which may be
413
+ located in 5 different places.)
414
+ },
415
+ Olympus => q{
416
+ Tags 0x0000 through 0x0103 are used by some older Olympus cameras, and are
417
+ the same as Konica/Minolta tags. These tags are also used for some models
418
+ from other brands such as Acer, BenQ, Epson, Hitachi, HP, Maginon, Minolta,
419
+ Pentax, Ricoh, Samsung, Sanyo, SeaLife, Sony, Supra and Vivitar.
420
+ },
421
+ Panasonic => q{
422
+ These tags are used in Panasonic/Leica cameras.
423
+ },
424
+ Pentax => q{
425
+ These tags are used in Pentax/Asahi cameras.
426
+ },
427
+ CanonRaw => q{
428
+ These tags apply to CRW-format Canon RAW files and information in the APP0
429
+ "CIFF" segment of JPEG images. When writing CanonRaw/CIFF information, the
430
+ length of the information is preserved (and the new information is truncated
431
+ or padded as required) unless B<Writable> is C<resize>. Currently, only
432
+ JpgFromRaw and ThumbnailImage are allowed to change size.
433
+
434
+ CRW images also support the addition of a CanonVRD trailer, which in turn
435
+ supports XMP. This trailer is created automatically if necessary when
436
+ ExifTool is used to write XMP to a CRW image.
437
+ },
438
+ Unknown => q{
439
+ The following tags are decoded in unsupported maker notes. Use the Unknown
440
+ (-u) option to display other unknown tags.
441
+ },
442
+ PDF => q{
443
+ The tags listed in the PDF tables below are those which are used by ExifTool
444
+ to extract meta information, but they are only a small fraction of the total
445
+ number of available PDF tags. See
446
+ L<http://www.adobe.com/devnet/pdf/pdf_reference.html> for the official PDF
447
+ specification.
448
+
449
+ ExifTool supports reading and writing PDF documents up to version 1.7
450
+ extension level 3, including support for RC4, AES-128 and AES-256
451
+ encryption. A Password option is provided to allow processing of
452
+ password-protected PDF files.
453
+
454
+ When writing PDF files, ExifTool uses an incremental update. This has the
455
+ advantages of being fast and reversible. The original PDF can be easily
456
+ recovered by deleting the C<PDF-update> pseudo-group (with
457
+ C<-PDF-update:all=> on the command line). But there are two main
458
+ disadvantages to this technique:
459
+
460
+ 1) A linearized PDF file is no longer linearized after the update, so it
461
+ must be subsequently re-linearized if this is required.
462
+
463
+ 2) All metadata edits are reversible. While this would normally be
464
+ considered an advantage, it is a potential security problem because old
465
+ information is never actually deleted from the file.
466
+ },
467
+ DNG => q{
468
+ The main DNG tags are found in the EXIF table. The tables below define only
469
+ information found within structures of these main DNG tag values. See
470
+ L<http://www.adobe.com/products/dng/> for the official DNG specification.
471
+ },
472
+ MPEG => q{
473
+ The MPEG format doesn't specify any file-level meta information. In lieu of
474
+ this, information is extracted from the first audio and video frame headers
475
+ in the file.
476
+ },
477
+ Real => q{
478
+ ExifTool recognizes three basic types of Real audio/video files: 1)
479
+ RealMedia (RM, RV and RMVB), 2) RealAudio (RA), and 3) Real Metafile (RAM
480
+ and RPM).
481
+ },
482
+ Extra => q{
483
+ The extra tags represent extra information extracted or generated by
484
+ ExifTool that is not directly associated with another tag group. The
485
+ B<Group> column lists the family 1 group name when reading. Tags with a "-"
486
+ in this column are write-only.
487
+
488
+ Tags in the family 1 "System" group are referred to as "pseudo" tags because
489
+ they don't represent real metadata in the file. Instead, this information
490
+ is stored in the directory structure of the filesystem. The four writable
491
+ "pseudo" tags (FileName, Directory, FileModifyDate and FileCreateDate) may
492
+ be written without modifying the file itself.
493
+ },
494
+ Composite => q{
495
+ The values of the composite tags are B<Derived From> the values of other
496
+ tags. These are convenience tags which are calculated after all other
497
+ information is extracted. User-defined Composite tags, useful for
498
+ custom-formatting of tag values, may created in the L<ExifTool configuration
499
+ file|../config.html>.
500
+ },
501
+ Shortcuts => q{
502
+ Shortcut tags are convenience tags that represent one or more other tag
503
+ names. They are used like regular tags to read and write the information
504
+ for a specified set of tags.
505
+
506
+ The shortcut tags below have been pre-defined, but user-defined shortcuts
507
+ may be added via the %Image::ExifTool::UserDefined::Shortcuts lookup in the
508
+ ~/.ExifTool_config file. See the Image::ExifTool::Shortcuts documentation
509
+ for more details.
510
+ },
511
+ MWG => q{
512
+ The Metadata Working Group (MWG) recommends techniques to allow certain
513
+ overlapping EXIF, IPTC and XMP tags to be reconciled when reading, and
514
+ synchronized when writing. The MWG Composite tags below are designed to aid
515
+ in the implementation of these recommendations. As well, the MWG defines
516
+ new XMP tags which are listed in the subsequent tables below. See
517
+ L<http://www.metadataworkinggroup.org/> for the official MWG specification.
518
+ },
519
+ PodTrailer => q{
520
+ ~head1 NOTES
521
+
522
+ This document generated automatically by
523
+ L<Image::ExifTool::BuildTagLookup|Image::ExifTool::BuildTagLookup>.
524
+
525
+ ~head1 AUTHOR
526
+
527
+ Copyright 2003-2013, Phil Harvey (phil at owl.phy.queensu.ca)
528
+
529
+ This library is free software; you can redistribute it and/or modify it
530
+ under the same terms as Perl itself.
531
+
532
+ ~head1 SEE ALSO
533
+
534
+ L<Image::ExifTool(3pm)|Image::ExifTool>
535
+
536
+ ~cut
537
+ },
538
+ );
539
+
540
+ # notes for Shortcuts tags
541
+ my %shortcutNotes = (
542
+ MakerNotes => q{
543
+ useful when copying tags between files to either copy the maker notes as a
544
+ block or prevent it from being copied
545
+ },
546
+ CommonIFD0 => q{
547
+ common metadata tags found in IFD0 of TIFF-format images. Used to simpify
548
+ deletion of all metadata from these images. See
549
+ L<FAQ number 7|../faq.html#Q7> for details
550
+ },
551
+ Unsafe => q{
552
+ "unsafe" tags in JPEG images which are normally not copied. Defined here
553
+ as a shortcut to use when rebuilding JPEG EXIF from scratch
554
+ },
555
+ );
556
+
557
+
558
+
559
+ # EXIF table tag ID's which are part of the EXIF 2.3 specification
560
+ # (used only to add underlines in HTML version of EXIF Tag Table)
561
+ my %exifSpec = (
562
+ 0x100 => 1, 0x212 => 1, 0x9204 => 1, 0xa217 => 1,
563
+ 0x101 => 1, 0x213 => 1, 0x9205 => 1, 0xa300 => 1,
564
+ 0x102 => 1, 0x214 => 1, 0x9206 => 1, 0xa301 => 1,
565
+ 0x103 => 1, 0x8298 => 1, 0x9207 => 1, 0xa302 => 1,
566
+ 0x106 => 1, 0x829a => 1, 0x9208 => 1, 0xa401 => 1,
567
+ 0x10e => 1, 0x829d => 1, 0x9209 => 1, 0xa402 => 1,
568
+ 0x10f => 1, 0x8769 => 1, 0x920a => 1, 0xa403 => 1,
569
+ 0x110 => 1, 0x8822 => 1, 0x9214 => 1, 0xa404 => 1,
570
+ 0x111 => 1, 0x8824 => 1, 0x927c => 1, 0xa405 => 1,
571
+ 0x112 => 1, 0x8825 => 1, 0x9286 => 1, 0xa406 => 1,
572
+ 0x115 => 1, 0x8827 => 1, 0x9290 => 1, 0xa407 => 1,
573
+ 0x116 => 1, 0x8828 => 1, 0x9291 => 1, 0xa408 => 1,
574
+ 0x117 => 1, 0x8830 => 1, 0x9292 => 1, 0xa409 => 1,
575
+ 0x11a => 1, 0x8831 => 1, 0xa000 => 1, 0xa40a => 1,
576
+ 0x11b => 1, 0x8832 => 1, 0xa001 => 1, 0xa40b => 1,
577
+ 0x11c => 1, 0x8833 => 1, 0xa002 => 1, 0xa40c => 1,
578
+ 0x128 => 1, 0x8834 => 1, 0xa003 => 1, 0xa420 => 1,
579
+ 0x12d => 1, 0x8835 => 1, 0xa004 => 1, 0xa430 => 1,
580
+ 0x131 => 1, 0x9000 => 1, 0xa005 => 1, 0xa431 => 1,
581
+ 0x132 => 1, 0x9003 => 1, 0xa20b => 1, 0xa432 => 1,
582
+ 0x13b => 1, 0x9004 => 1, 0xa20c => 1, 0xa433 => 1,
583
+ 0x13e => 1, 0x9101 => 1, 0xa20e => 1, 0xa434 => 1,
584
+ 0x13f => 1, 0x9102 => 1, 0xa20f => 1, 0xa435 => 1,
585
+ 0x201 => 1, 0x9201 => 1, 0xa210 => 1,
586
+ 0x202 => 1, 0x9202 => 1, 0xa214 => 1,
587
+ 0x211 => 1, 0x9203 => 1, 0xa215 => 1,
588
+ );
589
+ # same thing for RIFF INFO tags found in the EXIF spec
590
+ my %riffSpec = (
591
+ IARL => 1, ICRD => 1, IGNR => 1, IPLT => 1, ISRC => 1,
592
+ IART => 1, ICRP => 1, IKEY => 1, IPRD => 1, ISRF => 1,
593
+ ICMS => 1, IDIM => 1, ILGT => 1, ISBJ => 1, ITCH => 1,
594
+ ICMT => 1, IDPI => 1, IMED => 1, ISFT => 1,
595
+ ICOP => 1, IENG => 1, INAM => 1, ISHP => 1,
596
+ );
597
+ # same thing for XMP namespaces
598
+ my %xmpSpec = (
599
+ aux => 1, 'x' => 1,
600
+ crs => 1, xmp => 1,
601
+ dc => 1, xmpBJ => 1,
602
+ exif => 1, xmpDM => 1,
603
+ pdf => 1, xmpMM => 1,
604
+ pdfx => 1, xmpNote => 1,
605
+ photoshop => 1, xmpRights => 1,
606
+ tiff => 1, xmpTPg => 1,
607
+ );
608
+
609
+ #------------------------------------------------------------------------------
610
+ # New - create new BuildTagLookup object
611
+ # Inputs: 0) reference to BuildTagLookup object or BuildTagLookup class name
612
+ sub new
613
+ {
614
+ local $_;
615
+ my $that = shift;
616
+ my $class = ref($that) || $that || 'Image::ExifTool::BuildTagLookup';
617
+ my $self = bless {}, $class;
618
+ my (%subdirs, %isShortcut, %allStructs);
619
+ my %count = (
620
+ 'unique tag names' => 0,
621
+ 'total tags' => 0,
622
+ );
623
+ #
624
+ # loop through all tables, accumulating TagLookup and TagName information
625
+ #
626
+ my (%tagNameInfo, %id, %longID, %longName, %shortName, %tableNum,
627
+ %tagLookup, %tagExists, %tableWritable, %sepTable, %structs,
628
+ %compositeModules, %isPlugin, %flattened, %structLookup);
629
+ $self->{TAG_NAME_INFO} = \%tagNameInfo;
630
+ $self->{ID_LOOKUP} = \%id;
631
+ $self->{LONG_ID} = \%longID;
632
+ $self->{LONG_NAME} = \%longName;
633
+ $self->{SHORT_NAME} = \%shortName;
634
+ $self->{TABLE_NUM} = \%tableNum;
635
+ $self->{TAG_LOOKUP} = \%tagLookup;
636
+ $self->{TAG_EXISTS} = \%tagExists;
637
+ $self->{FLATTENED} = \%flattened;
638
+ $self->{TABLE_WRITABLE} = \%tableWritable;
639
+ $self->{SEPARATE_TABLE} = \%sepTable;
640
+ $self->{STRUCTURES} = \%structs;
641
+ $self->{STRUCT_LOOKUP} = \%structLookup; # lookup for Struct hash ref based on Struct name
642
+ $self->{COMPOSITE_MODULES} = \%compositeModules;
643
+ $self->{COUNT} = \%count;
644
+
645
+ Image::ExifTool::LoadAllTables();
646
+ my @tableNames = sort keys %allTables;
647
+ # add Shortcuts after other tables
648
+ push @tableNames, 'Image::ExifTool::Shortcuts::Main';
649
+ # add plug-in modules last
650
+ foreach (@pluginTables) {
651
+ push @tableNames, $_;
652
+ $isPlugin{$_} = 1;
653
+ }
654
+
655
+ my $tableNum = 0;
656
+ my $exifTool = new Image::ExifTool;
657
+ my ($tableName, $tag);
658
+ # create lookup for short table names
659
+ foreach $tableName (@tableNames) {
660
+ my $short = $tableName;
661
+ $short =~ s/^Image::ExifTool:://;
662
+ $short =~ s/::Main$//;
663
+ $short =~ s/::/ /;
664
+ $short =~ s/^(.+)Tags$/\u$1/ unless $short eq 'Nikon AVITags';
665
+ $short =~ s/^Exif\b/EXIF/;
666
+ # change underlines to dashes in XMP-mwg group names
667
+ # (we used underlines just because Perl variables can't contain dashes)
668
+ $short =~ s/^XMP mwg_/XMP mwg-/;
669
+ $shortName{$tableName} = $short; # remember short name
670
+ $tableNum{$tableName} = $tableNum++;
671
+ }
672
+ # validate DICOM UID values
673
+ foreach (values %Image::ExifTool::DICOM::uid) {
674
+ next unless /[\0-\x1f\x7f-\xff]/;
675
+ warn "Warning: Special characters in DICOM UID value ($_)\n";
676
+ }
677
+ # make lookup table to check for shortcut tags
678
+ foreach $tag (keys %Image::ExifTool::Shortcuts::Main) {
679
+ my $entry = $Image::ExifTool::Shortcuts::Main{$tag};
680
+ # ignore if shortcut tag name includes itself
681
+ next if ref $entry eq 'ARRAY' and grep /^$tag$/, @$entry;
682
+ $isShortcut{lc($tag)} = 1;
683
+ }
684
+ foreach $tableName (@tableNames) {
685
+ # create short table name
686
+ my $short = $shortName{$tableName};
687
+ my $info = $tagNameInfo{$tableName} = [ ];
688
+ my $isPlugin = $isPlugin{$tableName};
689
+ my ($table, $shortcut, %isOffset, %datamember, %hasSubdir);
690
+ if ($short eq 'Shortcuts') {
691
+ # can't use GetTagTable() for Shortcuts (not a normal table)
692
+ $table = \%Image::ExifTool::Shortcuts::Main;
693
+ $shortcut = 1;
694
+ } elsif ($isPlugin) {
695
+ $table = GetTagTable($tableName);
696
+ # don't add to allTables list because this messes our table order
697
+ delete $allTables{$tableName};
698
+ pop @tableOrder;
699
+ } else {
700
+ $table = GetTagTable($tableName);
701
+ }
702
+ my $tableNum = $tableNum{$tableName};
703
+ my $writeProc = $$table{WRITE_PROC};
704
+ my $vars = $$table{VARS} || { };
705
+ $longID{$tableName} = 0;
706
+ $longName{$tableName} = 0;
707
+ # save all tag names
708
+ my ($tagID, $binaryTable, $noID, $hexID, $isIPTC, $isXMP);
709
+ $isIPTC = 1 if $writeProc and $writeProc eq \&Image::ExifTool::IPTC::WriteIPTC;
710
+ # generate flattened tag names for structure fields if this is an XMP table
711
+ if ($$table{GROUPS} and $$table{GROUPS}{0} eq 'XMP') {
712
+ Image::ExifTool::XMP::AddFlattenedTags($table);
713
+ $isXMP = 1;
714
+ }
715
+ $noID = 1 if $isXMP or $short =~ /^(Shortcuts|ASF.*)$/ or $$vars{NO_ID};
716
+ $hexID = $$vars{HEX_ID};
717
+ my $processBinaryData = ($$table{PROCESS_PROC} and (
718
+ $$table{PROCESS_PROC} eq \&Image::ExifTool::ProcessBinaryData or
719
+ $$table{PROCESS_PROC} eq \&Image::ExifTool::Nikon::ProcessNikonEncrypted));
720
+ if ($$vars{ID_LABEL} or $processBinaryData) {
721
+ my $s = $$table{FORMAT} ? Image::ExifTool::FormatSize($$table{FORMAT}) || 1 : 1;
722
+ $binaryTable = 1;
723
+ $id{$tableName} = $$vars{ID_LABEL} || "Index$s";
724
+ } elsif ($isIPTC and $$table{PROCESS_PROC}) { #only the main IPTC table has a PROCESS_PROC
725
+ $id{$tableName} = 'Record';
726
+ } elsif (not $noID) {
727
+ $id{$tableName} = 'Tag ID';
728
+ }
729
+ $caseInsensitive = $isXMP;
730
+ $numbersFirst = -1 if $$table{VARS} and $$table{VARS}{ALPHA_FIRST};
731
+ my @keys = sort NumbersFirst TagTableKeys($table);
732
+ $numbersFirst = 1;
733
+ my $defFormat = $table->{FORMAT};
734
+ # use default format for binary data tables
735
+ $defFormat = 'int8u' if not $defFormat and $binaryTable;
736
+
737
+ TagID: foreach $tagID (@keys) {
738
+ my ($tagInfo, @tagNames, $subdir, @values);
739
+ my (@infoArray, @require, @writeGroup, @writable);
740
+ if ($shortcut) {
741
+ # must build a dummy tagInfo list since Shortcuts is not a normal table
742
+ $tagInfo = {
743
+ Name => $tagID,
744
+ Notes => $shortcutNotes{$tagID},
745
+ Writable => 1,
746
+ Require => { },
747
+ };
748
+ my $i;
749
+ for ($i=0; $i<@{$$table{$tagID}}; ++$i) {
750
+ $tagInfo->{Require}->{$i} = $table->{$tagID}->[$i];
751
+ }
752
+ @infoArray = ( $tagInfo );
753
+ } else {
754
+ @infoArray = GetTagInfoList($table,$tagID);
755
+ }
756
+ foreach $tagInfo (@infoArray) {
757
+ my $name = $$tagInfo{Name};
758
+ my $format = $$tagInfo{Format};
759
+ # validate Name (must not start with a digit or else XML output will not be valid)
760
+ if ($name !~ /^[-_A-Za-z][-\w]+$/ and
761
+ # single-character subdirectory names are allowed
762
+ (not $$tagInfo{SubDirectory} or $name !~ /^[-_A-Za-z]$/))
763
+ {
764
+ warn "Warning: Invalid tag name $short '$name'\n";
765
+ }
766
+ # validate list type
767
+ if ($$tagInfo{List} and $$tagInfo{List} !~ /^(1|Alt|Bag|Seq|array|string)$/) {
768
+ warn "Warning: Unknown List type ($$tagInfo{List}) for $name in $tableName\n";
769
+ }
770
+ # accumulate information for consistency check of BinaryData tables
771
+ if ($processBinaryData and $$table{WRITABLE}) {
772
+ # can't currently write tag if Condition accesses $valPt
773
+ if ($$tagInfo{Condition} and not $$tagInfo{SubDirectory} and
774
+ $$tagInfo{Condition} =~ /\$valPt/ and
775
+ ($$tagInfo{Writable} or not defined $$tagInfo{Writable}))
776
+ {
777
+ warn "Warning: Tag not writable due to Condition - $short $name\n";
778
+ }
779
+ $isOffset{$tagID} = $name if $$tagInfo{IsOffset};
780
+ $hasSubdir{$tagID} = $name if $$tagInfo{SubDirectory};
781
+ # require DATAMEMBER for writable var-format tags, Hook and DataMember tags
782
+ if ($format and $format =~ /^var_/) {
783
+ $datamember{$tagID} = $name;
784
+ unless (defined $$tagInfo{Writable} and not $$tagInfo{Writable}) {
785
+ warn "Warning: Var-format tag is writable - $short $name\n"
786
+ }
787
+ # also need DATAMEMBER for tags used in length of var-sized value
788
+ while ($format =~ /\$val\{(.*?)\}/g) {
789
+ my $id = $1;
790
+ $id = hex($id) if $id =~ /^0x/; # convert from hex if necessary
791
+ $datamember{$id} = $$table{$id}{Name} if ref $$table{$id} eq 'HASH';
792
+ unless ($datamember{$id}) {
793
+ warn "Warning: Unknown ID ($id) used in Format - $short $name\n";
794
+ }
795
+ }
796
+ } elsif ($$tagInfo{Hook} or ($$tagInfo{RawConv} and
797
+ $$tagInfo{RawConv} =~ /\$self(->)?\{\w+\}\s*=(?!~)/))
798
+ {
799
+ $datamember{$tagID} = $name;
800
+ }
801
+ if ($format and $format =~ /\$val\{/ and
802
+ ($$tagInfo{Writable} or not defined $$tagInfo{Writable}))
803
+ {
804
+ warn "Warning: \$var{} used in Format of writable tag - $short $name\n"
805
+ }
806
+ }
807
+ if ($$tagInfo{Hidden}) {
808
+ if ($tagInfo == $infoArray[0]) {
809
+ next TagID; # hide all tags with this ID if first tag in list is hidden
810
+ } else {
811
+ next; # only hide this tag
812
+ }
813
+ }
814
+ my $writable;
815
+ if (defined $$tagInfo{Writable}) {
816
+ $writable = $$tagInfo{Writable};
817
+ # validate Writable
818
+ unless ($formatOK{$writable} or ($writable =~ /(.*)\[/ and $formatOK{$1})) {
819
+ warn "Warning: Unknown Writable ($writable) - $short $name\n",
820
+ }
821
+ } elsif (not $$tagInfo{SubDirectory}) {
822
+ $writable = $$table{WRITABLE};
823
+ }
824
+ # validate some characteristics of obvious date/time tags
825
+ if ($$tagInfo{PrintConv} and $$tagInfo{PrintConv} eq '$self->ConvertDateTime($val)') {
826
+ my @g = $exifTool->GetGroup($tagInfo);
827
+ warn "$short $name should be in 'Time' group!\n" unless $g[2] eq 'Time';
828
+ if ($writable and not $$tagInfo{Shift} and $g[0] ne 'Composite' and
829
+ $short ne 'PostScript')
830
+ {
831
+ warn "$short $name is not shiftable!\n";
832
+ }
833
+ if ($writable and (not $$tagInfo{PrintConvInv} or
834
+ $$tagInfo{PrintConvInv} !~ /InverseDateTime/))
835
+ {
836
+ warn "$short $name missing InverseDateTime PrintConvInv\n";
837
+ }
838
+ } elsif ($name =~ /DateTime(?!Stamp)/ and (not $$tagInfo{Groups}{2} or
839
+ $$tagInfo{Groups}{2} ne 'Time') and $short ne 'DICOM') {
840
+ warn "$short $name should be in 'Time' group!\n";
841
+ }
842
+ # validate Description (can't contain special characters)
843
+ if ($$tagInfo{Description} and
844
+ $$tagInfo{Description} ne EscapeHTML($$tagInfo{Description}))
845
+ {
846
+ # this is a problem because the Escape option currently only
847
+ # escapes descriptions if the default Lang option isn't default
848
+ warn "$name description contains special characters!\n";
849
+ }
850
+ # generate structure lookup
851
+ my $struct = $$tagInfo{Struct};
852
+ my $strTable;
853
+ if (ref $struct) {
854
+ $strTable = $struct;
855
+ $struct = $$strTable{STRUCT_NAME};
856
+ if ($struct) {
857
+ my $oldTable = $structLookup{$struct};
858
+ if ($oldTable and $oldTable ne $strTable) {
859
+ warn "Duplicate XMP structure with name $struct\n";
860
+ } else {
861
+ $structLookup{$struct} = $strTable;
862
+ }
863
+ } else {
864
+ warn "Missing STRUCT_NAME for structure in $$tagInfo{Name}\n";
865
+ undef $strTable;
866
+ }
867
+ } elsif ($struct) {
868
+ $strTable = $structLookup{$struct};
869
+ unless ($strTable) {
870
+ $struct = "XMP $struct" unless $struct =~ / /;
871
+ warn "Missing $struct structure!\n";
872
+ undef $struct;
873
+ }
874
+ }
875
+ # validate SubIFD flag
876
+ my $subdir = $$tagInfo{SubDirectory};
877
+ my $isSub = ($subdir and $$subdir{Start} and $$subdir{Start} =~ /\$val\b/);
878
+ if ($$tagInfo{SubIFD}) {
879
+ warn "Warning: Wrong SubDirectory Start for SubIFD tag - $short $name\n" unless $isSub;
880
+ } else {
881
+ warn "Warning: SubIFD flag not set for $short $name\n" if $isSub;
882
+ }
883
+ if ($$tagInfo{Notes}) {
884
+ my $note = $$tagInfo{Notes};
885
+ # remove leading/trailing blank lines
886
+ $note =~ s/^\s+//; $note =~ s/\s+$//;
887
+ # remove leading/trailing spaces on each line
888
+ $note =~ s/(^[ \t]+|[ \t]+$)//mg;
889
+ push @values, "($note)";
890
+ } elsif ($isXMP and lc $tagID ne lc $name) {
891
+ # add note about different XMP Tag ID
892
+ if ($$tagInfo{RootTagInfo}) {
893
+ push @values, "($tagID)";
894
+ } else {
895
+ push @values,"(called $tagID by the spec)";
896
+ }
897
+ }
898
+ my $writeGroup;
899
+ if ($short eq 'Extra') {
900
+ my @g = $exifTool->GetGroup($tagInfo);
901
+ $writeGroup = $$tagInfo{WriteOnly} ? '-' : $g[1];
902
+ } else {
903
+ $writeGroup = $$tagInfo{WriteGroup};
904
+ }
905
+ unless ($writeGroup) {
906
+ $writeGroup = $$table{WRITE_GROUP} if $writable;
907
+ $writeGroup = '-' unless $writeGroup;
908
+ }
909
+ if (defined $format) {
910
+ # validate Format
911
+ unless ($formatOK{$format} or $short eq 'PICT' or
912
+ ($format =~ /^(var_)?(.*)\[/ and $formatOK{$2}))
913
+ {
914
+ warn "Warning: Unknown Format ($format) for $short $name\n";
915
+ }
916
+ } else {
917
+ $format = $defFormat;
918
+ }
919
+ if ($subdir) {
920
+ my $subTable = $$subdir{TagTable} || $tableName;
921
+ push @values, $shortName{$subTable}
922
+ } elsif ($struct) {
923
+ push @values, $struct;
924
+ $structs{$struct} = 1;
925
+ }
926
+ my $type;
927
+ foreach $type ('Require','Desire') {
928
+ my $require = $$tagInfo{$type};
929
+ if (ref $require) {
930
+ foreach (sort { $a <=> $b } keys %$require) {
931
+ push @require, $$require{$_};
932
+ }
933
+ } elsif ($require) {
934
+ push @require, $require;
935
+ }
936
+ }
937
+ my $printConv = $$tagInfo{PrintConv};
938
+ if ($$tagInfo{Mask}) {
939
+ my $val = $$tagInfo{Mask};
940
+ push @values, sprintf('[Mask 0x%.2x]',$val);
941
+ $$tagInfo{PrintHex} = 1 unless defined $$tagInfo{PrintHex};
942
+ # verify that all values are within the mask
943
+ if (ref $printConv eq 'HASH') {
944
+ # convert mask if necessary
945
+ if ($$tagInfo{ValueConv}) {
946
+ my $v = eval $$tagInfo{ValueConv};
947
+ $val = $v if defined $v;
948
+ }
949
+ foreach (keys %$printConv) {
950
+ next if $_ !~ /^\d+$/ or ($_ & $val) == $_;
951
+ my $hex = sprintf '0x%.2x', $_;
952
+ warn "$short $name PrintConv value $hex is not in Mask!\n";
953
+ }
954
+ }
955
+ }
956
+ if (ref($printConv) =~ /^(HASH|ARRAY)$/) {
957
+ my (@printConvList, @indexList, $index);
958
+ if (ref $printConv eq 'ARRAY') {
959
+ for ($index=0; $index<@$printConv; ++$index) {
960
+ next if ref $$printConv[$index] ne 'HASH';
961
+ next unless %{$$printConv[$index]};
962
+ push @printConvList, $$printConv[$index];
963
+ push @indexList, $index;
964
+ # collapse values with identical PrintConv's
965
+ if (@printConvList >= 2 and $printConvList[-1] eq $printConvList[-2]) {
966
+ if (ref $indexList[-2]) {
967
+ push @{$indexList[-2]}, $indexList[-1];
968
+ } else {
969
+ $indexList[-2] = [ $indexList[-2], $indexList[-1] ];
970
+ }
971
+ pop @printConvList;
972
+ pop @indexList;
973
+ }
974
+ }
975
+ $printConv = shift @printConvList;
976
+ $index = shift @indexList;
977
+ }
978
+ while (defined $printConv) {
979
+ if (defined $index) {
980
+ # (print indices of original values if reorganized)
981
+ my $s = '';
982
+ my $idx = $$tagInfo{Relist} ? $tagInfo->{Relist}->[$index] : $index;
983
+ if (ref $idx) {
984
+ $s = 's' if @$idx > 1;
985
+ # collapse consecutive number ranges
986
+ my ($i, @i, $rngStart);
987
+ for ($i=0; $i<@$idx; ++$i) {
988
+ if ($i < @$idx - 1 and $$idx[$i+1] == $$idx[$i] + 1) {
989
+ $rngStart = $i unless defined $rngStart;
990
+ next;
991
+ }
992
+ push @i, defined($rngStart) ? "$rngStart-$i" : $i;
993
+ }
994
+ ($idx = join ', ', @i) =~ s/(.*),/$1 and/;
995
+ } elsif (not $$tagInfo{Relist}) {
996
+ while (@printConvList and $printConv eq $printConvList[0]) {
997
+ shift @printConvList;
998
+ $index = shift @indexList;
999
+ }
1000
+ if ($idx != $index) {
1001
+ $idx = "$idx-$index";
1002
+ $s = 's';
1003
+ }
1004
+ }
1005
+ push @values, "[Value$s $idx]";
1006
+ }
1007
+ if ($$tagInfo{SeparateTable}) {
1008
+ $subdir = 1;
1009
+ my $s = $$tagInfo{SeparateTable};
1010
+ $s = $name if $s eq '1';
1011
+ # add module name if not specified
1012
+ $s =~ / / or ($short =~ /^(\w+)/ and $s = "$1 $s");
1013
+ push @values, $s;
1014
+ $sepTable{$s} = $printConv;
1015
+ # add PrintHex flag to PrintConv so we can check it later
1016
+ $$printConv{PrintHex} = 1 if $$tagInfo{PrintHex};
1017
+ $$printConv{PrintString} = 1 if $$tagInfo{PrintString};
1018
+ } else {
1019
+ $caseInsensitive = 0;
1020
+ my @pk = sort NumbersFirst keys %$printConv;
1021
+ my $n = scalar @values;
1022
+ my ($bits, $i);
1023
+ foreach (@pk) {
1024
+ next if $_ eq '';
1025
+ $_ eq 'BITMASK' and $bits = $$printConv{$_}, next;
1026
+ $_ eq 'OTHER' and next;
1027
+ my $index;
1028
+ if (($$tagInfo{PrintHex} or $$printConv{BITMASK}) and /^-?\d+$/) {
1029
+ if ($_ >= 0) {
1030
+ $index = sprintf('0x%x', $_);
1031
+ } elsif ($format and $format =~ /int(16|32)/) {
1032
+ # mask off unused bits of signed integer hex value
1033
+ my $mask = { 16 => 0xffff, 32 => 0xffffffff }->{$1};
1034
+ $index = sprintf('0x%x', $_ & $mask);
1035
+ } else {
1036
+ $index = $_;
1037
+ }
1038
+ } elsif (/^[+-]?(?=\d|\.\d)\d*(\.\d*)?$/ and not $$tagInfo{PrintString}) {
1039
+ $index = $_;
1040
+ } else {
1041
+ $index = $_;
1042
+ # translate unprintable values
1043
+ if ($index =~ s/([\x00-\x1f\x80-\xff])/sprintf("\\x%.2x",ord $1)/eg) {
1044
+ $index = qq{"$index"};
1045
+ } else {
1046
+ $index = qq{'$index'};
1047
+ }
1048
+ }
1049
+ push @values, "$index = " . $$printConv{$_};
1050
+ # validate all PrintConv values
1051
+ if ($$printConv{$_} =~ /[\0-\x1f\x7f-\xff]/) {
1052
+ warn "Warning: Special characters in $short $name PrintConv ($$printConv{$_})\n";
1053
+ }
1054
+ }
1055
+ if ($bits) {
1056
+ my @pk = sort NumbersFirst keys %$bits;
1057
+ foreach (@pk) {
1058
+ push @values, "Bit $_ = " . $$bits{$_};
1059
+ }
1060
+ }
1061
+ # organize values into columns if specified
1062
+ my $cols = $$tagInfo{PrintConvColumns};
1063
+ if (not $cols and scalar(@values) - $n >= 6) {
1064
+ # do columns if more than 6 short entries
1065
+ my $maxLen = 0;
1066
+ for ($i=$n; $i<@values; ++$i) {
1067
+ next unless $maxLen < length $values[$i];
1068
+ $maxLen = length $values[$i];
1069
+ }
1070
+ my $num = scalar(@values) - $n;
1071
+ $cols = int(50 / ($maxLen + 2)); # (50 chars max width)
1072
+ # have 3 rows minimum
1073
+ --$cols while $cols and $num / $cols < 3;
1074
+ }
1075
+ if ($cols) {
1076
+ my @new = splice @values, $n;
1077
+ my $v = '[!HTML]<table class=cols><tr>';
1078
+ my $rows = int((scalar(@new) + $cols - 1) / $cols);
1079
+ for ($n=0; $n<@new; $n+=$rows) {
1080
+ $v .= "\n <td>";
1081
+ for ($i=0; $i<$rows and $n+$i<@new; ++$i) {
1082
+ $v .= "\n <br>" if $i;
1083
+ $v .= EscapeHTML($new[$n+$i]);
1084
+ }
1085
+ $v .= '</td><td>&nbsp;&nbsp;</td>';
1086
+ }
1087
+ push @values, $v . "</tr></table>\n";
1088
+ }
1089
+ }
1090
+ last unless @printConvList;
1091
+ $printConv = shift @printConvList;
1092
+ $index = shift @indexList;
1093
+ }
1094
+ } elsif ($printConv and $printConv =~ /DecodeBits\(\$val,\s*(\{.*\})\s*\)/s) {
1095
+ $$self{Model} = ''; # needed for Nikon ShootingMode
1096
+ my $bits = eval $1;
1097
+ delete $$self{Model};
1098
+ if ($@) {
1099
+ warn $@;
1100
+ } else {
1101
+ my @pk = sort NumbersFirst keys %$bits;
1102
+ foreach (@pk) {
1103
+ push @values, "Bit $_ = " . $$bits{$_};
1104
+ }
1105
+ }
1106
+ }
1107
+ if ($subdir and not $$tagInfo{SeparateTable}) {
1108
+ # subdirectories are only writable if specified explicitly
1109
+ my $tw = $$tagInfo{Writable};
1110
+ $writable = 'Y' if $tw and $writable eq '1';
1111
+ $writable = '-' . ($tw ? $writable : '');
1112
+ $writable .= '!' if $tw and ($$tagInfo{Protected} || 0) & 0x01;
1113
+ $writable .= '+' if $$tagInfo{List};
1114
+ } else {
1115
+ # not writable if we can't do the inverse conversions
1116
+ my $noPrintConvInv;
1117
+ if ($writable) {
1118
+ foreach ('PrintConv','ValueConv') {
1119
+ next unless $$tagInfo{$_};
1120
+ next if $$tagInfo{$_ . 'Inv'};
1121
+ next if ref($$tagInfo{$_}) =~ /^(HASH|ARRAY)$/;
1122
+ next if $$tagInfo{WriteAlso};
1123
+ if ($_ eq 'ValueConv') {
1124
+ undef $writable;
1125
+ } else {
1126
+ $noPrintConvInv = 1;
1127
+ }
1128
+ }
1129
+ }
1130
+ if (not $writable) {
1131
+ $writable = 'N';
1132
+ } else {
1133
+ $writable eq '1' and $writable = $format ? $format : 'Y';
1134
+ my $count = $$tagInfo{Count} || 1;
1135
+ # adjust count to Writable size if different than Format
1136
+ if ($writable and $format and $writable ne $format and
1137
+ $Image::ExifTool::Exif::formatNumber{$writable} and
1138
+ $Image::ExifTool::Exif::formatNumber{$format})
1139
+ {
1140
+ my $n1 = $Image::ExifTool::Exif::formatNumber{$format};
1141
+ my $n2 = $Image::ExifTool::Exif::formatNumber{$writable};
1142
+ $count *= $Image::ExifTool::Exif::formatSize[$n1] /
1143
+ $Image::ExifTool::Exif::formatSize[$n2];
1144
+ }
1145
+ if ($count != 1) {
1146
+ $count = 'n' if $count < 0;
1147
+ $writable .= "[$count]";
1148
+ }
1149
+ $writable .= '~' if $noPrintConvInv;
1150
+ # add a '*' if this tag is protected or a '!' for unsafe tags
1151
+ if ($$tagInfo{Protected}) {
1152
+ $writable .= '*' if $$tagInfo{Protected} & 0x02;
1153
+ $writable .= '!' if $$tagInfo{Protected} & 0x01;
1154
+ }
1155
+ $writable .= '/' if $$tagInfo{Avoid};
1156
+ }
1157
+ $writable = "=struct" if $struct;
1158
+ $writable .= '_' if defined $$tagInfo{Flat};
1159
+ $writable .= '+' if $$tagInfo{List};
1160
+ $writable .= ':' if $$tagInfo{Mandatory};
1161
+ # separate tables link like subdirectories (flagged with leading '-')
1162
+ $writable = "-$writable" if $subdir;
1163
+ }
1164
+ # don't duplicate a tag name unless an entry is different
1165
+ my $lcName = lc($name);
1166
+ # check for conflicts with shortcut names
1167
+ if ($isShortcut{$lcName} and $short ne 'Shortcuts' and
1168
+ ($$tagInfo{Writable} or not $$tagInfo{SubDirectory}))
1169
+ {
1170
+ warn "WARNING: $short $name is a shortcut tag!\n";
1171
+ }
1172
+ $name .= '?' if $$tagInfo{Unknown};
1173
+ unless (@tagNames and $tagNames[-1] eq $name and
1174
+ $writeGroup[-1] eq $writeGroup and $writable[-1] eq $writable)
1175
+ {
1176
+ push @tagNames, $name;
1177
+ push @writeGroup, $writeGroup;
1178
+ push @writable, $writable;
1179
+ }
1180
+ #
1181
+ # add this tag to the tag lookup unless NO_LOOKUP is set or shortcut or plug-in tag
1182
+ #
1183
+ next if $shortcut or $isPlugin;
1184
+ next if $$vars{NO_LOOKUP};
1185
+ # count our tags
1186
+ if ($$tagInfo{SubDirectory}) {
1187
+ $subdirs{$lcName} or $subdirs{$lcName} = 0;
1188
+ ++$subdirs{$lcName};
1189
+ } else {
1190
+ ++$count{'total tags'};
1191
+ unless ($tagExists{$lcName} and (not $subdirs{$lcName} or $subdirs{$lcName} == $tagExists{$lcName})) {
1192
+ ++$count{'unique tag names'};
1193
+ }
1194
+ }
1195
+ $tagExists{$lcName} or $tagExists{$lcName} = 0;
1196
+ ++$tagExists{$lcName};
1197
+ # only add writable tags to lookup table (for speed)
1198
+ my $wflag = $$tagInfo{Writable};
1199
+ next unless $writeProc and ($wflag or ($$table{WRITABLE} and
1200
+ not defined $wflag and not $$tagInfo{SubDirectory}));
1201
+ $tagLookup{$lcName} or $tagLookup{$lcName} = { };
1202
+ # add to lookup for flattened tags if necessary
1203
+ if ($$tagInfo{RootTagInfo}) {
1204
+ $flattened{$lcName} or $flattened{$lcName} = { };
1205
+ $flattened{$lcName}{$tableNum} = $$tagInfo{RootTagInfo}{TagID};
1206
+ }
1207
+ # remember number for this table
1208
+ my $tagIDs = $tagLookup{$lcName}->{$tableNum};
1209
+ # must allow for duplicate tags with the same name in a single table!
1210
+ if ($tagIDs) {
1211
+ if (ref $tagIDs eq 'HASH') {
1212
+ $$tagIDs{$tagID} = 1;
1213
+ next;
1214
+ } elsif ($tagID eq $tagIDs) {
1215
+ next;
1216
+ } else {
1217
+ $tagIDs = { $tagIDs => 1, $tagID => 1 };
1218
+ }
1219
+ } else {
1220
+ $tagIDs = $tagID;
1221
+ }
1222
+ $tableWritable{$tableName} = 1;
1223
+ $tagLookup{$lcName}->{$tableNum} = $tagIDs;
1224
+ if ($short eq 'Composite' and $$tagInfo{Module}) {
1225
+ $compositeModules{$lcName} = $$tagInfo{Module};
1226
+ }
1227
+ }
1228
+ #
1229
+ # save TagName information
1230
+ #
1231
+ my $tagIDstr;
1232
+ if ($tagID =~ /^\d+(\.\d+)?$/) {
1233
+ if (defined $hexID) {
1234
+ $tagIDstr = $hexID ? sprintf('0x%.4x',$tagID) : $tagID;
1235
+ } elsif (not $1 and not $binaryTable and not $isIPTC and
1236
+ not ($short =~ /^CanonCustom/ and $tagID < 256))
1237
+ {
1238
+ $tagIDstr = sprintf('0x%.4x',$tagID);
1239
+ } elsif ($tagID < 0x10000) {
1240
+ $tagIDstr = $tagID;
1241
+ } else {
1242
+ $tagIDstr = sprintf('0x%.8x',$tagID);
1243
+ }
1244
+ } elsif ($short eq 'DICOM') {
1245
+ ($tagIDstr = $tagID) =~ s/_/,/;
1246
+ } else {
1247
+ # convert non-printable characters to hex escape sequences
1248
+ if ($tagID =~ s/([\x00-\x1f\x7f-\xff])/'\x'.unpack('H*',$1)/eg) {
1249
+ $tagID =~ s/\\x00/\\0/g;
1250
+ next if $tagID eq 'jP\x1a\x1a'; # ignore abnormal JP2 signature tag
1251
+ $tagIDstr = qq{"$tagID"};
1252
+ } else {
1253
+ $tagIDstr = "'$tagID'";
1254
+ }
1255
+ }
1256
+ my $len = length $tagIDstr;
1257
+ $longID{$tableName} = $len if $longID{$tableName} < $len;
1258
+ foreach (@tagNames) {
1259
+ $len = length $_;
1260
+ $longName{$tableName} = $len if $longName{$tableName} < $len;
1261
+ }
1262
+ push @$info, [ $tagIDstr, \@tagNames, \@writable, \@values, \@require, \@writeGroup ];
1263
+ }
1264
+ # do consistency check of writable BinaryData tables
1265
+ if ($processBinaryData and $$table{WRITABLE}) {
1266
+ my %lookup = (
1267
+ IS_OFFSET => \%isOffset,
1268
+ IS_SUBDIR => \%hasSubdir,
1269
+ DATAMEMBER => \%datamember,
1270
+ );
1271
+ my ($var, $tagID);
1272
+ foreach $var (sort keys %lookup) {
1273
+ my $hash = $lookup{$var};
1274
+ if ($$table{$var}) {
1275
+ foreach $tagID (@{$$table{$var}}) {
1276
+ $$hash{$tagID} and delete($$hash{$tagID}), next;
1277
+ warn "Warning: Extra $var for $short tag $tagID\n";
1278
+ }
1279
+ }
1280
+ foreach $tagID (sort keys %$hash) {
1281
+ warn "Warning: Missing $var for $short $$hash{$tagID}\n";
1282
+ }
1283
+ }
1284
+ }
1285
+ }
1286
+ # save information about structures
1287
+ my $strName;
1288
+ foreach $strName (keys %structs) {
1289
+ my $struct = $structLookup{$strName};
1290
+ my $fullName = ($strName =~ / / ? '' : 'XMP ') . "$strName Struct";
1291
+ my $info = $tagNameInfo{$fullName} = [ ];
1292
+ my $tag;
1293
+ foreach $tag (sort keys %$struct) {
1294
+ my $tagInfo = $$struct{$tag};
1295
+ next unless ref $tagInfo eq 'HASH';
1296
+ my $writable = $$tagInfo{Writable};
1297
+ my @vals;
1298
+ unless ($writable) {
1299
+ $writable = $$tagInfo{Struct};
1300
+ ref $writable and $writable = $$writable{STRUCT_NAME};
1301
+ if ($writable) {
1302
+ push @vals, $writable;
1303
+ $structs{$writable} = 1;
1304
+ $writable = "=$writable";
1305
+ } else {
1306
+ $writable = 'string';
1307
+ }
1308
+ }
1309
+ $writable .= '+' if $$tagInfo{List};
1310
+ push @$info, [
1311
+ $tag,
1312
+ [ $$tagInfo{Name} || ucfirst($tag) ],
1313
+ [ $writable ],
1314
+ \@vals,
1315
+ [], []
1316
+ ];
1317
+ }
1318
+ }
1319
+ return $self;
1320
+ }
1321
+
1322
+ #------------------------------------------------------------------------------
1323
+ # Rewrite this file to build the lookup tables
1324
+ # Inputs: 0) BuildTagLookup object reference
1325
+ # 1) output tag lookup module name (ie. 'lib/Image/ExifTool/TagLookup.pm')
1326
+ # Returns: true on success
1327
+ sub WriteTagLookup($$)
1328
+ {
1329
+ local ($_, *INFILE, *OUTFILE);
1330
+ my ($self, $file) = @_;
1331
+ my $tagLookup = $self->{TAG_LOOKUP};
1332
+ my $tagExists = $self->{TAG_EXISTS};
1333
+ my $flattened = $self->{FLATTENED};
1334
+ my $tableWritable = $self->{TABLE_WRITABLE};
1335
+ #
1336
+ # open/create necessary files and transfer file headers
1337
+ #
1338
+ my $tmpFile = "${file}_tmp";
1339
+ open(INFILE, $file) or warn("Can't open $file\n"), return 0;
1340
+ unless (open(OUTFILE, ">$tmpFile")) {
1341
+ warn "Can't create temporary file $tmpFile\n";
1342
+ close(INFILE);
1343
+ return 0;
1344
+ }
1345
+ my $success;
1346
+ while (<INFILE>) {
1347
+ print OUTFILE $_ or last;
1348
+ if (/^#\+{4} Begin/) {
1349
+ $success = 1;
1350
+ last;
1351
+ }
1352
+ }
1353
+ print OUTFILE "\n# list of tables containing writable tags\n";
1354
+ print OUTFILE "my \@tableList = (\n";
1355
+
1356
+ #
1357
+ # write table list
1358
+ #
1359
+ my @tableNames = sort keys %allTables;
1360
+ my $tableName;
1361
+ my %wrNum; # translate from allTables index to writable tables index
1362
+ my $count = 0;
1363
+ my $num = 0;
1364
+ foreach $tableName (@tableNames) {
1365
+ if ($$tableWritable{$tableName}) {
1366
+ print OUTFILE "\t'$tableName',\n";
1367
+ $wrNum{$count} = $num++;
1368
+ }
1369
+ $count++;
1370
+ }
1371
+ #
1372
+ # write the tag lookup table
1373
+ #
1374
+ my $tag;
1375
+ # verify that certain critical tag names aren't duplicated
1376
+ foreach $tag (qw{filename directory}) {
1377
+ next unless $$tagLookup{$tag};
1378
+ my $n = scalar keys %{$$tagLookup{$tag}};
1379
+ warn "Warning: $n writable '$tag' tags!\n" if $n > 1;
1380
+ }
1381
+ print OUTFILE ");\n\n# lookup for all writable tags\nmy \%tagLookup = (\n";
1382
+ foreach $tag (sort keys %$tagLookup) {
1383
+ print OUTFILE "\t'$tag' => { ";
1384
+ my @tableNums = sort { $a <=> $b } keys %{$$tagLookup{$tag}};
1385
+ my (@entries, $tableNum);
1386
+ foreach $tableNum (@tableNums) {
1387
+ my $tagID = $$tagLookup{$tag}{$tableNum};
1388
+ my $rootID = $$flattened{$tag}{$tableNum};
1389
+ my $entry;
1390
+ if (ref $tagID eq 'HASH' or $rootID) {
1391
+ $tagID = { $tagID => 1 } unless ref $tagID eq 'HASH';
1392
+ my @tagIDs = sort keys %$tagID;
1393
+ foreach (@tagIDs) {
1394
+ if (/^\d+$/) {
1395
+ $_ = sprintf('0x%x',$_);
1396
+ } else {
1397
+ my $quot = "'";
1398
+ # escape non-printable characters in tag ID if necessary
1399
+ $quot = '"' if s/[\x00-\x1f,\x7f-\xff]/sprintf('\\x%.2x',ord($&))/ge;
1400
+ $_ = $quot . $_ . $quot;
1401
+ }
1402
+ }
1403
+ # reference to root structure ID must come first in lookup
1404
+ # (so we can generate the flattened tags just before we need them)
1405
+ unshift @tagIDs, "\\'$rootID'" if $rootID;
1406
+ $entry = '[' . join(',', @tagIDs) . ']';
1407
+ } elsif ($tagID =~ /^\d+$/) {
1408
+ $entry = sprintf('0x%x',$tagID);
1409
+ } else {
1410
+ $entry = "'$tagID'";
1411
+ }
1412
+ my $wrNum = $wrNum{$tableNum};
1413
+ push @entries, "$wrNum => $entry";
1414
+ }
1415
+ print OUTFILE join(', ', @entries);
1416
+ print OUTFILE " },\n";
1417
+ }
1418
+ #
1419
+ # write tag exists lookup
1420
+ #
1421
+ print OUTFILE ");\n\n# lookup for non-writable tags to check if the name exists\n";
1422
+ print OUTFILE "my \%tagExists = (\n";
1423
+ foreach $tag (sort keys %$tagExists) {
1424
+ next if $$tagLookup{$tag};
1425
+ print OUTFILE "\t'$tag' => 1,\n";
1426
+ }
1427
+ #
1428
+ # write module lookup for writable composite tags
1429
+ #
1430
+ my $compositeModules = $self->{COMPOSITE_MODULES};
1431
+ print OUTFILE ");\n\n# module names for writable Composite tags\n";
1432
+ print OUTFILE "my \%compositeModules = (\n";
1433
+ foreach (sort keys %$compositeModules) {
1434
+ print OUTFILE "\t'$_' => '$$compositeModules{$_}',\n";
1435
+ }
1436
+ print OUTFILE ");\n\n";
1437
+ #
1438
+ # finish writing TagLookup.pm and clean up
1439
+ #
1440
+ if ($success) {
1441
+ $success = 0;
1442
+ while (<INFILE>) {
1443
+ $success or /^#\+{4} End/ or next;
1444
+ print OUTFILE $_;
1445
+ $success = 1;
1446
+ }
1447
+ }
1448
+ close(INFILE);
1449
+ close(OUTFILE) or $success = 0;
1450
+ #
1451
+ # return success code
1452
+ #
1453
+ if ($success) {
1454
+ local (*ORG, *TMP);
1455
+ # only rename the file if something changed
1456
+ open ORG, $file or return 0;
1457
+ open TMP, $tmpFile or return 0;
1458
+ my ($buff, $buf2, $changed);
1459
+ for (;;) {
1460
+ my $n1 = read ORG, $buff, 65536;
1461
+ my $n2 = read TMP, $buf2, 65536;
1462
+ $n1 eq $n2 or $changed = 1, last;
1463
+ last unless $n1;
1464
+ $buff eq $buf2 or $changed = 1, last;
1465
+ }
1466
+ close ORG;
1467
+ close TMP;
1468
+ if ($changed) {
1469
+ rename($tmpFile, $file) or warn("Error renaming $tmpFile\n"), $success = 0;
1470
+ } else {
1471
+ unlink($tmpFile);
1472
+ }
1473
+ } else {
1474
+ unlink($tmpFile);
1475
+ warn "Error rewriting file\n";
1476
+ }
1477
+ return $success;
1478
+ }
1479
+
1480
+ #------------------------------------------------------------------------------
1481
+ # sort numbers first numerically, then strings alphabetically (case insensitive)
1482
+ sub NumbersFirst
1483
+ {
1484
+ my $rtnVal;
1485
+ my ($bNum, $bDec);
1486
+ ($bNum, $bDec) = ($1, $3) if $b =~ /^(-?[0-9]+)(\.(\d*))?$/;
1487
+ if ($a =~ /^(-?[0-9]+)(\.(\d*))?$/) {
1488
+ if (defined $bNum) {
1489
+ # compare integer part as a number
1490
+ $rtnVal = $1 <=> $bNum;
1491
+ unless ($rtnVal) {
1492
+ my $aDec = $3 || 0;
1493
+ $bDec or $bDec = 0;
1494
+ # compare decimal part as an integer too
1495
+ # (so that "1.10" comes after "1.9")
1496
+ $rtnVal = $aDec <=> $bDec;
1497
+ }
1498
+ } else {
1499
+ $rtnVal = -$numbersFirst;
1500
+ }
1501
+ } elsif (defined $bNum) {
1502
+ $rtnVal = $numbersFirst;
1503
+ } else {
1504
+ my ($a2, $b2) = ($a, $b);
1505
+ # expand numbers to 3 digits (with restrictions to avoid messing up ascii-hex tags)
1506
+ $a2 =~ s/(\d+)/sprintf("%.3d",$1)/eg if $a2 =~ /^(APP)?[.0-9 ]*$/ and length($a2)<16;
1507
+ $b2 =~ s/(\d+)/sprintf("%.3d",$1)/eg if $b2 =~ /^(APP)?[.0-9 ]*$/ and length($b2)<16;
1508
+ $caseInsensitive and $rtnVal = (lc($a2) cmp lc($b2));
1509
+ $rtnVal or $rtnVal = ($a2 cmp $b2);
1510
+ }
1511
+ return $rtnVal;
1512
+ }
1513
+
1514
+ #------------------------------------------------------------------------------
1515
+ # Convert our pod-like documentation to pod
1516
+ # (funny, I know, but the pod headings must be hidden to prevent confusing
1517
+ # the pod parser)
1518
+ # Inputs: 0-N) documentation strings
1519
+ sub Doc2Pod($;@)
1520
+ {
1521
+ my $doc = shift;
1522
+ local $_;
1523
+ $doc .= shift while @_;
1524
+ $doc =~ s/\n~/\n=/g;
1525
+ $doc =~ s/L<[^>]+?\|(http[^>]+)>/L<$1>/g; # POD doesn't support text for http links
1526
+ $doc =~ s/L<([^>]+?)\|[^>]+\.html>/$1/g; # remove relative HTML links
1527
+ return $doc;
1528
+ }
1529
+
1530
+ #------------------------------------------------------------------------------
1531
+ # Convert our pod-like documentation to html
1532
+ # Inputs: 0) string
1533
+ sub Doc2Html($)
1534
+ {
1535
+ my $doc = EscapeHTML(shift);
1536
+ $doc =~ s/\n\n/<\/p>\n\n<p>/g;
1537
+ $doc =~ s/B&lt;(.*?)&gt;/<b>$1<\/b>/sg;
1538
+ $doc =~ s/C&lt;(.*?)&gt;/<code>$1<\/code>/sg;
1539
+ $doc =~ s/I&lt;(.*?)&gt;/<i>$1<\/i>/sg;
1540
+ # L<some text|http://owl.phy.queensu.ca/~phil/exiftool/struct.html#Fields> --> <a href="../struct.html#Fields">some text</a>
1541
+ $doc =~ s{L&lt;([^&]+?)\|\Q$homePage\E/(.*?)&gt;}{<a href="../$2">$1<\/a>}sg;
1542
+ # L<http://owl.phy.queensu.ca/~phil/exiftool/struct.html> --> <a href="http://owl.phy.queensu.ca/~phil/exiftool/struct.html">http://owl.phy.queensu.ca/~phil/exiftool/struct.html</a>
1543
+ $doc =~ s{L&lt;\Q$homePage\E/(.*?)&gt;}{<a href="../$1">$1<\/a>}sg;
1544
+ # L<XMP DICOM Tags|Image::ExifTool::TagNames/XMP DICOM Tags> --> <a href="XMP.html#DICOM">XMP DICOM Tags</a>
1545
+ # (specify "Image::ExifTool::TagNames" to link to another html file)
1546
+ $doc =~ s{L&lt;([^&]+?)\|Image::ExifTool::TagNames/(\w+) ([^/&|]+) Tags&gt;}{<a href="$2.html#$3">$1</a>}sg;
1547
+ # L<DICOM Tags|Image::ExifTool::TagNames/DICOM Tags> --> <a href="DICOM.html">DICOM Tags</a>
1548
+ $doc =~ s{L&lt;([^&]+?)\|Image::ExifTool::TagNames/(\w+) Tags&gt;}{<a href="$2.html">$1</a>}sg;
1549
+ # L<dc|/XMP dc Tags> --> <a href="#dc">dc</a>
1550
+ # (a relative POD link turns into a relative HTML link)
1551
+ $doc =~ s{L&lt;([^&]+?)\|/\w+ ([^/&|]+) Tags&gt;}{<a href="#$2">$1</a>}sg;
1552
+ # L<sample config file|../config.html> --> <a href="../config.html">sample config file</a>
1553
+ $doc =~ s/L&lt;([^&]+?)\|(.+?)&gt;/<a href="$2">$1<\/a>/sg;
1554
+ # L<http://some.web.site/> --> <a href="http://some.web.site">http://some.web.site</a>
1555
+ $doc =~ s/L&lt;(http.*?)&gt;/<a href="$1">$1<\/a>/sg;
1556
+ return $doc;
1557
+ }
1558
+
1559
+ #------------------------------------------------------------------------------
1560
+ # Tweak order of tables
1561
+ # Inputs: 0) table list ref, 1) reference to tweak hash
1562
+ sub TweakOrder($$)
1563
+ {
1564
+ my ($sortedTables, $tweakOrder) = @_;
1565
+ my @tweak = sort keys %$tweakOrder;
1566
+ while (@tweak) {
1567
+ my $table = shift @tweak;
1568
+ my $first = $$tweakOrder{$table};
1569
+ if ($$tweakOrder{$first}) {
1570
+ push @tweak, $table; # must defer this till later
1571
+ next;
1572
+ }
1573
+ delete $$tweakOrder{$table}; # because the table won't move again
1574
+ my @moving = grep /^Image::ExifTool::$table\b/, @$sortedTables;
1575
+ my @notMoving = grep !/^Image::ExifTool::$table\b/, @$sortedTables;
1576
+ my @after;
1577
+ while (@notMoving) {
1578
+ last if $notMoving[-1] =~ /^Image::ExifTool::$first\b/;
1579
+ unshift @after, pop @notMoving;
1580
+ }
1581
+ @$sortedTables = (@notMoving, @moving, @after);
1582
+ }
1583
+ }
1584
+
1585
+ #------------------------------------------------------------------------------
1586
+ # Get the order that we want to print the tables in the documentation
1587
+ # Inputs: 0-N) Extra tables to add at end
1588
+ # Returns: tables in the order we want
1589
+ sub GetTableOrder(@)
1590
+ {
1591
+ my %gotTable;
1592
+ my @tableNames = @tableOrder;
1593
+ my (@orderedTables, %mainTables, @outOfOrder);
1594
+ my $lastTable = '';
1595
+
1596
+ while (@tableNames) {
1597
+ my $tableName = shift @tableNames;
1598
+ next if $gotTable{$tableName};
1599
+ if ($tableName =~ /^Image::ExifTool::(\w+)::Main/) {
1600
+ $mainTables{$1} = 1;
1601
+ } elsif ($lastTable and not $tableName =~ /^${lastTable}::/) {
1602
+ push @outOfOrder, $tableName;
1603
+ }
1604
+ ($lastTable) = ($tableName =~ /^(Image::ExifTool::\w+)/);
1605
+ push @orderedTables, $tableName;
1606
+ $gotTable{$tableName} = 1;
1607
+ my $table = GetTagTable($tableName);
1608
+ # recursively scan through tables in subdirectories
1609
+ my @moreTables;
1610
+ $caseInsensitive = ($$table{GROUPS} and $$table{GROUPS}{0} eq 'XMP');
1611
+ $numbersFirst = -1 if $$table{VARS} and $$table{VARS}{ALPHA_FIRST};
1612
+ my @keys = sort NumbersFirst TagTableKeys($table);
1613
+ $numbersFirst = 1;
1614
+ foreach (@keys) {
1615
+ my @infoArray = GetTagInfoList($table,$_);
1616
+ my $tagInfo;
1617
+ foreach $tagInfo (@infoArray) {
1618
+ my $subdir = $$tagInfo{SubDirectory} or next;
1619
+ $tableName = $$subdir{TagTable} or next;
1620
+ next if $gotTable{$tableName}; # next if table already loaded
1621
+ push @moreTables, $tableName; # must scan this one too
1622
+ }
1623
+ }
1624
+ unshift @tableNames, @moreTables;
1625
+ }
1626
+ # clean up the order for tables which are out of order
1627
+ # (groups all Canon and Kodak tables together)
1628
+ my %fixOrder;
1629
+ foreach (@outOfOrder) {
1630
+ next unless /^Image::ExifTool::(\w+)/;
1631
+ # only re-order tables which have a corresponding main table
1632
+ next unless $mainTables{$1};
1633
+ $fixOrder{$1} = []; # fix the order of these tables
1634
+ }
1635
+ my (@sortedTables, %fixPos, $pos);
1636
+ foreach (@orderedTables) {
1637
+ if (/^Image::ExifTool::(\w+)/ and $fixOrder{$1}) {
1638
+ my $fix = $fixOrder{$1};
1639
+ unless (@$fix) {
1640
+ $pos = @sortedTables;
1641
+ $fixPos{$pos} or $fixPos{$pos} = [];
1642
+ push @{$fixPos{$pos}}, $1;
1643
+ }
1644
+ push @{$fix}, $_;
1645
+ } else {
1646
+ push @sortedTables, $_;
1647
+ }
1648
+ }
1649
+ # insert back in better order
1650
+ foreach $pos (sort { $b <=> $a } keys %fixPos) { # (reverse sort)
1651
+ my $fix = $fixPos{$pos};
1652
+ foreach (@$fix) {
1653
+ splice(@sortedTables, $pos, 0, @{$fixOrder{$_}});
1654
+ }
1655
+ }
1656
+ # add the extra tables
1657
+ push @sortedTables, @_;
1658
+ # tweak the table order
1659
+ TweakOrder(\@sortedTables, \%tweakOrder);
1660
+
1661
+ return @sortedTables;
1662
+ }
1663
+
1664
+ #------------------------------------------------------------------------------
1665
+ # Open HTMLFILE and print header and description
1666
+ # Inputs: 0) Filename, 1) optional category
1667
+ # Returns: True on success
1668
+ my %createdFiles;
1669
+ sub OpenHtmlFile($;$$)
1670
+ {
1671
+ my ($htmldir, $category, $sepTable) = @_;
1672
+ my ($htmlFile, $head, $title, $url, $class);
1673
+ my $top = '';
1674
+
1675
+ if ($category) {
1676
+ my @names = split ' ', $category;
1677
+ $class = shift @names;
1678
+ $htmlFile = "$htmldir/TagNames/$class.html";
1679
+ $head = $category;
1680
+ if ($head =~ /^\S+ .+ Struct$/) {
1681
+ pop @names;
1682
+ } else {
1683
+ $head .= ($sepTable ? ' Values' : ' Tags');
1684
+ }
1685
+ ($title = $head) =~ s/ .* / /;
1686
+ @names and $url = join '_', @names;
1687
+ } else {
1688
+ $htmlFile = "$htmldir/TagNames/index.html";
1689
+ $category = $class = 'ExifTool';
1690
+ $head = $title = 'ExifTool Tag Names';
1691
+ }
1692
+ if ($createdFiles{$htmlFile}) {
1693
+ open(HTMLFILE, ">>${htmlFile}_tmp") or return 0;
1694
+ } else {
1695
+ open(HTMLFILE, ">${htmlFile}_tmp") or return 0;
1696
+ print HTMLFILE "$docType<html>\n<head>\n<title>$title</title>\n";
1697
+ print HTMLFILE "<link rel=stylesheet type='text/css' href='style.css' title='Style'>\n";
1698
+ print HTMLFILE "</head>\n<body>\n";
1699
+ if ($category ne $class and $docs{$class}) {
1700
+ print HTMLFILE "<h2 class=top>$class Tags</h2>\n" or return 0;
1701
+ print HTMLFILE '<p>',Doc2Html($docs{$class}),"</p>\n" or return 0;
1702
+ } else {
1703
+ $top = " class=top";
1704
+ }
1705
+ }
1706
+ $head = "<a name='$url'>$head</a>" if $url;
1707
+ print HTMLFILE "<h2$top>$head</h2>\n" or return 0;
1708
+ print HTMLFILE '<p>',Doc2Html($docs{$category}),"</p>\n" if $docs{$category};
1709
+ $createdFiles{$htmlFile} = 1;
1710
+ return 1;
1711
+ }
1712
+
1713
+ #------------------------------------------------------------------------------
1714
+ # Close all html files and write trailers
1715
+ # Returns: true on success
1716
+ # Inputs: 0) BuildTagLookup object reference
1717
+ sub CloseHtmlFiles($)
1718
+ {
1719
+ my $self = shift;
1720
+ my $preserveDate = $$self{PRESERVE_DATE};
1721
+ my $success = 1;
1722
+ # get the date
1723
+ my ($sec,$min,$hr,$day,$mon,$yr) = localtime;
1724
+ my @month = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
1725
+ $yr += 1900;
1726
+ my $date = "$month[$mon] $day, $yr";
1727
+ my $htmlFile;
1728
+ my $countNewFiles = 0;
1729
+ my $countSameFiles = 0;
1730
+ foreach $htmlFile (keys %createdFiles) {
1731
+ my $tmpFile = $htmlFile . '_tmp';
1732
+ my $fileDate = $date;
1733
+ if ($preserveDate) {
1734
+ my @lines = `grep '<i>Last revised' $htmlFile`;
1735
+ $fileDate = $1 if @lines and $lines[-1] =~ m{<i>Last revised (.*)</i>};
1736
+ }
1737
+ open(HTMLFILE, ">>$tmpFile") or $success = 0, next;
1738
+ # write the trailers
1739
+ print HTMLFILE "<hr>\n";
1740
+ print HTMLFILE "(This document generated automatically by Image::ExifTool::BuildTagLookup)\n";
1741
+ print HTMLFILE "<br><i>Last revised $fileDate</i>\n";
1742
+ print HTMLFILE "<p class=lf><a href=";
1743
+ if ($htmlFile =~ /index\.html$/) {
1744
+ print HTMLFILE "'../index.html'>&lt;-- Back to ExifTool home page</a></p>\n";
1745
+ } else {
1746
+ print HTMLFILE "'index.html'>&lt;-- ExifTool Tag Names</a></p>\n"
1747
+ }
1748
+ print HTMLFILE "</body>\n</html>\n" or $success = 0;
1749
+ close HTMLFILE or $success = 0;
1750
+ # check for differences and only use new file if it was changed
1751
+ # (so the date only gets updated if changes were really made)
1752
+ my $useNewFile;
1753
+ if ($success) {
1754
+ open (TEMPFILE, $tmpFile) or $success = 0, last;
1755
+ if (open (HTMLFILE, $htmlFile)) {
1756
+ while (<HTMLFILE>) {
1757
+ my $newLine = <TEMPFILE>;
1758
+ if (defined $newLine) {
1759
+ next if /^<br><i>Last revised/;
1760
+ next if $_ eq $newLine;
1761
+ }
1762
+ # files are different -- use the new file
1763
+ $useNewFile = 1;
1764
+ last;
1765
+ }
1766
+ $useNewFile = 1 if <TEMPFILE>;
1767
+ close HTMLFILE;
1768
+ } else {
1769
+ $useNewFile = 1;
1770
+ }
1771
+ close TEMPFILE;
1772
+ if ($useNewFile) {
1773
+ ++$countNewFiles;
1774
+ rename $tmpFile, $htmlFile or warn("Error renaming temporary file\n"), $success = 0;
1775
+ } else {
1776
+ ++$countSameFiles;
1777
+ unlink $tmpFile; # erase new file and use existing file
1778
+ }
1779
+ }
1780
+ last unless $success;
1781
+ }
1782
+ # save number of files processed so we can check the results later
1783
+ $self->{COUNT}->{'HTML files changed'} = $countNewFiles;
1784
+ $self->{COUNT}->{'HTML files unchanged'} = $countSameFiles;
1785
+ return $success;
1786
+ }
1787
+
1788
+ #------------------------------------------------------------------------------
1789
+ # Write the TagName HTML and POD documentation
1790
+ # Inputs: 0) BuildTagLookup object reference
1791
+ # 1) output pod file (ie. 'lib/Image/ExifTool/TagNames.pod')
1792
+ # 2) output html directory (ie. 'html')
1793
+ # Returns: true on success
1794
+ # Notes: My apologies for the patchwork code, but this is only used to generate the docs.
1795
+ sub WriteTagNames($$)
1796
+ {
1797
+ my ($self, $podFile, $htmldir) = @_;
1798
+ my ($tableName, $short, $url, @sepTables, @structs);
1799
+ my $tagNameInfo = $self->{TAG_NAME_INFO} or return 0;
1800
+ my $idLabel = $self->{ID_LOOKUP};
1801
+ my $shortName = $self->{SHORT_NAME};
1802
+ my $sepTable = $self->{SEPARATE_TABLE};
1803
+ my $structs = $self->{STRUCTURES};
1804
+ my $structLookup = $self->{STRUCT_LOOKUP};
1805
+ my $success = 1;
1806
+ my $columns = 6; # number of columns in html index
1807
+ my $percent = int(100 / $columns);
1808
+
1809
+ # open the file and write the header
1810
+ open(PODFILE, ">$podFile") or return 0;
1811
+ print PODFILE Doc2Pod($docs{PodHeader}, $docs{ExifTool}, $docs{ExifTool2});
1812
+ mkdir "$htmldir/TagNames";
1813
+ OpenHtmlFile($htmldir) or return 0;
1814
+ print HTMLFILE "<blockquote>\n";
1815
+ print HTMLFILE "<table width='100%' class=frame><tr><td>\n";
1816
+ print HTMLFILE "<table width='100%' class=inner cellspacing=1><tr class=h>\n";
1817
+ print HTMLFILE "<th colspan=$columns><span class=l>Tag Table Index</span></th></tr>\n";
1818
+ print HTMLFILE "<tr class=b><td width='$percent%'>\n";
1819
+
1820
+ # get the full table list, adding shortcuts and plug-in tables to the end
1821
+ my @tableNames = GetTableOrder('Image::ExifTool::Shortcuts::Main', @pluginTables);
1822
+
1823
+ # get list of headings and add any missing ones
1824
+ my $heading = 'xxx';
1825
+ my (@tableIndexNames, @headings);
1826
+ foreach $tableName (@tableNames) {
1827
+ $short = $$shortName{$tableName};
1828
+ my @names = split ' ', $short;
1829
+ my $class = shift @names;
1830
+ if (@names) {
1831
+ # add heading for tables without a Main
1832
+ unless ($heading eq $class) {
1833
+ $heading = $class;
1834
+ push @tableIndexNames, $heading;
1835
+ push @headings, $heading;
1836
+ }
1837
+ } else {
1838
+ $heading = $short;
1839
+ push @headings, $heading;
1840
+ }
1841
+ push @tableIndexNames, $tableName;
1842
+ }
1843
+ @tableNames = @tableIndexNames;
1844
+ # print html index of headings only
1845
+ my $count = 0;
1846
+ my $lines = int((scalar(@headings) + $columns - 1) / $columns);
1847
+ foreach $tableName (@headings) {
1848
+ if ($count) {
1849
+ if ($count % $lines) {
1850
+ print HTMLFILE "<br>\n";
1851
+ } else {
1852
+ print HTMLFILE "</td><td width='$percent%'>\n";
1853
+ }
1854
+ }
1855
+ $short = $$shortName{$tableName};
1856
+ $short = $tableName unless $short;
1857
+ $url = "$short.html";
1858
+ print HTMLFILE "<a href='$url'>$short</a>";
1859
+ ++$count;
1860
+ }
1861
+ print HTMLFILE "\n</td></tr></table></td></tr></table></blockquote>\n";
1862
+ print HTMLFILE '<p>',Doc2Html($docs{ExifTool2}),"</p>\n";
1863
+
1864
+ # write all the tag tables
1865
+ while (@tableNames or @sepTables or @structs) {
1866
+ while (@sepTables) {
1867
+ $tableName = shift @sepTables;
1868
+ my $printConv = $$sepTable{$tableName};
1869
+ next unless ref $printConv eq 'HASH';
1870
+ $$sepTable{$tableName} = 1;
1871
+ my $notes = $$printConv{Notes};
1872
+ if ($notes) {
1873
+ # remove unnecessary whitespace
1874
+ $notes =~ s/^\s+//; $notes =~ s/\s+$//;
1875
+ $notes =~ s/(^[ \t]+|[ \t]+$)//mg;
1876
+ }
1877
+ my $head = $tableName;
1878
+ $head =~ s/^.* //s;
1879
+ close HTMLFILE;
1880
+ if (OpenHtmlFile($htmldir, $tableName, 1)) {
1881
+ print HTMLFILE '<p>', Doc2Html($notes), "</p>\n" if $notes;
1882
+ print HTMLFILE "<blockquote>\n";
1883
+ print HTMLFILE "<table class=frame><tr><td>\n";
1884
+ print HTMLFILE "<table class='inner sep' cellspacing=1>\n";
1885
+ my $align = ' class=r';
1886
+ my $wid = 0;
1887
+ my @keys;
1888
+ foreach (sort NumbersFirst keys %$printConv) {
1889
+ next if /^(Notes|PrintHex|PrintString|OTHER)$/;
1890
+ $align = '' if $align and /[^\d]/;
1891
+ my $w = length($_) + length($$printConv{$_});
1892
+ $wid = $w if $wid < $w;
1893
+ push @keys, $_;
1894
+ }
1895
+ $wid = length($tableName)+7 if $wid < length($tableName)+7;
1896
+ # print in multiple columns if there is room
1897
+ my $cols = int(110 / ($wid + 4));
1898
+ $cols = 1 if $cols < 1 or $cols > @keys or @keys < 4;
1899
+ my $rows = int((scalar(@keys) + $cols - 1) / $cols);
1900
+ my ($r, $c);
1901
+ print HTMLFILE '<tr class=h>';
1902
+ for ($c=0; $c<$cols; ++$c) {
1903
+ print HTMLFILE "<th>Value</th><th>$head</th>";
1904
+ }
1905
+ print HTMLFILE "</tr>\n";
1906
+ for ($r=0; $r<$rows; ++$r) {
1907
+ print HTMLFILE '<tr>';
1908
+ for ($c=0; $c<$cols; ++$c) {
1909
+ my $key = $keys[$r + $c*$rows];
1910
+ my ($index, $prt);
1911
+ if (defined $key) {
1912
+ $index = $key;
1913
+ $prt = '= ' . EscapeHTML($$printConv{$key});
1914
+ if ($$printConv{PrintHex}) {
1915
+ $index = sprintf('0x%x',$index);
1916
+ } elsif ($$printConv{PrintString} or
1917
+ $index !~ /^[+-]?(?=\d|\.\d)\d*(\.\d*)?$/)
1918
+ {
1919
+ $index = "'" . EscapeHTML($index) . "'";
1920
+ }
1921
+ } else {
1922
+ $index = $prt = '&nbsp;';
1923
+ }
1924
+ my ($ic, $pc);
1925
+ if ($c & 0x01) {
1926
+ $pc = ' class=b';
1927
+ $ic = $align ? " class='r b'" : $pc;
1928
+ } else {
1929
+ $ic = $align;
1930
+ $pc = '';
1931
+ }
1932
+ print HTMLFILE "<td$ic>$index</td><td$pc>$prt</td>\n";
1933
+ }
1934
+ print HTMLFILE '</tr>';
1935
+ }
1936
+ print HTMLFILE "</table></td></tr></table></blockquote>\n\n";
1937
+ }
1938
+ }
1939
+ last unless @tableNames or @structs;
1940
+ my $isStruct;
1941
+ if (@structs) {
1942
+ $tableName = shift @structs;
1943
+ next if $$structs{$tableName} == 2; # only list each structure once
1944
+ $$structs{$tableName} = 2;
1945
+ $isStruct = $$structLookup{$tableName};
1946
+ $isStruct or warn("Missing structure $tableName\n"), next;
1947
+ $tableName = "XMP $tableName" unless $tableName =~ / /;
1948
+ $short = $tableName = "$tableName Struct";
1949
+ my $maxLen = 0;
1950
+ $maxLen < length and $maxLen = length foreach keys %$isStruct;
1951
+ $$self{LONG_ID}{$tableName} = $maxLen;
1952
+ } else {
1953
+ $tableName = shift @tableNames;
1954
+ $short = $$shortName{$tableName};
1955
+ unless ($short) {
1956
+ # this is just an index heading
1957
+ print PODFILE "\n=head2 $tableName Tags\n";
1958
+ print PODFILE Doc2Pod($docs{$tableName}) if $docs{$tableName};
1959
+ next;
1960
+ }
1961
+ }
1962
+ my $isExif = ($tableName eq 'Image::ExifTool::Exif::Main');
1963
+ my $isRiff = ($tableName eq 'Image::ExifTool::RIFF::Info');
1964
+ my $isXmpMain = ($tableName eq 'Image::ExifTool::XMP::Main');
1965
+ my $info = $$tagNameInfo{$tableName};
1966
+ my $id = $$idLabel{$tableName};
1967
+ my ($hid, $showGrp);
1968
+ # widths of the different columns in the POD documentation
1969
+ my ($wID,$wTag,$wReq,$wGrp) = (8,36,24,10);
1970
+ my ($composite, $derived, $notes, $longTags, $wasLong, $prefix);
1971
+ if ($short eq 'Shortcuts') {
1972
+ $derived = '<th>Refers To</th>';
1973
+ $composite = 2;
1974
+ } elsif ($isStruct) {
1975
+ $derived = '';
1976
+ $notes = $$isStruct{NOTES};
1977
+ } else {
1978
+ my $table = GetTagTable($tableName);
1979
+ $notes = $$table{NOTES};
1980
+ $longTags = $$table{VARS}{LONG_TAGS} if $$table{VARS};
1981
+ if ($$table{GROUPS}{0} eq 'Composite') {
1982
+ $composite = 1;
1983
+ $derived = '<th>Derived From</th>';
1984
+ } else {
1985
+ $composite = 0;
1986
+ $derived = '';
1987
+ }
1988
+ }
1989
+ my $podIdLen = $self->{LONG_ID}->{$tableName};
1990
+ if ($notes) {
1991
+ # remove unnecessary whitespace
1992
+ $notes =~ s/^\s+//; $notes =~ s/\s+$//;
1993
+ $notes =~ s/(^[ \t]+|[ \t]+$)//mg;
1994
+ if ($notes =~ /leading '(.*?_)' which/) {
1995
+ $prefix = $1;
1996
+ $podIdLen -= length $prefix;
1997
+ }
1998
+ }
1999
+ if ($podIdLen <= $wID) {
2000
+ $podIdLen = $wID;
2001
+ } elsif ($short eq 'DICOM') {
2002
+ $podIdLen = 10;
2003
+ } else {
2004
+ # align tag names in secondary columns if possible
2005
+ my $col = ($podIdLen <= 10) ? 12 : 20;
2006
+ $podIdLen = $col if $podIdLen < $col;
2007
+ }
2008
+ if ($id) {
2009
+ ($hid = "<th>$id</th>") =~ s/ /&nbsp;/g;
2010
+ $wTag -= $podIdLen - $wID;
2011
+ $wID = $podIdLen;
2012
+ my $longTag = $self->{LONG_NAME}->{$tableName};
2013
+ if ($wTag < $longTag) {
2014
+ $wasLong = 1;
2015
+ if ($wID - $longTag + $wTag >= 6) { # don't let ID column get too narrow
2016
+ $wID -= $longTag - $wTag;
2017
+ $wTag = $longTag;
2018
+ }
2019
+ }
2020
+ } elsif ($composite) {
2021
+ $wTag += $wID - $wReq;
2022
+ $hid = '';
2023
+ } else {
2024
+ $wTag += 9;
2025
+ $hid = '';
2026
+ }
2027
+ if ($short eq 'EXIF' or $short eq 'Extra') {
2028
+ $derived = '<th>Group</th>';
2029
+ $showGrp = 1;
2030
+ $wGrp += 8 if $short eq 'Extra'; # tweak Group column width for "Extra" tags
2031
+ $wTag -= $wGrp + 1;
2032
+ }
2033
+ my $head = ($short =~ / /) ? 'head3' : 'head2';
2034
+ my $str = $isStruct ? '' : ' Tags';
2035
+ print PODFILE "\n=$head $short$str\n";
2036
+ print PODFILE Doc2Pod($docs{$short}) if $docs{$short};
2037
+ print PODFILE "\n", Doc2Pod($notes), "\n" if $notes;
2038
+ my $line = "\n";
2039
+ if ($id) {
2040
+ # shift over 'Index' heading by one character for a bit more balance
2041
+ $id = " $id" if $id eq 'Index';
2042
+ $line .= sprintf " %-${wID}s", $id;
2043
+ } else {
2044
+ $line .= ' ';
2045
+ }
2046
+ my $tagNameHeading = ($short eq 'XMP') ? 'Namespace' : ($isStruct?'Field':'Tag').' Name';
2047
+ $line .= sprintf " %-${wTag}s", $tagNameHeading;
2048
+ $line .= sprintf " %-${wReq}s", $composite == 2 ? 'Refers To' : 'Derived From' if $composite;
2049
+ $line .= sprintf " %-${wGrp}s", 'Group' if $showGrp;
2050
+ $line .= ' Writable';
2051
+ print PODFILE $line;
2052
+ $line =~ s/^(\s*\w.{6}\w) /$1\t/; # change space to tab after long ID label (ie. "Sequence")
2053
+ $line =~ s/\S/-/g;
2054
+ $line =~ s/- -/---/g;
2055
+ $line =~ tr/\t/ /; # change tab back to space
2056
+ print PODFILE $line,"\n";
2057
+ close HTMLFILE;
2058
+ OpenHtmlFile($htmldir, $short) or $success = 0;
2059
+ print HTMLFILE '<p>',Doc2Html($notes), "</p>\n" if $notes;
2060
+ print HTMLFILE "<blockquote>\n";
2061
+ print HTMLFILE "<table class=frame><tr><td>\n";
2062
+ print HTMLFILE "<table class=inner cellspacing=1>\n";
2063
+ print HTMLFILE "<tr class=h>$hid<th>$tagNameHeading</th>\n";
2064
+ print HTMLFILE "<th>Writable</th>$derived<th>Values / ${noteFont}Notes</span></th></tr>\n";
2065
+ my $rowClass = 1;
2066
+ my $infoCount = 0;
2067
+ my $infoList;
2068
+ foreach $infoList (@$info) {
2069
+ ++$infoCount;
2070
+ my ($tagIDstr, $tagNames, $writable, $values, $require, $writeGroup) = @$infoList;
2071
+ my ($align, $idStr, $w, $tip);
2072
+ my $wTag2 = $wTag;
2073
+ if (not $id) {
2074
+ $idStr = ' ';
2075
+ } elsif ($tagIDstr =~ /^\d+(\.\d+)?$/) {
2076
+ $w = $wID - 3;
2077
+ $idStr = sprintf " %${w}g ", $tagIDstr;
2078
+ $align = " class=r";
2079
+ } else {
2080
+ $tagIDstr =~ s/^'$prefix/'/ if $prefix;
2081
+ $w = $wID;
2082
+ my $over = length($tagIDstr) - $w;
2083
+ if ($over > 0) {
2084
+ # shift over tag name if there is room
2085
+ if ($over <= $wTag - length($$tagNames[0])) {
2086
+ $wTag2 -= $over;
2087
+ $w += $over;
2088
+ } else {
2089
+ # put tag name on next line if ID is too long
2090
+ $idStr = " $tagIDstr\n " . (' ' x $w);
2091
+ if ($longTags) {
2092
+ --$longTags;
2093
+ } else {
2094
+ warn "Notice: Split $$tagNames[0] line\n";
2095
+ }
2096
+ }
2097
+ }
2098
+ $idStr = sprintf " %-${w}s ", $tagIDstr unless defined $idStr;
2099
+ $align = '';
2100
+ }
2101
+ my @reqs;
2102
+ my @tags = @$tagNames;
2103
+ my @wGrp = @$writeGroup;
2104
+ my @vals = @$writable;
2105
+ my $wrStr = shift @vals;
2106
+ my $subdir;
2107
+ my @masks = grep /^\[Mask 0x[\da-f]+\]/, @$values;
2108
+ my $tag = shift @tags;
2109
+ # if this is a subdirectory or structure, print subdir name (from values) instead of writable
2110
+ if ($wrStr =~ /^[-=]/) {
2111
+ $subdir = 1;
2112
+ if (@masks) {
2113
+ # combine any mask into the format string
2114
+ $wrStr .= " & $1" if $masks[0] =~ /(0x[\da-f]+)/;
2115
+ shift @masks;
2116
+ @vals = grep !/^\[Mask 0x[\da-f]+\]/, @$values;
2117
+ } else {
2118
+ @vals = @$values;
2119
+ }
2120
+ # remove Notes if subdir has Notes as well
2121
+ shift @vals if $vals[0] =~ /^\(/ and @vals >= @$writable;
2122
+ foreach (@vals) { /^\(/ and $_ = '-' }
2123
+ my $i; # fill in any missing entries from non-directory tags
2124
+ for ($i=0; $i<@$writable; ++$i) {
2125
+ $vals[$i] = $$writable[$i] unless defined $vals[$i];
2126
+ if (@masks) {
2127
+ $vals[$i] .= " & $1" if $masks[0] =~ /(0x[\da-f]+)/;
2128
+ shift @masks;
2129
+ }
2130
+ }
2131
+ if ($$sepTable{$vals[0]}) {
2132
+ $wrStr =~ s/^[-=]//;
2133
+ $wrStr = 'N' unless $wrStr;
2134
+ } elsif ($$structs{$vals[0]}) {
2135
+ my $flags = $wrStr =~ /([+_]+)$/ ? $1 : '';
2136
+ $wrStr = "$vals[0] Struct$flags";
2137
+ } else {
2138
+ $wrStr = $vals[0];
2139
+ }
2140
+ shift @vals;
2141
+ } elsif ($wrStr and $wrStr ne 'N' and @masks) {
2142
+ # fill in missing entries if masks are different
2143
+ my $mask = shift @masks;
2144
+ while (@masks > @vals) {
2145
+ last if $masks[@vals] eq $mask;
2146
+ push @vals, $wrStr;
2147
+ push @tags, $tag if @tags < @vals;
2148
+ }
2149
+ # add Mask to Writable column in POD doc
2150
+ $wrStr .= " & $1" if $mask =~ /(0x[\da-f]+)/;
2151
+ }
2152
+ printf PODFILE "%s%-${wTag2}s", $idStr, $tag;
2153
+ warn "Warning: Pushed $tag\n" if $id and length($tag) > $wTag2;
2154
+ printf PODFILE " %-${wGrp}s", shift(@wGrp) || '-' if $showGrp;
2155
+ if ($composite) {
2156
+ @reqs = @$require;
2157
+ $w = $wReq; # Keep writable column in line
2158
+ length($tag) > $wTag2 and $w -= length($tag) - $wTag2;
2159
+ printf PODFILE " %-${w}s", shift(@reqs) || '';
2160
+ }
2161
+ printf PODFILE " $wrStr\n";
2162
+ my $numTags = scalar @$tagNames;
2163
+ my $n = 0;
2164
+ while (@tags or @reqs or @vals) {
2165
+ my $more = (@tags or @reqs);
2166
+ $line = ' ';
2167
+ $line .= ' 'x($wID+1) if $id;
2168
+ $line .= sprintf("%-${wTag2}s", shift(@tags) || '');
2169
+ $line .= sprintf(" %-${wReq}s", shift(@reqs) || '') if $composite;
2170
+ $line .= sprintf(" %-${wGrp}s", shift(@wGrp) || '-') if $showGrp;
2171
+ ++$n;
2172
+ if (@vals) {
2173
+ my $val = shift @vals;
2174
+ # use writable if this is a note
2175
+ my $wrStr = $$writable[$n];
2176
+ if ($subdir and ($val =~ /^\(/ or $val =~ /=/ or ($wrStr and $wrStr !~ /^[-=]/))) {
2177
+ $val = $wrStr;
2178
+ if (defined $val) {
2179
+ $val =~ s/^[-=]//;
2180
+ } else {
2181
+ # done with tag if nothing else to print
2182
+ last unless $more;
2183
+ }
2184
+ }
2185
+ if (defined $val) {
2186
+ $line .= " $val";
2187
+ if (@masks) {
2188
+ $line .= " & $1" if $masks[0] =~ /(0x[\da-f]+)/;
2189
+ shift @masks;
2190
+ }
2191
+ }
2192
+ }
2193
+ $line =~ s/\s+$//; # trim trailing white space
2194
+ print PODFILE "$line\n";
2195
+ }
2196
+ my @htmlTags;
2197
+ foreach (@$tagNames) {
2198
+ push @htmlTags, EscapeHTML($_);
2199
+ }
2200
+ if (($isExif and $exifSpec{hex $tagIDstr}) or
2201
+ ($isRiff and $tagIDstr=~/(\w+)/ and $riffSpec{$1}) or
2202
+ ($isXmpMain and $tagIDstr=~/([-\w]+)/ and $xmpSpec{$1}))
2203
+ {
2204
+ # underline "unknown" makernote tags only
2205
+ my $n = $tagIDstr eq '0x927c' ? -1 : 0;
2206
+ $htmlTags[$n] = "<u>$htmlTags[$n]</u>";
2207
+ }
2208
+ $rowClass = $rowClass ? '' : " class=b";
2209
+ my $isSubdir;
2210
+ if ($$writable[0] =~ /^[-=]/) {
2211
+ $isSubdir = 1;
2212
+ s/^[-=](.+)/$1/ foreach @$writable;
2213
+ }
2214
+ # add tooltip for hex conversion of Tag ID
2215
+ if ($tagIDstr =~ /^0x[0-9a-f]+$/i) {
2216
+ $tip = sprintf(" title='$tagIDstr = %u'",hex $tagIDstr);
2217
+ } elsif ($tagIDstr =~ /^(\d+)(\.\d*)?$/) {
2218
+ $tip = sprintf(" title='%u = 0x%x'", $1, $1);
2219
+ } else {
2220
+ $tip = '';
2221
+ # use copyright symbol in QuickTime UserData tags
2222
+ $tagIDstr =~ s/^"\\xa9/"&copy;/;
2223
+ }
2224
+ # add tooltip for special writable attributes
2225
+ my $wtip = '';
2226
+ my %wattr = (
2227
+ '_' => 'Flattened',
2228
+ '+' => 'List',
2229
+ '/' => 'Avoided',
2230
+ '~' => 'Writable only with -n',
2231
+ '!' => 'Unsafe',
2232
+ '*' => 'Protected',
2233
+ ':' => 'Mandatory',
2234
+ );
2235
+ my ($wstr, %hasAttr, @hasAttr);
2236
+ foreach $wstr (@$writable) {
2237
+ next unless $wstr =~ m{([+/~!*:_]+)$};
2238
+ my @a = split //, $1;
2239
+ foreach (@a) {
2240
+ next if $hasAttr{$_};
2241
+ push @hasAttr, $_;
2242
+ $hasAttr{$_} = 1;
2243
+ }
2244
+ }
2245
+ if (@hasAttr) {
2246
+ $wtip = " title='";
2247
+ my $n = 0;
2248
+ foreach (@hasAttr) {
2249
+ $wtip .= "\n" if $n;
2250
+ $wtip .= " $_ = $wattr{$_}";
2251
+ ++$n;
2252
+ }
2253
+ $wtip .= "'";
2254
+ }
2255
+ # print this row in the tag table
2256
+ print HTMLFILE "<tr$rowClass>\n";
2257
+ print HTMLFILE "<td$align$tip>$tagIDstr</td>\n" if $id;
2258
+ print HTMLFILE "<td>", join("\n <br>",@htmlTags), "</td>\n";
2259
+ print HTMLFILE "<td class=c$wtip>",join('<br>',@$writable),"</td>\n";
2260
+ print HTMLFILE '<td class=n>',join("\n <br>",@$require),"</td>\n" if $composite;
2261
+ print HTMLFILE "<td class=c>",join('<br>',@$writeGroup),"</td>\n" if $showGrp;
2262
+ print HTMLFILE "<td>";
2263
+ if (@$values) {
2264
+ if ($isSubdir) {
2265
+ my ($smallNote, @values);
2266
+ foreach (@$values) {
2267
+ if (/^\(/) {
2268
+ # set the note font
2269
+ $smallNote = 1 if $numTags < 2;
2270
+ push @values, ($smallNote ? $noteFontSmall : $noteFont) . "$_</span>";
2271
+ next;
2272
+ }
2273
+ # make text in square brackets small
2274
+ /^\[/ and push(@values, "<span class=s>$_</span>"), next;
2275
+ /=/ and push(@values, $_), next;
2276
+ my @names = split;
2277
+ my $suffix = ' Tags';
2278
+ if ($$sepTable{$_}) {
2279
+ push @sepTables, $_;
2280
+ $suffix = ' Values';
2281
+ }
2282
+ # handle structures specially
2283
+ if ($$structs{$_}) {
2284
+ # assume XMP module for this struct unless otherwise specified
2285
+ unshift @names, 'XMP' unless / /;
2286
+ push @structs, $_; # list this later
2287
+ $suffix = ' Struct';
2288
+ }
2289
+ $url = (shift @names) . '.html';
2290
+ @names and $url .= '#' . join '_', @names;
2291
+ push @values, "--&gt; <a href='$url'>$_$suffix</a>";
2292
+ }
2293
+ # put small note last
2294
+ $smallNote and push @values, shift @values;
2295
+ print HTMLFILE join("\n <br>",@values);
2296
+ } else {
2297
+ my ($close, $br) = ('', '');
2298
+ foreach (@$values) {
2299
+ if (s/^\[!HTML\]//) {
2300
+ print HTMLFILE $close if $close;
2301
+ print HTMLFILE $_;
2302
+ $close = $br = '';
2303
+ } else {
2304
+ if (/^\(/) {
2305
+ # notes can use POD syntax
2306
+ $_ = $noteFont . Doc2Html($_) . "</span>";
2307
+ } else {
2308
+ $_ = EscapeHTML($_);
2309
+ }
2310
+ $close or $_ = "<span class=s>$_", $close = '</span>';
2311
+ print HTMLFILE $br, $_;
2312
+ $br = "\n <br>";
2313
+ }
2314
+ }
2315
+ print HTMLFILE $close if $close;
2316
+ }
2317
+ } else {
2318
+ print HTMLFILE '&nbsp;';
2319
+ }
2320
+ print HTMLFILE "</td></tr>\n";
2321
+ }
2322
+ warn "$longTags unaccounted-for long tags in $tableName\n" if $longTags;
2323
+ if ($wasLong and not defined $longTags) {
2324
+ warn "Notice: Long tags in $tableName table\n";
2325
+ }
2326
+ unless ($infoCount) {
2327
+ printf PODFILE " [no tags known]\n";
2328
+ my $cols = 3;
2329
+ ++$cols if $hid;
2330
+ ++$cols if $derived;
2331
+ print HTMLFILE "<tr><td colspan=$cols class=c><i>[no tags known]</i></td></tr>\n";
2332
+ }
2333
+ print HTMLFILE "</table></td></tr></table></blockquote>\n\n";
2334
+ }
2335
+ close(HTMLFILE) or $success = 0;
2336
+ CloseHtmlFiles($self) or $success = 0;
2337
+ print PODFILE Doc2Pod($docs{PodTrailer}) or $success = 0;
2338
+ close(PODFILE) or $success = 0;
2339
+ return $success;
2340
+ }
2341
+
2342
+ 1; # end
2343
+
2344
+
2345
+ __END__
2346
+
2347
+ =head1 NAME
2348
+
2349
+ Image::ExifTool::BuildTagLookup - Build ExifTool tag lookup tables
2350
+
2351
+ =head1 DESCRIPTION
2352
+
2353
+ This module is used to generate the tag lookup tables in
2354
+ Image::ExifTool::TagLookup.pm and tag name documentation in
2355
+ Image::ExifTool::TagNames.pod, as well as HTML tag name documentation. It
2356
+ is used before each new ExifTool release to update the lookup tables and
2357
+ documentation, but it is not used otherwise.
2358
+
2359
+ =head1 SYNOPSIS
2360
+
2361
+ use Image::ExifTool::BuildTagLookup;
2362
+
2363
+ $builder = new Image::ExifTool::BuildTagLookup;
2364
+
2365
+ $ok = $builder->WriteTagLookup('lib/Image/ExifTool/TagLookup.pm');
2366
+
2367
+ $ok = $builder->WriteTagNames('lib/Image/ExifTool/TagNames.pod','html');
2368
+
2369
+ =head1 MEMBER VARIABLES
2370
+
2371
+ =over 4
2372
+
2373
+ =item PRESERVE_DATE
2374
+
2375
+ Flag to preserve "Last revised" date in HTML files. Set before calling
2376
+ WriteTagNames().
2377
+
2378
+ =item COUNT
2379
+
2380
+ Reference to hash containing counting statistics. Keys are the
2381
+ descriptions, and values are the numerical counts. Valid after
2382
+ BuildTagLookup object is created, but additional statistics are added by
2383
+ WriteTagNames().
2384
+
2385
+ =back
2386
+
2387
+ =head1 AUTHOR
2388
+
2389
+ Copyright 2003-2013, Phil Harvey (phil at owl.phy.queensu.ca)
2390
+
2391
+ This library is free software; you can redistribute it and/or modify it
2392
+ under the same terms as Perl itself.
2393
+
2394
+ =head1 SEE ALSO
2395
+
2396
+ L<Image::ExifTool(3pm)|Image::ExifTool>,
2397
+ L<Image::ExifTool::TagLookup(3pm)|Image::ExifTool::TagLookup>,
2398
+ L<Image::ExifTool::TagNames(3pm)|Image::ExifTool::TagNames>
2399
+
2400
+ =cut