exiftool_vendored 9.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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,3634 @@
1
+ #------------------------------------------------------------------------------
2
+ # File: XMP.pm
3
+ #
4
+ # Description: Read XMP meta information
5
+ #
6
+ # Revisions: 11/25/2003 - P. Harvey Created
7
+ # 10/28/2004 - P. Harvey Major overhaul to conform with XMP spec
8
+ # 02/27/2005 - P. Harvey Also read UTF-16 and UTF-32 XMP
9
+ # 08/30/2005 - P. Harvey Split tag tables into separate namespaces
10
+ # 10/24/2005 - P. Harvey Added ability to parse .XMP files
11
+ # 08/25/2006 - P. Harvey Added ability to handle blank nodes
12
+ # 08/22/2007 - P. Harvey Added ability to handle alternate language tags
13
+ # 09/26/2008 - P. Harvey Added Iptc4xmpExt tags (version 1.0 rev 2)
14
+ #
15
+ # References: 1) http://www.adobe.com/products/xmp/pdfs/xmpspec.pdf
16
+ # 2) http://www.w3.org/TR/rdf-syntax-grammar/ (20040210)
17
+ # 3) http://www.portfoliofaq.com/pfaq/v7mappings.htm
18
+ # 4) http://www.iptc.org/IPTC4XMP/
19
+ # 5) http://creativecommons.org/technology/xmp
20
+ # --> changed to http://wiki.creativecommons.org/Companion_File_metadata_specification (2007/12/21)
21
+ # 6) http://www.optimasc.com/products/fileid/xmp-extensions.pdf
22
+ # 7) Lou Salkind private communication
23
+ # 8) http://partners.adobe.com/public/developer/en/xmp/sdk/XMPspecification.pdf
24
+ # 9) http://www.w3.org/TR/SVG11/
25
+ # 10) http://www.adobe.com/devnet/xmp/pdfs/XMPSpecificationPart2.pdf (Oct 2008)
26
+ # 11) http://www.extensis.com/en/support/kb_article.jsp?articleNumber=6102211
27
+ # 12) http://www.cipa.jp/english/hyoujunka/kikaku/pdf/DC-010-2012_E.pdf
28
+ #
29
+ # Notes: - Property qualifiers are handled as if they were separate
30
+ # properties (with no associated namespace).
31
+ #
32
+ # - Currently, there is no special treatment of the following
33
+ # properties which could potentially affect the extracted
34
+ # information: xml:base, rdf:parseType (note that parseType
35
+ # Literal isn't allowed by the XMP spec).
36
+ #
37
+ # - The family 2 group names will be set to 'Unknown' for any XMP
38
+ # tags not found in the XMP or Exif tag tables.
39
+ #------------------------------------------------------------------------------
40
+
41
+ package Image::ExifTool::XMP;
42
+
43
+ use strict;
44
+ use vars qw($VERSION $AUTOLOAD @ISA @EXPORT_OK $xlatNamespace %nsURI %dateTimeInfo
45
+ %xmpTableDefaults %specialStruct %sDimensions %sArea %sColorant);
46
+ use Image::ExifTool qw(:Utils);
47
+ use Image::ExifTool::Exif;
48
+ require Exporter;
49
+
50
+ $VERSION = '2.66';
51
+ @ISA = qw(Exporter);
52
+ @EXPORT_OK = qw(EscapeXML UnescapeXML);
53
+
54
+ sub ProcessXMP($$;$);
55
+ sub WriteXMP($$;$);
56
+ sub CheckXMP($$$);
57
+ sub ParseXMPElement($$$;$$$$);
58
+ sub DecodeBase64($);
59
+ sub SaveBlankInfo($$$;$);
60
+ sub ProcessBlankInfo($$$;$);
61
+ sub ValidateXMP($;$);
62
+ sub UnescapeChar($$);
63
+ sub AddFlattenedTags($;$$);
64
+ sub FormatXMPDate($);
65
+ sub ConvertRational($);
66
+ sub ConvertRationalList($);
67
+
68
+ my %curNS; # namespaces currently in effect while parsing the file
69
+
70
+ # lookup for translating to ExifTool namespaces
71
+ # Note: Use $xlatNamespace (only valid during processing) to do the translation
72
+ my %stdXlatNS = (
73
+ # shorten ugly namespace prefixes
74
+ 'Iptc4xmpCore' => 'iptcCore',
75
+ 'Iptc4xmpExt' => 'iptcExt',
76
+ 'photomechanic'=> 'photomech',
77
+ 'MicrosoftPhoto' => 'microsoft',
78
+ 'prismusagerights' => 'pur',
79
+ 'GettyImagesGIFT' => 'getty',
80
+ );
81
+
82
+ # translate ExifTool XMP family 1 group names to standard XMP namespace prefixes
83
+ my %xmpNS = (
84
+ # shorten ugly namespace prefixes
85
+ 'iptcCore' => 'Iptc4xmpCore',
86
+ 'iptcExt' => 'Iptc4xmpExt',
87
+ 'photomechanic'=> 'photomech',
88
+ 'microsoft' => 'MicrosoftPhoto',
89
+ 'gettyImages' => 'GettyImagesGIFT',
90
+ # (prism changed their spec to now use 'pur')
91
+ # 'pur' => 'prismusagerights',
92
+ );
93
+
94
+ # Lookup to translate standard XMP namespace prefixes into URI's. This list
95
+ # need not be complete, but it must contain an entry for each namespace prefix
96
+ # (NAMESPACE) for writable tags in the XMP tables or in structures that doesn't
97
+ # define a URI. Also, the namespace must be defined here for non-standard
98
+ # namespace prefixes to be recognized.
99
+ %nsURI = (
100
+ aux => 'http://ns.adobe.com/exif/1.0/aux/',
101
+ album => 'http://ns.adobe.com/album/1.0/',
102
+ cc => 'http://creativecommons.org/ns#', # changed 2007/12/21 - PH
103
+ crs => 'http://ns.adobe.com/camera-raw-settings/1.0/',
104
+ crss => 'http://ns.adobe.com/camera-raw-saved-settings/1.0/',
105
+ dc => 'http://purl.org/dc/elements/1.1/',
106
+ exif => 'http://ns.adobe.com/exif/1.0/',
107
+ exifEX => 'http://cipa.jp/exif/1.0/',
108
+ iX => 'http://ns.adobe.com/iX/1.0/',
109
+ pdf => 'http://ns.adobe.com/pdf/1.3/',
110
+ pdfx => 'http://ns.adobe.com/pdfx/1.3/',
111
+ photoshop => 'http://ns.adobe.com/photoshop/1.0/',
112
+ rdf => 'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
113
+ rdfs => 'http://www.w3.org/2000/01/rdf-schema#',
114
+ stDim => 'http://ns.adobe.com/xap/1.0/sType/Dimensions#',
115
+ stEvt => 'http://ns.adobe.com/xap/1.0/sType/ResourceEvent#',
116
+ stFnt => 'http://ns.adobe.com/xap/1.0/sType/Font#',
117
+ stJob => 'http://ns.adobe.com/xap/1.0/sType/Job#',
118
+ stRef => 'http://ns.adobe.com/xap/1.0/sType/ResourceRef#',
119
+ stVer => 'http://ns.adobe.com/xap/1.0/sType/Version#',
120
+ stMfs => 'http://ns.adobe.com/xap/1.0/sType/ManifestItem#',
121
+ tiff => 'http://ns.adobe.com/tiff/1.0/',
122
+ 'x' => 'adobe:ns:meta/',
123
+ xmpG => 'http://ns.adobe.com/xap/1.0/g/',
124
+ xmpGImg => 'http://ns.adobe.com/xap/1.0/g/img/',
125
+ xmp => 'http://ns.adobe.com/xap/1.0/',
126
+ xmpBJ => 'http://ns.adobe.com/xap/1.0/bj/',
127
+ xmpDM => 'http://ns.adobe.com/xmp/1.0/DynamicMedia/',
128
+ xmpMM => 'http://ns.adobe.com/xap/1.0/mm/',
129
+ xmpRights => 'http://ns.adobe.com/xap/1.0/rights/',
130
+ xmpNote => 'http://ns.adobe.com/xmp/note/',
131
+ xmpTPg => 'http://ns.adobe.com/xap/1.0/t/pg/',
132
+ xmpidq => 'http://ns.adobe.com/xmp/Identifier/qual/1.0/',
133
+ xmpPLUS => 'http://ns.adobe.com/xap/1.0/PLUS/',
134
+ dex => 'http://ns.optimasc.com/dex/1.0/',
135
+ mediapro => 'http://ns.iview-multimedia.com/mediapro/1.0/',
136
+ expressionmedia => 'http://ns.microsoft.com/expressionmedia/1.0/',
137
+ Iptc4xmpCore => 'http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/',
138
+ Iptc4xmpExt => 'http://iptc.org/std/Iptc4xmpExt/2008-02-29/',
139
+ MicrosoftPhoto => 'http://ns.microsoft.com/photo/1.0',
140
+ MP1 => 'http://ns.microsoft.com/photo/1.1', #PH (MP1 is fabricated)
141
+ MP => 'http://ns.microsoft.com/photo/1.2/',
142
+ MPRI => 'http://ns.microsoft.com/photo/1.2/t/RegionInfo#',
143
+ MPReg => 'http://ns.microsoft.com/photo/1.2/t/Region#',
144
+ lr => 'http://ns.adobe.com/lightroom/1.0/',
145
+ DICOM => 'http://ns.adobe.com/DICOM/',
146
+ svg => 'http://www.w3.org/2000/svg',
147
+ et => 'http://ns.exiftool.ca/1.0/',
148
+ # namespaces defined in XMP2.pl:
149
+ plus => 'http://ns.useplus.org/ldf/xmp/1.0/',
150
+ prism => 'http://prismstandard.org/namespaces/basic/2.1/',
151
+ prl => 'http://prismstandard.org/namespaces/prl/2.1/',
152
+ pur => 'http://prismstandard.org/namespaces/prismusagerights/2.1/',
153
+ acdsee => 'http://ns.acdsee.com/iptc/1.0/',
154
+ digiKam => 'http://www.digikam.org/ns/1.0/',
155
+ swf => 'http://ns.adobe.com/swf/1.0',
156
+ cell => 'http://developer.sonyericsson.com/cell/1.0/',
157
+ aas => 'http://ns.apple.com/adjustment-settings/1.0/',
158
+ 'mwg-rs' => 'http://www.metadataworkinggroup.com/schemas/regions/',
159
+ 'mwg-kw' => 'http://www.metadataworkinggroup.com/schemas/keywords/',
160
+ 'mwg-coll' => 'http://www.metadataworkinggroup.com/schemas/collections/',
161
+ stArea => 'http://ns.adobe.com/xmp/sType/Area#',
162
+ extensis => 'http://ns.extensis.com/extensis/1.0/',
163
+ ics => 'http://ns.idimager.com/ics/1.0/',
164
+ fpv => 'http://ns.fastpictureviewer.com/fpv/1.0/',
165
+ 'apple-fi' => 'http://ns.apple.com/faceinfo/1.0/',
166
+ GPano => 'http://ns.google.com/photos/1.0/panorama/',
167
+ dwc => 'http://rs.tdwg.org/dwc/index.htm',
168
+ GettyImagesGIFT => 'http://xmp.gettyimages.com/gift/1.0/',
169
+ );
170
+
171
+ # build reverse namespace lookup
172
+ my %uri2ns;
173
+ {
174
+ my $ns;
175
+ foreach $ns (keys %nsURI) {
176
+ $uri2ns{$nsURI{$ns}} = $ns;
177
+ }
178
+ }
179
+
180
+ # conversions for GPS coordinates
181
+ sub ToDegrees
182
+ {
183
+ require Image::ExifTool::GPS;
184
+ Image::ExifTool::GPS::ToDegrees($_[0], 1);
185
+ }
186
+ my %latConv = (
187
+ ValueConv => \&ToDegrees,
188
+ RawConv => 'require Image::ExifTool::GPS; $val', # to load Composite tags and routines
189
+ ValueConvInv => q{
190
+ require Image::ExifTool::GPS;
191
+ Image::ExifTool::GPS::ToDMS($self, $val, 2, "N");
192
+ },
193
+ PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1, "N")',
194
+ PrintConvInv => \&ToDegrees,
195
+ );
196
+ my %longConv = (
197
+ ValueConv => \&ToDegrees,
198
+ RawConv => 'require Image::ExifTool::GPS; $val',
199
+ ValueConvInv => q{
200
+ require Image::ExifTool::GPS;
201
+ Image::ExifTool::GPS::ToDMS($self, $val, 2, "E");
202
+ },
203
+ PrintConv => 'Image::ExifTool::GPS::ToDMS($self, $val, 1, "E")',
204
+ PrintConvInv => \&ToDegrees,
205
+ );
206
+ %dateTimeInfo = (
207
+ # NOTE: Do NOT put "Groups" here because Groups hash must not be common!
208
+ Writable => 'date',
209
+ Shift => 'Time',
210
+ PrintConv => '$self->ConvertDateTime($val)',
211
+ PrintConvInv => '$self->InverseDateTime($val,undef,1)',
212
+ );
213
+
214
+ # this conversion allows alternate language support for designated boolean tags
215
+ my %boolConv = (
216
+ PrintConv => {
217
+ OTHER => sub { # (inverse conversion is the same)
218
+ my $val = shift;
219
+ return 'False' if lc $val eq 'false';
220
+ return 'True' if lc $val eq 'true';
221
+ return $val;
222
+ },
223
+ True => 'True',
224
+ False => 'False',
225
+ },
226
+ );
227
+
228
+ # XMP namespaces which we don't want to contribute to generated EXIF tag names
229
+ # (Note: namespaces with non-standard prefixes aren't currently ignored)
230
+ my %ignoreNamespace = ( 'x'=>1, rdf=>1, xmlns=>1, xml=>1, svg=>1, et=>1, office=>1 );
231
+
232
+ # these are the attributes that we handle for properties that contain
233
+ # sub-properties. Attributes for simple properties are easy, and we
234
+ # just copy them over. These are harder since we don't store attributes
235
+ # for properties without simple values. (maybe this will change...)
236
+ # (special attributes are indicated by a list reference of tag information)
237
+ my %recognizedAttrs = (
238
+ 'rdf:about' => [ 'Image::ExifTool::XMP::rdf', 'about', 'About' ],
239
+ 'x:xmptk' => [ 'Image::ExifTool::XMP::x', 'xmptk', 'XMPToolkit' ],
240
+ 'x:xaptk' => [ 'Image::ExifTool::XMP::x', 'xmptk', 'XMPToolkit' ],
241
+ 'rdf:parseType' => 1,
242
+ 'rdf:nodeID' => 1,
243
+ 'et:toolkit' => 1,
244
+ 'rdf:xmlns' => 1, # this is presumably the default namespace, which we currently ignore
245
+ );
246
+
247
+ # special tags in structures below
248
+ # NOTE: this lookup is duplicated in TagLookup.pm!!
249
+ %specialStruct = (
250
+ STRUCT_NAME => 1, # [optional] name of structure
251
+ NAMESPACE => 1, # [mandatory] namespace prefix used for fields of this structure
252
+ NOTES => 1, # [optional] notes for documentation about this structure
253
+ TYPE => 1, # [optional] rdf:type resource for struct (if used, the StructType flag
254
+ # will be set automatically for all derived flattened tags when writing)
255
+ );
256
+ # XMP structures (each structure is similar to a tag table so we can
257
+ # recurse through them in SetPropertyPath() as if they were tag tables)
258
+ # The main differences between structure field information and tagInfo hashes are:
259
+ # 1) Field information hashes do not contain Name, Groups or Table entries, and
260
+ # 2) The TagID entry is optional, and is used only if the key in the structure hash
261
+ # is different from the TagID (currently only true for alternate language fields)
262
+ # 3) Field information hashes support a additional "Namespace" property.
263
+ my %sResourceRef = (
264
+ STRUCT_NAME => 'ResourceRef',
265
+ NAMESPACE => 'stRef',
266
+ documentID => { },
267
+ instanceID => { },
268
+ manager => { },
269
+ managerVariant => { },
270
+ manageTo => { },
271
+ manageUI => { },
272
+ renditionClass => { },
273
+ renditionParams => { },
274
+ versionID => { },
275
+ # added Oct 2008
276
+ alternatePaths => { List => 'Seq' },
277
+ filePath => { },
278
+ fromPart => { },
279
+ lastModifyDate => { %dateTimeInfo, Groups => { 2 => 'Time' } },
280
+ maskMarkers => { PrintConv => { All => 'All', None => 'None' } },
281
+ partMapping => { },
282
+ toPart => { },
283
+ # added May 2010
284
+ originalDocumentID => { }, # (undocumented property written by Adobe InDesign)
285
+ );
286
+ my %sResourceEvent = (
287
+ STRUCT_NAME => 'ResourceEvent',
288
+ NAMESPACE => 'stEvt',
289
+ action => { },
290
+ instanceID => { },
291
+ parameters => { },
292
+ softwareAgent => { },
293
+ when => { %dateTimeInfo, Groups => { 2 => 'Time' } },
294
+ # added Oct 2008
295
+ changed => { },
296
+ );
297
+ my %sJobRef = (
298
+ STRUCT_NAME => 'JobRef',
299
+ NAMESPACE => 'stJob',
300
+ id => { },
301
+ name => { },
302
+ url => { },
303
+ );
304
+ my %sVersion = (
305
+ STRUCT_NAME => 'Version',
306
+ NAMESPACE => 'stVer',
307
+ comments => { },
308
+ event => { Struct => \%sResourceEvent },
309
+ modifier => { },
310
+ modifyDate => { %dateTimeInfo, Groups => { 2 => 'Time' } },
311
+ version => { },
312
+ );
313
+ my %sThumbnail = (
314
+ STRUCT_NAME => 'Thumbnail',
315
+ NAMESPACE => 'xmpGImg',
316
+ height => { Writable => 'integer' },
317
+ width => { Writable => 'integer' },
318
+ 'format' => { },
319
+ image => {
320
+ Avoid => 1,
321
+ ValueConv => 'Image::ExifTool::XMP::DecodeBase64($val)',
322
+ ValueConvInv => 'Image::ExifTool::XMP::EncodeBase64($val)',
323
+ },
324
+ );
325
+ my %sPageInfo = (
326
+ STRUCT_NAME => 'PageInfo',
327
+ NAMESPACE => 'xmpGImg',
328
+ PageNumber => { Writable => 'integer', Namespace => 'xmpTPg' }, # override default namespace
329
+ height => { Writable => 'integer' },
330
+ width => { Writable => 'integer' },
331
+ 'format' => { },
332
+ image => {
333
+ ValueConv => 'Image::ExifTool::XMP::DecodeBase64($val)',
334
+ ValueConvInv => 'Image::ExifTool::XMP::EncodeBase64($val)',
335
+ },
336
+ );
337
+ #my %sIdentifierScheme = (
338
+ # NAMESPACE => 'xmpidq',
339
+ # Scheme => { }, # qualifier for xmp:Identifier only
340
+ #);
341
+ %sDimensions = (
342
+ STRUCT_NAME => 'Dimensions',
343
+ NAMESPACE => 'stDim',
344
+ w => { Writable => 'real' },
345
+ h => { Writable => 'real' },
346
+ unit => { },
347
+ );
348
+ %sArea = (
349
+ STRUCT_NAME => 'Area',
350
+ NAMESPACE => 'stArea',
351
+ 'x' => { Writable => 'real' },
352
+ 'y' => { Writable => 'real' },
353
+ w => { Writable => 'real' },
354
+ h => { Writable => 'real' },
355
+ d => { Writable => 'real' },
356
+ unit => { },
357
+ );
358
+ %sColorant = (
359
+ STRUCT_NAME => 'Colorant',
360
+ NAMESPACE => 'xmpG',
361
+ swatchName => { },
362
+ mode => { PrintConv => { CMYK=>'CMYK', RGB=>'RGB', LAB=>'Lab' } },
363
+ # note: do not implement closed choice for "type" because Adobe can't
364
+ # get the case right: spec. says "PROCESS" but Indesign writes "Process"
365
+ type => { },
366
+ cyan => { Writable => 'real' },
367
+ magenta => { Writable => 'real' },
368
+ yellow => { Writable => 'real' },
369
+ black => { Writable => 'real' },
370
+ red => { Writable => 'integer' },
371
+ green => { Writable => 'integer' },
372
+ blue => { Writable => 'integer' },
373
+ L => { Writable => 'real' },
374
+ A => { Writable => 'integer' },
375
+ B => { Writable => 'integer' },
376
+ # 'tint' observed in INDD sample - PH
377
+ tint => { Writable => 'integer', Notes => 'not part of 2010 XMP specification' },
378
+ );
379
+ my %sFont = (
380
+ STRUCT_NAME => 'Font',
381
+ NAMESPACE => 'stFnt',
382
+ fontName => { },
383
+ fontFamily => { },
384
+ fontFace => { },
385
+ fontType => { },
386
+ versionString => { },
387
+ composite => { Writable => 'boolean' },
388
+ fontFileName=> { },
389
+ childFontFiles => { List => 'Seq' },
390
+ );
391
+ my %sOECF = (
392
+ STRUCT_NAME => 'OECF',
393
+ NAMESPACE => 'exif',
394
+ Columns => { Writable => 'integer' },
395
+ Rows => { Writable => 'integer' },
396
+ Names => { List => 'Seq' },
397
+ Values => { List => 'Seq', Writable => 'rational' },
398
+ );
399
+
400
+ # new LR2 crs structures (PH)
401
+ my %sCorrectionMask = (
402
+ STRUCT_NAME => 'CorrectionMask',
403
+ NAMESPACE => 'crs',
404
+ # disable List behaviour of flattened Gradient/PaintBasedCorrections
405
+ # because these are nested in lists and the flattened tags can't
406
+ # do justice to this complex structure
407
+ What => { List => 0 },
408
+ MaskValue => { Writable => 'real', List => 0, FlatName => 'Value' },
409
+ Radius => { Writable => 'real', List => 0 },
410
+ Flow => { Writable => 'real', List => 0 },
411
+ CenterWeight => { Writable => 'real', List => 0 },
412
+ Dabs => { List => 'Seq' },
413
+ ZeroX => { Writable => 'real', List => 0 },
414
+ ZeroY => { Writable => 'real', List => 0 },
415
+ FullX => { Writable => 'real', List => 0 },
416
+ FullY => { Writable => 'real', List => 0 },
417
+ );
418
+ my %sCorrection = (
419
+ STRUCT_NAME => 'Correction',
420
+ NAMESPACE => 'crs',
421
+ What => { List => 0 },
422
+ CorrectionAmount => { FlatName => 'Amount', Writable => 'real', List => 0 },
423
+ CorrectionActive => { FlatName => 'Active', Writable => 'boolean', List => 0 },
424
+ LocalExposure => { FlatName => 'Exposure', Writable => 'real', List => 0 },
425
+ LocalSaturation => { FlatName => 'Saturation', Writable => 'real', List => 0 },
426
+ LocalContrast => { FlatName => 'Contrast', Writable => 'real', List => 0 },
427
+ LocalClarity => { FlatName => 'Clarity', Writable => 'real', List => 0 },
428
+ LocalSharpness => { FlatName => 'Sharpness', Writable => 'real', List => 0 },
429
+ LocalBrightness => { FlatName => 'Brightness', Writable => 'real', List => 0 },
430
+ LocalToningHue => { FlatName => 'Hue', Writable => 'real', List => 0 },
431
+ LocalToningSaturation => { FlatName => 'Saturation', Writable => 'real', List => 0 },
432
+ LocalExposure2012 => { FlatName => 'Exposure2012', Writable => 'real', List => 0 },
433
+ LocalContrast2012 => { FlatName => 'Contrast2012', Writable => 'real', List => 0 },
434
+ LocalHighlights2012 => { FlatName => 'Highlights2012', Writable => 'real', List => 0 },
435
+ LocalShadows2012 => { FlatName => 'Shadows2012', Writable => 'real', List => 0 },
436
+ LocalClarity2012 => { FlatName => 'Clarity2012', Writable => 'real', List => 0 },
437
+ LocalLuminanceNoise => { FlatName => 'LuminanceNoise', Writable => 'real', List => 0 },
438
+ LocalMoire => { FlatName => 'Moire', Writable => 'real', List => 0 },
439
+ LocalDefringe => { FlatName => 'Defringe', Writable => 'real', List => 0 },
440
+ LocalTemperature => { FlatName => 'Temperature',Writable => 'real', List => 0 },
441
+ LocalTint => { FlatName => 'Tint', Writable => 'real', List => 0 },
442
+ CorrectionMasks => {
443
+ FlatName => 'Mask',
444
+ Struct => \%sCorrectionMask,
445
+ List => 'Seq',
446
+ },
447
+ );
448
+
449
+ # IPTC Extension 1.0 structures
450
+ my %sLocationDetails = (
451
+ STRUCT_NAME => 'LocationDetails',
452
+ NAMESPACE => 'Iptc4xmpExt',
453
+ City => { },
454
+ CountryCode => { },
455
+ CountryName => { },
456
+ ProvinceState=> { },
457
+ Sublocation => { },
458
+ WorldRegion => { },
459
+ );
460
+
461
+ # main XMP tag table (tag ID's are used for the family 1 group names)
462
+ %Image::ExifTool::XMP::Main = (
463
+ GROUPS => { 2 => 'Unknown' },
464
+ PROCESS_PROC => \&ProcessXMP,
465
+ WRITE_PROC => \&WriteXMP,
466
+ dc => {
467
+ Name => 'dc', # (otherwise generated name would be 'Dc')
468
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::dc' },
469
+ },
470
+ xmp => {
471
+ Name => 'xmp',
472
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::xmp' },
473
+ },
474
+ xmpDM => {
475
+ Name => 'xmpDM',
476
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::xmpDM' },
477
+ },
478
+ xmpRights => {
479
+ Name => 'xmpRights',
480
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::xmpRights' },
481
+ },
482
+ xmpNote => {
483
+ Name => 'xmpNote',
484
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::xmpNote' },
485
+ },
486
+ xmpMM => {
487
+ Name => 'xmpMM',
488
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::xmpMM' },
489
+ },
490
+ xmpBJ => {
491
+ Name => 'xmpBJ',
492
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::xmpBJ' },
493
+ },
494
+ xmpTPg => {
495
+ Name => 'xmpTPg',
496
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::xmpTPg' },
497
+ },
498
+ pdf => {
499
+ Name => 'pdf',
500
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::pdf' },
501
+ },
502
+ pdfx => {
503
+ Name => 'pdfx',
504
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::pdfx' },
505
+ },
506
+ photoshop => {
507
+ Name => 'photoshop',
508
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::photoshop' },
509
+ },
510
+ crs => {
511
+ Name => 'crs',
512
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::crs' },
513
+ },
514
+ # crss - it would be tedious to add the ability to write this
515
+ aux => {
516
+ Name => 'aux',
517
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::aux' },
518
+ },
519
+ tiff => {
520
+ Name => 'tiff',
521
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::tiff' },
522
+ },
523
+ exif => {
524
+ Name => 'exif',
525
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::exif' },
526
+ },
527
+ exifEX => {
528
+ Name => 'exifEX',
529
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::exifEX' },
530
+ },
531
+ iptcCore => {
532
+ Name => 'iptcCore',
533
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::iptcCore' },
534
+ },
535
+ iptcExt => {
536
+ Name => 'iptcExt',
537
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::iptcExt' },
538
+ },
539
+ PixelLive => {
540
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::PixelLive' },
541
+ },
542
+ xmpPLUS => {
543
+ Name => 'xmpPLUS',
544
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::xmpPLUS' },
545
+ },
546
+ plus => {
547
+ Name => 'plus',
548
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::plus' },
549
+ },
550
+ cc => {
551
+ Name => 'cc',
552
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::cc' },
553
+ },
554
+ dex => {
555
+ Name => 'dex',
556
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::dex' },
557
+ },
558
+ photomech => {
559
+ Name => 'photomech',
560
+ SubDirectory => { TagTable => 'Image::ExifTool::PhotoMechanic::XMP' },
561
+ },
562
+ mediapro => {
563
+ Name => 'mediapro',
564
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::MediaPro' },
565
+ },
566
+ expressionmedia => {
567
+ Name => 'expressionmedia',
568
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::ExpressionMedia' },
569
+ },
570
+ microsoft => {
571
+ Name => 'microsoft',
572
+ SubDirectory => { TagTable => 'Image::ExifTool::Microsoft::XMP' },
573
+ },
574
+ MP => {
575
+ Name => 'MP',
576
+ SubDirectory => { TagTable => 'Image::ExifTool::Microsoft::MP' },
577
+ },
578
+ MP1 => {
579
+ Name => 'MP1',
580
+ SubDirectory => { TagTable => 'Image::ExifTool::Microsoft::MP1' },
581
+ },
582
+ lr => {
583
+ Name => 'lr',
584
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::Lightroom' },
585
+ },
586
+ DICOM => {
587
+ Name => 'DICOM',
588
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::DICOM' },
589
+ },
590
+ album => {
591
+ Name => 'album',
592
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::Album' },
593
+ },
594
+ prism => {
595
+ Name => 'prism',
596
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::prism' },
597
+ },
598
+ prl => {
599
+ Name => 'prl',
600
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::prl' },
601
+ },
602
+ pur => {
603
+ Name => 'pur',
604
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::pur' },
605
+ },
606
+ rdf => {
607
+ Name => 'rdf',
608
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::rdf' },
609
+ },
610
+ 'x' => {
611
+ Name => 'x',
612
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::x' },
613
+ },
614
+ acdsee => {
615
+ Name => 'acdsee',
616
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::acdsee' },
617
+ },
618
+ digiKam => {
619
+ Name => 'digiKam',
620
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::digiKam' },
621
+ },
622
+ swf => {
623
+ Name => 'swf',
624
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::swf' },
625
+ },
626
+ cell => {
627
+ Name => 'cell',
628
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::cell' },
629
+ },
630
+ aas => {
631
+ Name => 'aas',
632
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::aas' },
633
+ },
634
+ 'mwg-rs' => {
635
+ Name => 'mwg-rs',
636
+ SubDirectory => { TagTable => 'Image::ExifTool::MWG::Regions' },
637
+ },
638
+ 'mwg-kw' => {
639
+ Name => 'mwg-kw',
640
+ SubDirectory => { TagTable => 'Image::ExifTool::MWG::Keywords' },
641
+ },
642
+ 'mwg-coll' => {
643
+ Name => 'mwg-coll',
644
+ SubDirectory => { TagTable => 'Image::ExifTool::MWG::Collections' },
645
+ },
646
+ extensis => {
647
+ Name => 'extensis',
648
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::extensis' },
649
+ },
650
+ ics => {
651
+ Name => 'ics',
652
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::ics' },
653
+ },
654
+ fpv => {
655
+ Name => 'fpv',
656
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::fpv' },
657
+ },
658
+ 'apple-fi' => {
659
+ Name => 'apple-fi',
660
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::apple_fi' },
661
+ },
662
+ GPano => {
663
+ Name => 'GPano',
664
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::GPano' },
665
+ },
666
+ dwc => {
667
+ Name => 'dwc',
668
+ SubDirectory => { TagTable => 'Image::ExifTool::DarwinCore::Main' },
669
+ },
670
+ getty => {
671
+ Name => 'getty',
672
+ SubDirectory => { TagTable => 'Image::ExifTool::XMP::GettyImages' },
673
+ },
674
+ );
675
+
676
+ #
677
+ # Tag tables for all XMP namespaces:
678
+ #
679
+ # Writable - only need to define this for writable tags if not plain text
680
+ # (boolean, integer, rational, real, date or lang-alt)
681
+ # List - XMP list type (Bag, Seq or Alt, or set to 1 for elements in Struct lists --
682
+ # this is necessary to obtain proper list behaviour when reading/writing)
683
+ #
684
+ # (Note that family 1 group names are generated from the property namespace, not
685
+ # the group1 names below which exist so the groups will appear in the list.)
686
+ #
687
+ %xmpTableDefaults = (
688
+ WRITE_PROC => \&WriteXMP,
689
+ CHECK_PROC => \&CheckXMP,
690
+ WRITABLE => 'string',
691
+ LANG_INFO => \&GetLangInfo,
692
+ );
693
+
694
+ # rdf attributes extracted
695
+ %Image::ExifTool::XMP::rdf = (
696
+ %xmpTableDefaults,
697
+ GROUPS => { 1 => 'XMP-rdf', 2 => 'Document' },
698
+ NAMESPACE => 'rdf',
699
+ NOTES => q{
700
+ Most RDF attributes are handled internally, but the "about" attribute is
701
+ treated specially to allow it to be set to a specific value if required.
702
+ },
703
+ about => { Protected => 1 },
704
+ );
705
+
706
+ # x attributes extracted
707
+ %Image::ExifTool::XMP::x = (
708
+ %xmpTableDefaults,
709
+ GROUPS => { 1 => 'XMP-x', 2 => 'Document' },
710
+ NAMESPACE => 'x',
711
+ NOTES => qq{
712
+ The "x" namespace is used for the "xmpmeta" wrapper, and may contain an
713
+ "xmptk" attribute that is extracted as the XMPToolkit tag. When writing,
714
+ the XMPToolkit tag is automatically generated by ExifTool unless
715
+ specifically set to another value.
716
+ },
717
+ xmptk => { Name => 'XMPToolkit', Protected => 1 },
718
+ );
719
+
720
+ # Dublin Core namespace properties (dc)
721
+ %Image::ExifTool::XMP::dc = (
722
+ %xmpTableDefaults,
723
+ GROUPS => { 1 => 'XMP-dc', 2 => 'Other' },
724
+ NAMESPACE => 'dc',
725
+ TABLE_DESC => 'XMP Dublin Core',
726
+ NOTES => 'Dublin Core namespace tags.',
727
+ contributor => { Groups => { 2 => 'Author' }, List => 'Bag' },
728
+ coverage => { },
729
+ creator => { Groups => { 2 => 'Author' }, List => 'Seq' },
730
+ date => { Groups => { 2 => 'Time' }, List => 'Seq', %dateTimeInfo },
731
+ description => { Groups => { 2 => 'Image' }, Writable => 'lang-alt' },
732
+ 'format' => { Groups => { 2 => 'Image' } },
733
+ identifier => { Groups => { 2 => 'Image' } },
734
+ language => { List => 'Bag' },
735
+ publisher => { Groups => { 2 => 'Author' }, List => 'Bag' },
736
+ relation => { List => 'Bag' },
737
+ rights => { Groups => { 2 => 'Author' }, Writable => 'lang-alt' },
738
+ source => { Groups => { 2 => 'Author' }, Avoid => 1 },
739
+ subject => { Groups => { 2 => 'Image' }, List => 'Bag' },
740
+ title => { Groups => { 2 => 'Image' }, Writable => 'lang-alt' },
741
+ type => { Groups => { 2 => 'Image' }, List => 'Bag' },
742
+ );
743
+
744
+ # XMP namespace properties (xmp, xap)
745
+ %Image::ExifTool::XMP::xmp = (
746
+ %xmpTableDefaults,
747
+ GROUPS => { 1 => 'XMP-xmp', 2 => 'Image' },
748
+ NAMESPACE => 'xmp',
749
+ NOTES => q{
750
+ XMP namespace tags. If the older "xap", "xapBJ", "xapMM" or "xapRights"
751
+ namespace prefixes are found, they are translated to the newer "xmp",
752
+ "xmpBJ", "xmpMM" and "xmpRights" prefixes for use in family 1 group names.
753
+ },
754
+ Advisory => { List => 'Bag', Notes => 'deprecated' },
755
+ BaseURL => { },
756
+ # (date/time tags not as reliable as EXIF)
757
+ CreateDate => { Groups => { 2 => 'Time' }, %dateTimeInfo, Priority => 0 },
758
+ CreatorTool => { },
759
+ Identifier => { Avoid => 1, List => 'Bag' },
760
+ Label => { },
761
+ MetadataDate=> { Groups => { 2 => 'Time' }, %dateTimeInfo },
762
+ ModifyDate => { Groups => { 2 => 'Time' }, %dateTimeInfo, Priority => 0 },
763
+ Nickname => { },
764
+ Rating => { Writable => 'real', Notes => 'a value from 0 to 5, or -1 for "rejected"' },
765
+ Thumbnails => {
766
+ FlatName => 'Thumbnail',
767
+ Struct => \%sThumbnail,
768
+ List => 'Alt',
769
+ },
770
+ # the following written by Adobe InDesign, not part of XMP spec:
771
+ PageInfo => {
772
+ FlatName => 'PageImage',
773
+ Struct => \%sPageInfo,
774
+ List => 'Seq',
775
+ },
776
+ PageInfoImage => { Name => 'PageImage', Flat => 1 },
777
+ Title => { Avoid => 1, Notes => 'non-standard', Writable => 'lang-alt' }, #11
778
+ Author => { Avoid => 1, Notes => 'non-standard', Groups => { 2 => 'Author' } }, #11
779
+ Keywords => { Avoid => 1, Notes => 'non-standard' }, #11
780
+ Description => { Avoid => 1, Notes => 'non-standard', Writable => 'lang-alt' }, #11
781
+ Format => { Avoid => 1, Notes => 'non-standard' }, #11
782
+ );
783
+
784
+ # XMP Rights Management namespace properties (xmpRights, xapRights)
785
+ %Image::ExifTool::XMP::xmpRights = (
786
+ %xmpTableDefaults,
787
+ GROUPS => { 1 => 'XMP-xmpRights', 2 => 'Author' },
788
+ NAMESPACE => 'xmpRights',
789
+ NOTES => 'XMP Rights Management namespace tags.',
790
+ Certificate => { },
791
+ Marked => { Writable => 'boolean' },
792
+ Owner => { List => 'Bag' },
793
+ UsageTerms => { Writable => 'lang-alt' },
794
+ WebStatement => { },
795
+ );
796
+
797
+ # XMP Note namespace properties (xmpNote)
798
+ %Image::ExifTool::XMP::xmpNote = (
799
+ %xmpTableDefaults,
800
+ GROUPS => { 1 => 'XMP-xmpNote' },
801
+ NAMESPACE => 'xmpNote',
802
+ NOTES => 'XMP Note namespace tags.',
803
+ HasExtendedXMP => { Writable => 'boolean', Protected => 2 },
804
+ );
805
+
806
+ # XMP xmpMM ManifestItem struct (ref PH, written by Adobe PDF library 8.0)
807
+ my %sManifestItem = (
808
+ NAMESPACE => 'stMfs',
809
+ STRUCT_NAME => 'ManifestItem',
810
+ linkForm => { },
811
+ placedXResolution => { Namespace => 'xmpMM', Writable => 'real' },
812
+ placedYResolution => { Namespace => 'xmpMM', Writable => 'real' },
813
+ placedResolutionUnit=> { Namespace => 'xmpMM' },
814
+ reference => { Struct => \%sResourceRef },
815
+ );
816
+
817
+ # the xmpMM Pantry
818
+ my %sPantryItem = (
819
+ NAMESPACE => undef, # stores any top-level XMP tags
820
+ STRUCT_NAME => 'PantryItem',
821
+ NOTES => q{
822
+ This structure must have an InstanceID field, but may also contain any other
823
+ XMP properties.
824
+ },
825
+ InstanceID => { Namespace => 'xmpMM' },
826
+ );
827
+
828
+ # XMP Media Management namespace properties (xmpMM, xapMM)
829
+ %Image::ExifTool::XMP::xmpMM = (
830
+ %xmpTableDefaults,
831
+ GROUPS => { 1 => 'XMP-xmpMM', 2 => 'Other' },
832
+ NAMESPACE => 'xmpMM',
833
+ TABLE_DESC => 'XMP Media Management',
834
+ NOTES => 'XMP Media Management namespace tags.',
835
+ DerivedFrom => { Struct => \%sResourceRef },
836
+ DocumentID => { },
837
+ History => { Struct => \%sResourceEvent, List => 'Seq' },
838
+ # we treat these like list items since History is a list
839
+ Ingredients => { Struct => \%sResourceRef, List => 'Bag' },
840
+ InstanceID => { }, #PH (CS3)
841
+ ManagedFrom => { Struct => \%sResourceRef },
842
+ Manager => { Groups => { 2 => 'Author' } },
843
+ ManageTo => { Groups => { 2 => 'Author' } },
844
+ ManageUI => { },
845
+ ManagerVariant => { },
846
+ Manifest => { Struct => \%sManifestItem, List => 'Bag' },
847
+ OriginalDocumentID=> { },
848
+ Pantry => { Struct => \%sPantryItem, List => 'Bag' },
849
+ PreservedFileName => { }, # undocumented
850
+ RenditionClass => { },
851
+ RenditionParams => { },
852
+ VersionID => { },
853
+ Versions => { Struct => \%sVersion, List => 'Seq' },
854
+ LastURL => { }, # (deprecated)
855
+ RenditionOf => { Struct => \%sResourceRef }, # (deprecated)
856
+ SaveID => { Writable => 'integer' }, # (deprecated)
857
+ subject => { List => 'Seq', Avoid => 1, Notes => 'undocumented' },
858
+ );
859
+
860
+ # XMP Basic Job Ticket namespace properties (xmpBJ, xapBJ)
861
+ %Image::ExifTool::XMP::xmpBJ = (
862
+ %xmpTableDefaults,
863
+ GROUPS => { 1 => 'XMP-xmpBJ', 2 => 'Other' },
864
+ NAMESPACE => 'xmpBJ',
865
+ TABLE_DESC => 'XMP Basic Job Ticket',
866
+ NOTES => 'XMP Basic Job Ticket namespace tags.',
867
+ # Note: JobRef is a List of structures. To accomplish this, we set the XMP
868
+ # List=>'Bag', but since SubDirectory is defined, this tag isn't writable
869
+ # directly. Then we need to set List=>1 for the members so the Writer logic
870
+ # will allow us to add list items.
871
+ JobRef => { Struct => \%sJobRef, List => 'Bag' },
872
+ );
873
+
874
+ # XMP Paged-Text namespace properties (xmpTPg)
875
+ %Image::ExifTool::XMP::xmpTPg = (
876
+ %xmpTableDefaults,
877
+ GROUPS => { 1 => 'XMP-xmpTPg', 2 => 'Image' },
878
+ NAMESPACE => 'xmpTPg',
879
+ TABLE_DESC => 'XMP Paged-Text',
880
+ NOTES => 'XMP Paged-Text namespace tags.',
881
+ MaxPageSize => { Struct => \%sDimensions },
882
+ NPages => { Writable => 'integer' },
883
+ Fonts => {
884
+ FlatName => '',
885
+ Struct => \%sFont,
886
+ List => 'Bag',
887
+ },
888
+ FontsVersionString => { Name => 'FontVersion', Flat => 1 },
889
+ FontsComposite => { Name => 'FontComposite', Flat => 1 },
890
+ Colorants => {
891
+ FlatName => 'Colorant',
892
+ Struct => \%sColorant,
893
+ List => 'Seq',
894
+ },
895
+ PlateNames => { List => 'Seq' },
896
+ );
897
+
898
+ # PDF namespace properties (pdf)
899
+ %Image::ExifTool::XMP::pdf = (
900
+ %xmpTableDefaults,
901
+ GROUPS => { 1 => 'XMP-pdf', 2 => 'Image' },
902
+ NAMESPACE => 'pdf',
903
+ TABLE_DESC => 'XMP PDF',
904
+ NOTES => q{
905
+ Adobe PDF namespace tags. The official XMP specification defines only
906
+ Keywords, PDFVersion, Producer and Trapped. The other tags are included
907
+ because they have been observed in PDF files, but some are avoided when
908
+ writing due to name conflicts with other XMP namespaces.
909
+ },
910
+ Author => { Groups => { 2 => 'Author' } }, #PH
911
+ ModDate => { Groups => { 2 => 'Time' }, %dateTimeInfo }, #PH
912
+ CreationDate=> { Groups => { 2 => 'Time' }, %dateTimeInfo }, #PH
913
+ Creator => { Groups => { 2 => 'Author' }, Avoid => 1 },
914
+ Copyright => { Groups => { 2 => 'Author' }, Avoid => 1 }, #PH
915
+ Marked => { Avoid => 1, Writable => 'boolean' }, #PH
916
+ Subject => { Avoid => 1 },
917
+ Title => { Avoid => 1 },
918
+ Trapped => { #PH
919
+ # remove leading '/' from '/True' or '/False'
920
+ ValueConv => '$val=~s{^/}{}; $val',
921
+ ValueConvInv => '"/$val"',
922
+ PrintConv => { True => 'True', False => 'False', Unknown => 'Unknown' },
923
+ },
924
+ Keywords => { Priority => 0 },
925
+ PDFVersion => { },
926
+ Producer => { Groups => { 2 => 'Author' } },
927
+ );
928
+
929
+ # PDF extension namespace properties (pdfx)
930
+ %Image::ExifTool::XMP::pdfx = (
931
+ %xmpTableDefaults,
932
+ GROUPS => { 1 => 'XMP-pdfx', 2 => 'Document' },
933
+ NAMESPACE => 'pdfx',
934
+ NOTES => q{
935
+ PDF extension tags. This namespace is used to store application-defined PDF
936
+ information, so there are no pre-defined tags. User-defined tags must be
937
+ created to enable writing of XMP-pdfx information.
938
+ },
939
+ );
940
+
941
+ # Photoshop namespace properties (photoshop)
942
+ %Image::ExifTool::XMP::photoshop = (
943
+ %xmpTableDefaults,
944
+ GROUPS => { 1 => 'XMP-photoshop', 2 => 'Image' },
945
+ NAMESPACE => 'photoshop',
946
+ TABLE_DESC => 'XMP Photoshop',
947
+ NOTES => 'Adobe Photoshop namespace tags.',
948
+ AuthorsPosition => { Groups => { 2 => 'Author' } },
949
+ CaptionWriter => { Groups => { 2 => 'Author' } },
950
+ Category => { },
951
+ City => { Groups => { 2 => 'Location' } },
952
+ ColorMode => {
953
+ Writable => 'integer', # (as of July 2010 spec, courtesy of yours truly)
954
+ PrintConvColumns => 2,
955
+ PrintConv => {
956
+ 0 => 'Bitmap',
957
+ 1 => 'Grayscale',
958
+ 2 => 'Indexed',
959
+ 3 => 'RGB',
960
+ 4 => 'CMYK',
961
+ 7 => 'Multichannel',
962
+ 8 => 'Duotone',
963
+ 9 => 'Lab',
964
+ },
965
+ },
966
+ Country => { Groups => { 2 => 'Location' } },
967
+ Credit => { Groups => { 2 => 'Author' } },
968
+ DateCreated => { Groups => { 2 => 'Time' }, %dateTimeInfo },
969
+ DocumentAncestors => {
970
+ FlatName => 'Document',
971
+ List => 'Bag',
972
+ Struct => {
973
+ STRUCT_NAME => 'Ancestor',
974
+ NAMESPACE => 'photoshop',
975
+ AncestorID => { },
976
+ },
977
+ },
978
+ Headline => { },
979
+ History => { }, #PH (CS3)
980
+ ICCProfile => { Name => 'ICCProfileName' }, #PH
981
+ Instructions => { },
982
+ LegacyIPTCDigest=> { }, #PH
983
+ SidecarForExtension => { }, #PH (CS3)
984
+ Source => { Groups => { 2 => 'Author' } },
985
+ State => { Groups => { 2 => 'Location' } },
986
+ # the XMP spec doesn't show SupplementalCategories as a 'Bag', but
987
+ # that's the way Photoshop writes it [fixed in the June 2005 XMP spec].
988
+ # Also, it is incorrectly listed as "SupplementalCategory" in the
989
+ # IPTC Standard Photo Metadata docs (2008rev2 and July 2009rev1) - PH
990
+ SupplementalCategories => { List => 'Bag' },
991
+ TextLayers => {
992
+ FlatName => 'Text',
993
+ List => 'Seq',
994
+ Struct => {
995
+ STRUCT_NAME => 'Layer',
996
+ NAMESPACE => 'photoshop',
997
+ LayerName => { },
998
+ LayerText => { },
999
+ },
1000
+ },
1001
+ TransmissionReference => { },
1002
+ Urgency => {
1003
+ Writable => 'integer',
1004
+ Notes => 'should be in the range 1-8 to conform with the XMP spec',
1005
+ PrintConv => { # (same values as IPTC:Urgency)
1006
+ 0 => '0 (reserved)', # (not standard XMP)
1007
+ 1 => '1 (most urgent)',
1008
+ 2 => 2,
1009
+ 3 => 3,
1010
+ 4 => 4,
1011
+ 5 => '5 (normal urgency)',
1012
+ 6 => 6,
1013
+ 7 => 7,
1014
+ 8 => '8 (least urgent)',
1015
+ 9 => '9 (user-defined priority)', # (not standard XMP)
1016
+ },
1017
+ },
1018
+ );
1019
+
1020
+ # Photoshop Camera Raw namespace properties (crs) - (ref 8,PH)
1021
+ %Image::ExifTool::XMP::crs = (
1022
+ %xmpTableDefaults,
1023
+ GROUPS => { 1 => 'XMP-crs', 2 => 'Image' },
1024
+ NAMESPACE => 'crs',
1025
+ TABLE_DESC => 'Photoshop Camera Raw namespace',
1026
+ NOTES => 'Photoshop Camera Raw namespace tags.',
1027
+ AlreadyApplied => { Writable => 'boolean' }, #PH (written by LightRoom beta 4.1)
1028
+ AutoBrightness => { Writable => 'boolean' },
1029
+ AutoContrast => { Writable => 'boolean' },
1030
+ AutoExposure => { Writable => 'boolean' },
1031
+ AutoShadows => { Writable => 'boolean' },
1032
+ BlueHue => { Writable => 'integer' },
1033
+ BlueSaturation => { Writable => 'integer' },
1034
+ Brightness => { Writable => 'integer' },
1035
+ CameraProfile => { },
1036
+ ChromaticAberrationB=> { Writable => 'integer' },
1037
+ ChromaticAberrationR=> { Writable => 'integer' },
1038
+ ColorNoiseReduction => { Writable => 'integer' },
1039
+ Contrast => { Writable => 'integer', Avoid => 1 },
1040
+ Converter => { }, #PH guess (found in EXIF)
1041
+ CropTop => { Writable => 'real' },
1042
+ CropLeft => { Writable => 'real' },
1043
+ CropBottom => { Writable => 'real' },
1044
+ CropRight => { Writable => 'real' },
1045
+ CropAngle => { Writable => 'real' },
1046
+ CropWidth => { Writable => 'real' },
1047
+ CropHeight => { Writable => 'real' },
1048
+ CropUnits => {
1049
+ Writable => 'integer',
1050
+ PrintConv => {
1051
+ 0 => 'pixels',
1052
+ 1 => 'inches',
1053
+ 2 => 'cm',
1054
+ },
1055
+ },
1056
+ Exposure => { Writable => 'real' },
1057
+ GreenHue => { Writable => 'integer' },
1058
+ GreenSaturation => { Writable => 'integer' },
1059
+ HasCrop => { Writable => 'boolean' },
1060
+ HasSettings => { Writable => 'boolean' },
1061
+ LuminanceSmoothing => { Writable => 'integer' },
1062
+ MoireFilter => { PrintConv => { Off=>'Off', On=>'On' } },
1063
+ RawFileName => { },
1064
+ RedHue => { Writable => 'integer' },
1065
+ RedSaturation => { Writable => 'integer' },
1066
+ Saturation => { Writable => 'integer', Avoid => 1 },
1067
+ Shadows => { Writable => 'integer' },
1068
+ ShadowTint => { Writable => 'integer' },
1069
+ Sharpness => { Writable => 'integer', Avoid => 1 },
1070
+ Smoothness => { Writable => 'integer' },
1071
+ Temperature => { Writable => 'integer', Avoid => 1, Name => 'ColorTemperature' },
1072
+ Tint => { Writable => 'integer' },
1073
+ ToneCurve => { List => 'Seq' },
1074
+ ToneCurveName => {
1075
+ PrintConv => {
1076
+ Linear => 'Linear',
1077
+ 'Medium Contrast' => 'Medium Contrast',
1078
+ 'Strong Contrast' => 'Strong Contrast',
1079
+ Custom => 'Custom',
1080
+ },
1081
+ },
1082
+ Version => { },
1083
+ VignetteAmount => { Writable => 'integer' },
1084
+ VignetteMidpoint=> { Writable => 'integer' },
1085
+ WhiteBalance => {
1086
+ Avoid => 1,
1087
+ PrintConv => {
1088
+ 'As Shot' => 'As Shot',
1089
+ Auto => 'Auto',
1090
+ Daylight => 'Daylight',
1091
+ Cloudy => 'Cloudy',
1092
+ Shade => 'Shade',
1093
+ Tungsten => 'Tungsten',
1094
+ Fluorescent => 'Fluorescent',
1095
+ Flash => 'Flash',
1096
+ Custom => 'Custom',
1097
+ },
1098
+ },
1099
+ # new tags observed in Adobe Lightroom output - PH
1100
+ CameraProfileDigest => { },
1101
+ Clarity => { Writable => 'integer' },
1102
+ ConvertToGrayscale => { Writable => 'boolean' },
1103
+ Defringe => { Writable => 'integer' },
1104
+ FillLight => { Writable => 'integer' },
1105
+ HighlightRecovery => { Writable => 'integer' },
1106
+ HueAdjustmentAqua => { Writable => 'integer' },
1107
+ HueAdjustmentBlue => { Writable => 'integer' },
1108
+ HueAdjustmentGreen => { Writable => 'integer' },
1109
+ HueAdjustmentMagenta => { Writable => 'integer' },
1110
+ HueAdjustmentOrange => { Writable => 'integer' },
1111
+ HueAdjustmentPurple => { Writable => 'integer' },
1112
+ HueAdjustmentRed => { Writable => 'integer' },
1113
+ HueAdjustmentYellow => { Writable => 'integer' },
1114
+ IncrementalTemperature => { Writable => 'integer' },
1115
+ IncrementalTint => { Writable => 'integer' },
1116
+ LuminanceAdjustmentAqua => { Writable => 'integer' },
1117
+ LuminanceAdjustmentBlue => { Writable => 'integer' },
1118
+ LuminanceAdjustmentGreen => { Writable => 'integer' },
1119
+ LuminanceAdjustmentMagenta => { Writable => 'integer' },
1120
+ LuminanceAdjustmentOrange => { Writable => 'integer' },
1121
+ LuminanceAdjustmentPurple => { Writable => 'integer' },
1122
+ LuminanceAdjustmentRed => { Writable => 'integer' },
1123
+ LuminanceAdjustmentYellow => { Writable => 'integer' },
1124
+ ParametricDarks => { Writable => 'integer' },
1125
+ ParametricHighlights => { Writable => 'integer' },
1126
+ ParametricHighlightSplit => { Writable => 'integer' },
1127
+ ParametricLights => { Writable => 'integer' },
1128
+ ParametricMidtoneSplit => { Writable => 'integer' },
1129
+ ParametricShadows => { Writable => 'integer' },
1130
+ ParametricShadowSplit => { Writable => 'integer' },
1131
+ SaturationAdjustmentAqua => { Writable => 'integer' },
1132
+ SaturationAdjustmentBlue => { Writable => 'integer' },
1133
+ SaturationAdjustmentGreen => { Writable => 'integer' },
1134
+ SaturationAdjustmentMagenta => { Writable => 'integer' },
1135
+ SaturationAdjustmentOrange => { Writable => 'integer' },
1136
+ SaturationAdjustmentPurple => { Writable => 'integer' },
1137
+ SaturationAdjustmentRed => { Writable => 'integer' },
1138
+ SaturationAdjustmentYellow => { Writable => 'integer' },
1139
+ SharpenDetail => { Writable => 'integer' },
1140
+ SharpenEdgeMasking => { Writable => 'integer' },
1141
+ SharpenRadius => { Writable => 'real' },
1142
+ SplitToningBalance => { Writable => 'integer' },
1143
+ SplitToningHighlightHue => { Writable => 'integer' },
1144
+ SplitToningHighlightSaturation => { Writable => 'integer' },
1145
+ SplitToningShadowHue => { Writable => 'integer' },
1146
+ SplitToningShadowSaturation => { Writable => 'integer' },
1147
+ Vibrance => { Writable => 'integer' },
1148
+ # new tags written by LR 1.4 (not sure in what version they first appeared)
1149
+ GrayMixerRed => { Writable => 'integer' },
1150
+ GrayMixerOrange => { Writable => 'integer' },
1151
+ GrayMixerYellow => { Writable => 'integer' },
1152
+ GrayMixerGreen => { Writable => 'integer' },
1153
+ GrayMixerAqua => { Writable => 'integer' },
1154
+ GrayMixerBlue => { Writable => 'integer' },
1155
+ GrayMixerPurple => { Writable => 'integer' },
1156
+ GrayMixerMagenta => { Writable => 'integer' },
1157
+ RetouchInfo => { List => 'Seq' },
1158
+ RedEyeInfo => { List => 'Seq' },
1159
+ # new tags written by LR 2.0 (ref PH)
1160
+ CropUnit => { # was the XMP documentation wrong with "CropUnits"??
1161
+ Writable => 'integer',
1162
+ PrintConv => {
1163
+ 0 => 'pixels',
1164
+ 1 => 'inches',
1165
+ 2 => 'cm',
1166
+ # have seen a value of 3 here! - PH
1167
+ },
1168
+ },
1169
+ PostCropVignetteAmount => { Writable => 'integer' },
1170
+ PostCropVignetteMidpoint => { Writable => 'integer' },
1171
+ PostCropVignetteFeather => { Writable => 'integer' },
1172
+ PostCropVignetteRoundness => { Writable => 'integer' },
1173
+ PostCropVignetteStyle => { Writable => 'integer' },
1174
+ # disable List behaviour of flattened Gradient/PaintBasedCorrections
1175
+ # because these are nested in lists and the flattened tags can't
1176
+ # do justice to this complex structure
1177
+ GradientBasedCorrections => {
1178
+ FlatName => 'GradientBasedCorr',
1179
+ Struct => \%sCorrection,
1180
+ List => 'Seq',
1181
+ },
1182
+ GradientBasedCorrectionsCorrectionMasks => {
1183
+ Name => 'GradientBasedCorrMasks',
1184
+ FlatName => 'GradientBasedCorrMask',
1185
+ Flat => 1
1186
+ },
1187
+ GradientBasedCorrectionsCorrectionMasksDabs => {
1188
+ Name => 'GradientBasedCorrMaskDabs',
1189
+ Flat => 1, List => 0,
1190
+ },
1191
+ PaintBasedCorrections => {
1192
+ FlatName => 'PaintCorrection',
1193
+ Struct => \%sCorrection,
1194
+ List => 'Seq',
1195
+ },
1196
+ PaintBasedCorrectionsCorrectionMasks => {
1197
+ Name => 'PaintBasedCorrectionMasks',
1198
+ FlatName => 'PaintCorrectionMask',
1199
+ Flat => 1,
1200
+ },
1201
+ PaintBasedCorrectionsCorrectionMasksDabs => {
1202
+ Name => 'PaintCorrectionMaskDabs',
1203
+ Flat => 1, List => 0,
1204
+ },
1205
+ # new tags written by LR 3 (thanks Wolfgang Guelcker)
1206
+ ProcessVersion => { },
1207
+ LensProfileEnable => { Writable => 'integer' },
1208
+ LensProfileSetup => { },
1209
+ LensProfileName => { },
1210
+ LensProfileFilename => { },
1211
+ LensProfileDigest => { },
1212
+ LensProfileDistortionScale => { Writable => 'integer' },
1213
+ LensProfileChromaticAberrationScale => { Writable => 'integer' },
1214
+ LensProfileVignettingScale => { Writable => 'integer' },
1215
+ LensManualDistortionAmount => { Writable => 'integer' },
1216
+ PerspectiveVertical => { Writable => 'integer' },
1217
+ PerspectiveHorizontal => { Writable => 'integer' },
1218
+ PerspectiveRotate => { Writable => 'real' },
1219
+ PerspectiveScale => { Writable => 'integer' },
1220
+ CropConstrainToWarp => { Writable => 'integer' },
1221
+ LuminanceNoiseReductionDetail => { Writable => 'integer' },
1222
+ LuminanceNoiseReductionContrast => { Writable => 'integer' },
1223
+ ColorNoiseReductionDetail => { Writable => 'integer' },
1224
+ GrainAmount => { Writable => 'integer' },
1225
+ GrainSize => { Writable => 'integer' },
1226
+ GrainFrequency => { Writable => 'integer' },
1227
+ # new tags written by LR4
1228
+ AutoLateralCA => { Writable => 'integer' },
1229
+ Exposure2012 => { Writable => 'real' },
1230
+ Contrast2012 => { Writable => 'integer' },
1231
+ Highlights2012 => { Writable => 'integer' },
1232
+ Shadows2012 => { Writable => 'integer' },
1233
+ Whites2012 => { Writable => 'integer' },
1234
+ Blacks2012 => { Writable => 'integer' },
1235
+ Clarity2012 => { Writable => 'integer' },
1236
+ PostCropVignetteHighlightContrast => { Writable => 'integer' },
1237
+ ToneCurveName2012 => { },
1238
+ ToneCurveRed => { List => 'Seq' },
1239
+ ToneCurveGreen => { List => 'Seq' },
1240
+ ToneCurveBlue => { List => 'Seq' },
1241
+ ToneCurvePV2012 => { List => 'Seq' },
1242
+ ToneCurvePV2012Red => { List => 'Seq' },
1243
+ ToneCurvePV2012Green => { List => 'Seq' },
1244
+ ToneCurvePV2012Blue => { List => 'Seq' },
1245
+ DefringePurpleAmount => { Writable => 'integer' },
1246
+ DefringePurpleHueLo => { Writable => 'integer' },
1247
+ DefringePurpleHueHi => { Writable => 'integer' },
1248
+ DefringeGreenAmount => { Writable => 'integer' },
1249
+ DefringeGreenHueLo => { Writable => 'integer' },
1250
+ DefringeGreenHueHi => { Writable => 'integer' },
1251
+ );
1252
+
1253
+ # Tiff namespace properties (tiff)
1254
+ %Image::ExifTool::XMP::tiff = (
1255
+ %xmpTableDefaults,
1256
+ GROUPS => { 1 => 'XMP-tiff', 2 => 'Image' },
1257
+ NAMESPACE => 'tiff',
1258
+ PRIORITY => 0, # not as reliable as actual TIFF tags
1259
+ TABLE_DESC => 'XMP TIFF',
1260
+ NOTES => 'EXIF namespace for TIFF tags.',
1261
+ ImageWidth => { Writable => 'integer' },
1262
+ ImageLength => { Writable => 'integer', Name => 'ImageHeight' },
1263
+ BitsPerSample => { Writable => 'integer', List => 'Seq', AutoSplit => 1 },
1264
+ Compression => {
1265
+ Writable => 'integer',
1266
+ SeparateTable => 'EXIF Compression',
1267
+ PrintConv => \%Image::ExifTool::Exif::compression,
1268
+ },
1269
+ PhotometricInterpretation => {
1270
+ Writable => 'integer',
1271
+ PrintConv => \%Image::ExifTool::Exif::photometricInterpretation,
1272
+ },
1273
+ Orientation => {
1274
+ Writable => 'integer',
1275
+ PrintConv => \%Image::ExifTool::Exif::orientation,
1276
+ },
1277
+ SamplesPerPixel => { Writable => 'integer' },
1278
+ PlanarConfiguration => {
1279
+ Writable => 'integer',
1280
+ PrintConv => {
1281
+ 1 => 'Chunky',
1282
+ 2 => 'Planar',
1283
+ },
1284
+ },
1285
+ YCbCrSubSampling => {
1286
+ Writable => 'integer',
1287
+ List => 'Seq',
1288
+ # join the raw values before conversion to allow PrintConv to operate on
1289
+ # the combined string as it does for the corresponding EXIF tag
1290
+ RawJoin => 1,
1291
+ Notes => q{
1292
+ while technically this is a list-type tag, for compatibility with its EXIF
1293
+ counterpart it is written and read as a simple string
1294
+ },
1295
+ PrintConv => \%Image::ExifTool::JPEG::yCbCrSubSampling,
1296
+ },
1297
+ YCbCrPositioning => {
1298
+ Writable => 'integer',
1299
+ PrintConv => {
1300
+ 1 => 'Centered',
1301
+ 2 => 'Co-sited',
1302
+ },
1303
+ },
1304
+ XResolution => { Writable => 'rational' },
1305
+ YResolution => { Writable => 'rational' },
1306
+ ResolutionUnit => {
1307
+ Writable => 'integer',
1308
+ Notes => 'the value 1 is not standard EXIF',
1309
+ PrintConv => {
1310
+ 1 => 'None',
1311
+ 2 => 'inches',
1312
+ 3 => 'cm',
1313
+ },
1314
+ },
1315
+ TransferFunction => { Writable => 'integer', List => 'Seq', AutoSplit => 1 },
1316
+ WhitePoint => { Writable => 'rational', List => 'Seq', AutoSplit => 1 },
1317
+ PrimaryChromaticities => { Writable => 'rational', List => 'Seq', AutoSplit => 1 },
1318
+ YCbCrCoefficients => { Writable => 'rational', List => 'Seq', AutoSplit => 1 },
1319
+ ReferenceBlackWhite => { Writable => 'rational', List => 'Seq', AutoSplit => 1 },
1320
+ DateTime => { # (EXIF tag named ModifyDate, but this exists in XMP-xmp)
1321
+ Description => 'Date/Time Modified',
1322
+ Groups => { 2 => 'Time' },
1323
+ %dateTimeInfo,
1324
+ },
1325
+ ImageDescription => { Writable => 'lang-alt' },
1326
+ Make => {
1327
+ Groups => { 2 => 'Camera' },
1328
+ RawConv => '$$self{Make} ? $val : $$self{Make} = $val',
1329
+ },
1330
+ Model => {
1331
+ Groups => { 2 => 'Camera' },
1332
+ Description => 'Camera Model Name',
1333
+ RawConv => '$$self{Model} ? $val : $$self{Model} = $val',
1334
+ },
1335
+ Software => { },
1336
+ Artist => { Groups => { 2 => 'Author' } },
1337
+ Copyright => { Groups => { 2 => 'Author' }, Writable => 'lang-alt' },
1338
+ NativeDigest => { }, #PH
1339
+ );
1340
+
1341
+ # Exif namespace properties (exif)
1342
+ %Image::ExifTool::XMP::exif = (
1343
+ %xmpTableDefaults,
1344
+ GROUPS => { 1 => 'XMP-exif', 2 => 'Image' },
1345
+ NAMESPACE => 'exif',
1346
+ PRIORITY => 0, # not as reliable as actual EXIF tags
1347
+ NOTES => 'EXIF namespace for EXIF tags.',
1348
+ ExifVersion => { },
1349
+ FlashpixVersion => { },
1350
+ ColorSpace => {
1351
+ Writable => 'integer',
1352
+ # (some applications incorrectly write -1 as a long integer)
1353
+ ValueConv => '$val == 0xffffffff ? 0xffff : $val',
1354
+ ValueConvInv => '$val',
1355
+ PrintConv => {
1356
+ 1 => 'sRGB',
1357
+ 2 => 'Adobe RGB',
1358
+ 0xffff => 'Uncalibrated',
1359
+ },
1360
+ },
1361
+ ComponentsConfiguration => {
1362
+ Writable => 'integer',
1363
+ List => 'Seq',
1364
+ AutoSplit => 1,
1365
+ PrintConvColumns => 2,
1366
+ PrintConv => {
1367
+ 0 => '-',
1368
+ 1 => 'Y',
1369
+ 2 => 'Cb',
1370
+ 3 => 'Cr',
1371
+ 4 => 'R',
1372
+ 5 => 'G',
1373
+ 6 => 'B',
1374
+ },
1375
+ },
1376
+ CompressedBitsPerPixel => { Writable => 'rational' },
1377
+ PixelXDimension => { Name => 'ExifImageWidth', Writable => 'integer' },
1378
+ PixelYDimension => { Name => 'ExifImageHeight', Writable => 'integer' },
1379
+ MakerNote => { },
1380
+ UserComment => { Writable => 'lang-alt' },
1381
+ RelatedSoundFile => { },
1382
+ DateTimeOriginal => {
1383
+ Description => 'Date/Time Original',
1384
+ Groups => { 2 => 'Time' },
1385
+ %dateTimeInfo,
1386
+ },
1387
+ DateTimeDigitized => { # (EXIF tag named CreateDate, but this exists in XMP-xmp)
1388
+ Description => 'Date/Time Digitized',
1389
+ Groups => { 2 => 'Time' },
1390
+ %dateTimeInfo,
1391
+ },
1392
+ ExposureTime => {
1393
+ Writable => 'rational',
1394
+ PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
1395
+ PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
1396
+ },
1397
+ FNumber => {
1398
+ Writable => 'rational',
1399
+ PrintConv => 'Image::ExifTool::Exif::PrintFNumber($val)',
1400
+ PrintConvInv => '$val',
1401
+ },
1402
+ ExposureProgram => {
1403
+ Groups => { 2 => 'Camera' },
1404
+ Writable => 'integer',
1405
+ PrintConv => {
1406
+ 0 => 'Not Defined',
1407
+ 1 => 'Manual',
1408
+ 2 => 'Program AE',
1409
+ 3 => 'Aperture-priority AE',
1410
+ 4 => 'Shutter speed priority AE',
1411
+ 5 => 'Creative (Slow speed)',
1412
+ 6 => 'Action (High speed)',
1413
+ 7 => 'Portrait',
1414
+ 8 => 'Landscape',
1415
+ },
1416
+ },
1417
+ SpectralSensitivity => { Groups => { 2 => 'Camera' } },
1418
+ ISOSpeedRatings => {
1419
+ Name => 'ISO',
1420
+ Writable => 'integer',
1421
+ List => 'Seq',
1422
+ AutoSplit => 1,
1423
+ },
1424
+ OECF => {
1425
+ Name => 'Opto-ElectricConvFactor',
1426
+ FlatName => 'OECF',
1427
+ Groups => { 2 => 'Camera' },
1428
+ Struct => \%sOECF,
1429
+ },
1430
+ ShutterSpeedValue => {
1431
+ Writable => 'rational',
1432
+ ValueConv => 'abs($val)<100 ? 1/(2**$val) : 0',
1433
+ PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
1434
+ ValueConvInv => '$val>0 ? -log($val)/log(2) : 0',
1435
+ PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
1436
+ },
1437
+ ApertureValue => {
1438
+ Writable => 'rational',
1439
+ ValueConv => 'sqrt(2) ** $val',
1440
+ PrintConv => 'sprintf("%.1f",$val)',
1441
+ ValueConvInv => '$val>0 ? 2*log($val)/log(2) : 0',
1442
+ PrintConvInv => '$val',
1443
+ },
1444
+ BrightnessValue => { Writable => 'rational' },
1445
+ ExposureBiasValue => {
1446
+ Name => 'ExposureCompensation',
1447
+ Writable => 'rational',
1448
+ PrintConv => 'Image::ExifTool::Exif::PrintFraction($val)',
1449
+ PrintConvInv => '$val',
1450
+ },
1451
+ MaxApertureValue => {
1452
+ Groups => { 2 => 'Camera' },
1453
+ Writable => 'rational',
1454
+ ValueConv => 'sqrt(2) ** $val',
1455
+ PrintConv => 'sprintf("%.1f",$val)',
1456
+ ValueConvInv => '$val>0 ? 2*log($val)/log(2) : 0',
1457
+ PrintConvInv => '$val',
1458
+ },
1459
+ SubjectDistance => {
1460
+ Groups => { 2 => 'Camera' },
1461
+ Writable => 'rational',
1462
+ PrintConv => '$val =~ /^(inf|undef)$/ ? $val : "$val m"',
1463
+ PrintConvInv => '$val=~s/\s*m$//;$val',
1464
+ },
1465
+ MeteringMode => {
1466
+ Groups => { 2 => 'Camera' },
1467
+ Writable => 'integer',
1468
+ PrintConv => {
1469
+ 1 => 'Average',
1470
+ 2 => 'Center-weighted average',
1471
+ 3 => 'Spot',
1472
+ 4 => 'Multi-spot',
1473
+ 5 => 'Multi-segment',
1474
+ 6 => 'Partial',
1475
+ 255 => 'Other',
1476
+ },
1477
+ },
1478
+ LightSource => {
1479
+ Groups => { 2 => 'Camera' },
1480
+ SeparateTable => 'EXIF LightSource',
1481
+ PrintConv => \%Image::ExifTool::Exif::lightSource,
1482
+ },
1483
+ Flash => {
1484
+ Groups => { 2 => 'Camera' },
1485
+ Struct => {
1486
+ STRUCT_NAME => 'Flash',
1487
+ NAMESPACE => 'exif',
1488
+ Fired => { Writable => 'boolean', %boolConv },
1489
+ Return => {
1490
+ Writable => 'integer',
1491
+ PrintConv => {
1492
+ 0 => 'No return detection',
1493
+ 2 => 'Return not detected',
1494
+ 3 => 'Return detected',
1495
+ },
1496
+ },
1497
+ Mode => {
1498
+ Writable => 'integer',
1499
+ PrintConv => {
1500
+ 0 => 'Unknown',
1501
+ 1 => 'On',
1502
+ 2 => 'Off',
1503
+ 3 => 'Auto',
1504
+ },
1505
+ },
1506
+ Function => { Writable => 'boolean', %boolConv },
1507
+ RedEyeMode => { Writable => 'boolean', %boolConv },
1508
+ },
1509
+ },
1510
+ FocalLength=> {
1511
+ Groups => { 2 => 'Camera' },
1512
+ Writable => 'rational',
1513
+ PrintConv => 'sprintf("%.1f mm",$val)',
1514
+ PrintConvInv => '$val=~s/\s*mm$//;$val',
1515
+ },
1516
+ SubjectArea => { Writable => 'integer', List => 'Seq', AutoSplit => 1 },
1517
+ FlashEnergy => { Groups => { 2 => 'Camera' }, Writable => 'rational' },
1518
+ SpatialFrequencyResponse => {
1519
+ Groups => { 2 => 'Camera' },
1520
+ Struct => \%sOECF,
1521
+ },
1522
+ FocalPlaneXResolution => { Groups => { 2 => 'Camera' }, Writable => 'rational' },
1523
+ FocalPlaneYResolution => { Groups => { 2 => 'Camera' }, Writable => 'rational' },
1524
+ FocalPlaneResolutionUnit => {
1525
+ Groups => { 2 => 'Camera' },
1526
+ Writable => 'integer',
1527
+ Notes => 'values 1, 4 and 5 are not standard EXIF',
1528
+ PrintConv => {
1529
+ 1 => 'None', # (not standard EXIF)
1530
+ 2 => 'inches',
1531
+ 3 => 'cm',
1532
+ 4 => 'mm', # (not standard EXIF)
1533
+ 5 => 'um', # (not standard EXIF)
1534
+ },
1535
+ },
1536
+ SubjectLocation => { Writable => 'integer', List => 'Seq', AutoSplit => 1 },
1537
+ ExposureIndex => { Writable => 'rational' },
1538
+ SensingMethod => {
1539
+ Groups => { 2 => 'Camera' },
1540
+ Writable => 'integer',
1541
+ Notes => 'values 1 and 6 are not standard EXIF',
1542
+ PrintConv => {
1543
+ 1 => 'Monochrome area', # (not standard EXIF)
1544
+ 2 => 'One-chip color area',
1545
+ 3 => 'Two-chip color area',
1546
+ 4 => 'Three-chip color area',
1547
+ 5 => 'Color sequential area',
1548
+ 6 => 'Monochrome linear', # (not standard EXIF)
1549
+ 7 => 'Trilinear',
1550
+ 8 => 'Color sequential linear',
1551
+ },
1552
+ },
1553
+ FileSource => {
1554
+ Writable => 'integer',
1555
+ PrintConv => {
1556
+ 1 => 'Film Scanner',
1557
+ 2 => 'Reflection Print Scanner',
1558
+ 3 => 'Digital Camera',
1559
+ }
1560
+ },
1561
+ SceneType => { Writable => 'integer', PrintConv => { 1 => 'Directly photographed' } },
1562
+ CFAPattern => {
1563
+ Struct => {
1564
+ STRUCT_NAME => 'CFAPattern',
1565
+ NAMESPACE => 'exif',
1566
+ Columns => { Writable => 'integer' },
1567
+ Rows => { Writable => 'integer' },
1568
+ Values => { Writable => 'integer', List => 'Seq' },
1569
+ },
1570
+ },
1571
+ CustomRendered => {
1572
+ Writable => 'integer',
1573
+ PrintConv => {
1574
+ 0 => 'Normal',
1575
+ 1 => 'Custom',
1576
+ },
1577
+ },
1578
+ ExposureMode => {
1579
+ Groups => { 2 => 'Camera' },
1580
+ Writable => 'integer',
1581
+ PrintConv => {
1582
+ 0 => 'Auto',
1583
+ 1 => 'Manual',
1584
+ 2 => 'Auto bracket',
1585
+ },
1586
+ },
1587
+ WhiteBalance => {
1588
+ Groups => { 2 => 'Camera' },
1589
+ Writable => 'integer',
1590
+ PrintConv => {
1591
+ 0 => 'Auto',
1592
+ 1 => 'Manual',
1593
+ },
1594
+ },
1595
+ DigitalZoomRatio => { Writable => 'rational' },
1596
+ FocalLengthIn35mmFilm => {
1597
+ Name => 'FocalLengthIn35mmFormat',
1598
+ Writable => 'integer',
1599
+ Groups => { 2 => 'Camera' },
1600
+ PrintConv => '"$val mm"',
1601
+ PrintConvInv => '$val=~s/\s*mm$//;$val',
1602
+ },
1603
+ SceneCaptureType => {
1604
+ Groups => { 2 => 'Camera' },
1605
+ Writable => 'integer',
1606
+ PrintConv => {
1607
+ 0 => 'Standard',
1608
+ 1 => 'Landscape',
1609
+ 2 => 'Portrait',
1610
+ 3 => 'Night',
1611
+ },
1612
+ },
1613
+ GainControl => {
1614
+ Groups => { 2 => 'Camera' },
1615
+ Writable => 'integer',
1616
+ PrintConv => {
1617
+ 0 => 'None',
1618
+ 1 => 'Low gain up',
1619
+ 2 => 'High gain up',
1620
+ 3 => 'Low gain down',
1621
+ 4 => 'High gain down',
1622
+ },
1623
+ },
1624
+ Contrast => {
1625
+ Groups => { 2 => 'Camera' },
1626
+ Writable => 'integer',
1627
+ PrintConv => {
1628
+ 0 => 'Normal',
1629
+ 1 => 'Low',
1630
+ 2 => 'High',
1631
+ },
1632
+ PrintConvInv => 'Image::ExifTool::Exif::ConvertParameter($val)',
1633
+ },
1634
+ Saturation => {
1635
+ Groups => { 2 => 'Camera' },
1636
+ Writable => 'integer',
1637
+ PrintConv => {
1638
+ 0 => 'Normal',
1639
+ 1 => 'Low',
1640
+ 2 => 'High',
1641
+ },
1642
+ PrintConvInv => 'Image::ExifTool::Exif::ConvertParameter($val)',
1643
+ },
1644
+ Sharpness => {
1645
+ Groups => { 2 => 'Camera' },
1646
+ Writable => 'integer',
1647
+ PrintConv => {
1648
+ 0 => 'Normal',
1649
+ 1 => 'Soft',
1650
+ 2 => 'Hard',
1651
+ },
1652
+ PrintConvInv => 'Image::ExifTool::Exif::ConvertParameter($val)',
1653
+ },
1654
+ DeviceSettingDescription => {
1655
+ Groups => { 2 => 'Camera' },
1656
+ Struct => {
1657
+ STRUCT_NAME => 'DeviceSettings',
1658
+ NAMESPACE => 'exif',
1659
+ Columns => { Writable => 'integer' },
1660
+ Rows => { Writable => 'integer' },
1661
+ Settings => { List => 'Seq' },
1662
+ },
1663
+ },
1664
+ SubjectDistanceRange => {
1665
+ Groups => { 2 => 'Camera' },
1666
+ Writable => 'integer',
1667
+ PrintConv => {
1668
+ 0 => 'Unknown',
1669
+ 1 => 'Macro',
1670
+ 2 => 'Close',
1671
+ 3 => 'Distant',
1672
+ },
1673
+ },
1674
+ ImageUniqueID => { },
1675
+ GPSVersionID => { Groups => { 2 => 'Location' } },
1676
+ GPSLatitude => { Groups => { 2 => 'Location' }, %latConv },
1677
+ GPSLongitude => { Groups => { 2 => 'Location' }, %longConv },
1678
+ GPSAltitudeRef => {
1679
+ Groups => { 2 => 'Location' },
1680
+ Writable => 'integer',
1681
+ PrintConv => {
1682
+ 0 => 'Above Sea Level',
1683
+ 1 => 'Below Sea Level',
1684
+ },
1685
+ },
1686
+ GPSAltitude => {
1687
+ Groups => { 2 => 'Location' },
1688
+ Writable => 'rational',
1689
+ RawConv => 'require Image::ExifTool::GPS; $val', # to load Composite tags and routines
1690
+ # extricate unsigned decimal number from string
1691
+ ValueConvInv => '$val=~/((?=\d|\.\d)\d*(?:\.\d*)?)/ ? $1 : undef',
1692
+ PrintConv => '$val =~ /^(inf|undef)$/ ? $val : "$val m"',
1693
+ PrintConvInv => '$val=~s/\s*m$//;$val',
1694
+ },
1695
+ GPSTimeStamp => {
1696
+ Name => 'GPSDateTime',
1697
+ Description => 'GPS Date/Time',
1698
+ Groups => { 2 => 'Time' },
1699
+ Notes => q{
1700
+ a date/time tag called GPSTimeStamp by the XMP specification. This tag is
1701
+ renamed here to prevent direct copy from EXIF:GPSTimeStamp which is a
1702
+ time-only tag. Instead, the value of this tag should be taken from
1703
+ Composite:GPSDateTime when copying from EXIF
1704
+ },
1705
+ %dateTimeInfo,
1706
+ },
1707
+ GPSSatellites => { Groups => { 2 => 'Location' } },
1708
+ GPSStatus => {
1709
+ Groups => { 2 => 'Location' },
1710
+ PrintConv => {
1711
+ A => 'Measurement Active',
1712
+ V => 'Measurement Void',
1713
+ },
1714
+ },
1715
+ GPSMeasureMode => {
1716
+ Groups => { 2 => 'Location' },
1717
+ Writable => 'integer',
1718
+ PrintConv => {
1719
+ 2 => '2-Dimensional',
1720
+ 3 => '3-Dimensional',
1721
+ },
1722
+ },
1723
+ GPSDOP => { Groups => { 2 => 'Location' }, Writable => 'rational' },
1724
+ GPSSpeedRef => {
1725
+ Groups => { 2 => 'Location' },
1726
+ PrintConv => {
1727
+ K => 'km/h',
1728
+ M => 'mph',
1729
+ N => 'knots',
1730
+ },
1731
+ },
1732
+ GPSSpeed => { Groups => { 2 => 'Location' }, Writable => 'rational' },
1733
+ GPSTrackRef => {
1734
+ Groups => { 2 => 'Location' },
1735
+ PrintConv => {
1736
+ M => 'Magnetic North',
1737
+ T => 'True North',
1738
+ },
1739
+ },
1740
+ GPSTrack => { Groups => { 2 => 'Location' }, Writable => 'rational' },
1741
+ GPSImgDirectionRef => {
1742
+ PrintConv => {
1743
+ M => 'Magnetic North',
1744
+ T => 'True North',
1745
+ },
1746
+ },
1747
+ GPSImgDirection => { Groups => { 2 => 'Location' }, Writable => 'rational' },
1748
+ GPSMapDatum => { Groups => { 2 => 'Location' } },
1749
+ GPSDestLatitude => { Groups => { 2 => 'Location' }, %latConv },
1750
+ GPSDestLongitude=> { Groups => { 2 => 'Location' }, %longConv },
1751
+ GPSDestBearingRef => {
1752
+ Groups => { 2 => 'Location' },
1753
+ PrintConv => {
1754
+ M => 'Magnetic North',
1755
+ T => 'True North',
1756
+ },
1757
+ },
1758
+ GPSDestBearing => { Groups => { 2 => 'Location' }, Writable => 'rational' },
1759
+ GPSDestDistanceRef => {
1760
+ Groups => { 2 => 'Location' },
1761
+ PrintConv => {
1762
+ K => 'Kilometers',
1763
+ M => 'Miles',
1764
+ N => 'Nautical Miles',
1765
+ },
1766
+ },
1767
+ GPSDestDistance => {
1768
+ Groups => { 2 => 'Location' },
1769
+ Writable => 'rational',
1770
+ },
1771
+ GPSProcessingMethod => { Groups => { 2 => 'Location' } },
1772
+ GPSAreaInformation => { Groups => { 2 => 'Location' } },
1773
+ GPSDifferential => {
1774
+ Groups => { 2 => 'Location' },
1775
+ Writable => 'integer',
1776
+ PrintConv => {
1777
+ 0 => 'No Correction',
1778
+ 1 => 'Differential Corrected',
1779
+ },
1780
+ },
1781
+ GPSHPositioningError => { #12
1782
+ Description => 'GPS Horizontal Positioning Error',
1783
+ Groups => { 2 => 'Location' },
1784
+ Writable => 'rational',
1785
+ PrintConv => '"$val m"',
1786
+ PrintConvInv => '$val=~s/\s*m$//; $val',
1787
+ },
1788
+ NativeDigest => { }, #PH
1789
+ );
1790
+
1791
+ # Exif extended properties (exifEX, ref 12)
1792
+ %Image::ExifTool::XMP::exifEX = (
1793
+ %xmpTableDefaults,
1794
+ GROUPS => { 1 => 'XMP-exifEX', 2 => 'Image' },
1795
+ NAMESPACE => 'exifEX',
1796
+ PRIORITY => 0, # not as reliable as actual EXIF tags
1797
+ NOTES => q{
1798
+ EXIF tags added by the EXIF 2.3 for XMP spec (see
1799
+ L<http://www.cipa.jp/english/hyoujunka/kikaku/pdf/DC-010-2012_E.pdf>).
1800
+ },
1801
+ Gamma => { Writable => 'rational' },
1802
+ PhotographicSensitivity => { Writable => 'integer' },
1803
+ SensitivityType => {
1804
+ Writable => 'integer',
1805
+ PrintConv => {
1806
+ 0 => 'Unknown',
1807
+ 1 => 'Standard Output Sensitivity',
1808
+ 2 => 'Recommended Exposure Index',
1809
+ 3 => 'ISO Speed',
1810
+ 4 => 'Standard Output Sensitivity and Recommended Exposure Index',
1811
+ 5 => 'Standard Output Sensitivity and ISO Speed',
1812
+ 6 => 'Recommended Exposure Index and ISO Speed',
1813
+ 7 => 'Standard Output Sensitivity, Recommended Exposure Index and ISO Speed',
1814
+ },
1815
+ },
1816
+ StandardOutputSensitivity => { Writable => 'integer' },
1817
+ RecommendedExposureIndex => { Writable => 'integer' },
1818
+ ISOSpeed => { Writable => 'integer' },
1819
+ ISOSpeedLatitudeyyy => {
1820
+ Description => 'ISO Speed Latitude yyy',
1821
+ Writable => 'integer',
1822
+ },
1823
+ ISOSpeedLatitudezzz => {
1824
+ Description => 'ISO Speed Latitude zzz',
1825
+ Writable => 'integer',
1826
+ },
1827
+ CameraOwnerName => { Name => 'OwnerName' },
1828
+ BodySerialNumber => { Name => 'SerialNumber' },
1829
+ LensSpecification => {
1830
+ Name => 'LensInfo',
1831
+ Writable => 'rational',
1832
+ List => 'Seq',
1833
+ RawJoin => 1, # join list into a string before ValueConv
1834
+ ValueConv => \&ConvertRationalList,
1835
+ ValueConvInv => sub {
1836
+ my $val = shift;
1837
+ my @vals = split ' ', $val;
1838
+ return $val unless @vals == 4;
1839
+ foreach (@vals) {
1840
+ $_ eq 'inf' and $_ = '1/0', next;
1841
+ $_ eq 'undef' and $_ = '0/0', next;
1842
+ Image::ExifTool::IsFloat($_) or return $val;
1843
+ my @a = Image::ExifTool::Rationalize($_);
1844
+ $_ = join '/', @a;
1845
+ }
1846
+ return \@vals; # return list reference (List-type tag)
1847
+ },
1848
+ PrintConv => \&Image::ExifTool::Exif::PrintLensInfo,
1849
+ PrintConvInv => \&Image::ExifTool::Exif::ConvertLensInfo,
1850
+ Notes => q{
1851
+ called LensSpecification by the spec. Unfortunately the EXIF 2.3 for XMP
1852
+ specification defined this new tag instead of using the existing
1853
+ XMP-aux:LensInfo
1854
+ },
1855
+ },
1856
+ LensMake => { },
1857
+ LensModel => { },
1858
+ LensSerialNumber => { },
1859
+ InteroperabilityIndex => {
1860
+ Name => 'InteropIndex',
1861
+ Description => 'Interoperability Index',
1862
+ PrintConv => {
1863
+ R98 => 'R98 - DCF basic file (sRGB)',
1864
+ R03 => 'R03 - DCF option file (Adobe RGB)',
1865
+ THM => 'THM - DCF thumbnail file',
1866
+ },
1867
+ },
1868
+ );
1869
+
1870
+ # Auxiliary namespace properties (aux) - not fully documented (ref PH)
1871
+ %Image::ExifTool::XMP::aux = (
1872
+ %xmpTableDefaults,
1873
+ GROUPS => { 1 => 'XMP-aux', 2 => 'Camera' },
1874
+ NAMESPACE => 'aux',
1875
+ NOTES => 'Photoshop Auxiliary namespace tags.',
1876
+ Firmware => { }, #7
1877
+ FlashCompensation => { Writable => 'rational' }, #7
1878
+ ImageNumber => { }, #7
1879
+ LensInfo => { #7
1880
+ Notes => '4 rational values giving focal and aperture ranges',
1881
+ # convert to floating point values (or 'inf' or 'undef')
1882
+ ValueConv => \&ConvertRationalList,
1883
+ ValueConvInv => sub {
1884
+ my $val = shift;
1885
+ my @vals = split ' ', $val;
1886
+ return $val unless @vals == 4;
1887
+ foreach (@vals) {
1888
+ $_ eq 'inf' and $_ = '1/0', next;
1889
+ $_ eq 'undef' and $_ = '0/0', next;
1890
+ Image::ExifTool::IsFloat($_) or return $val;
1891
+ my @a = Image::ExifTool::Rationalize($_);
1892
+ $_ = join '/', @a;
1893
+ }
1894
+ return join ' ', @vals; # return string (string tag)
1895
+ },
1896
+ # convert to the form "12-20mm f/3.8-4.5" or "50mm f/1.4"
1897
+ PrintConv => \&Image::ExifTool::Exif::PrintLensInfo,
1898
+ PrintConvInv => \&Image::ExifTool::Exif::ConvertLensInfo,
1899
+ },
1900
+ Lens => { },
1901
+ OwnerName => { }, #7
1902
+ SerialNumber => { },
1903
+ LensID => {
1904
+ Priority => 0,
1905
+ # prevent this from getting set from a LensID that has been converted
1906
+ ValueConvInv => q{
1907
+ warn "Expected one or more integer values" if $val =~ /[^\d ]/;
1908
+ return $val;
1909
+ },
1910
+ },
1911
+ ApproximateFocusDistance => { Writable => 'rational' }, #PH (LR3)
1912
+ );
1913
+
1914
+ # IPTC Core namespace properties (Iptc4xmpCore) (ref 4)
1915
+ %Image::ExifTool::XMP::iptcCore = (
1916
+ %xmpTableDefaults,
1917
+ GROUPS => { 1 => 'XMP-iptcCore', 2 => 'Author' },
1918
+ NAMESPACE => 'Iptc4xmpCore',
1919
+ TABLE_DESC => 'XMP IPTC Core',
1920
+ NOTES => q{
1921
+ IPTC Core namespace tags. The actual IPTC Core namespace prefix is
1922
+ "Iptc4xmpCore", which is the prefix recorded in the file, but ExifTool
1923
+ shortens this for the "XMP-iptcCore" family 1 group name. (see
1924
+ L<http://www.iptc.org/IPTC4XMP/>)
1925
+ },
1926
+ CountryCode => { Groups => { 2 => 'Location' } },
1927
+ CreatorContactInfo => {
1928
+ Struct => {
1929
+ STRUCT_NAME => 'ContactInfo',
1930
+ NAMESPACE => 'Iptc4xmpCore',
1931
+ CiAdrCity => { },
1932
+ CiAdrCtry => { },
1933
+ CiAdrExtadr => { },
1934
+ CiAdrPcode => { },
1935
+ CiAdrRegion => { },
1936
+ CiEmailWork => { },
1937
+ CiTelWork => { },
1938
+ CiUrlWork => { },
1939
+ },
1940
+ },
1941
+ CreatorContactInfoCiAdrCity => { Flat => 1, Name => 'CreatorCity' },
1942
+ CreatorContactInfoCiAdrCtry => { Flat => 1, Name => 'CreatorCountry' },
1943
+ CreatorContactInfoCiAdrExtadr => { Flat => 1, Name => 'CreatorAddress' },
1944
+ CreatorContactInfoCiAdrPcode => { Flat => 1, Name => 'CreatorPostalCode' },
1945
+ CreatorContactInfoCiAdrRegion => { Flat => 1, Name => 'CreatorRegion' },
1946
+ CreatorContactInfoCiEmailWork => { Flat => 1, Name => 'CreatorWorkEmail' },
1947
+ CreatorContactInfoCiTelWork => { Flat => 1, Name => 'CreatorWorkTelephone' },
1948
+ CreatorContactInfoCiUrlWork => { Flat => 1, Name => 'CreatorWorkURL' },
1949
+ IntellectualGenre => { Groups => { 2 => 'Other' } },
1950
+ Location => { Groups => { 2 => 'Location' } },
1951
+ Scene => { Groups => { 2 => 'Other' }, List => 'Bag' },
1952
+ SubjectCode => { Groups => { 2 => 'Other' }, List => 'Bag' },
1953
+ );
1954
+
1955
+ # IPTC Extension namespace properties (Iptc4xmpExt) (ref 4)
1956
+ %Image::ExifTool::XMP::iptcExt = (
1957
+ %xmpTableDefaults,
1958
+ GROUPS => { 1 => 'XMP-iptcExt', 2 => 'Author' },
1959
+ NAMESPACE => 'Iptc4xmpExt',
1960
+ TABLE_DESC => 'XMP IPTC Extension',
1961
+ NOTES => q{
1962
+ IPTC Extension namespace tags. The actual namespace prefix is
1963
+ "Iptc4xmpExt", but ExifTool shortens this for the "XMP-iptcExt" family 1
1964
+ group name. (see L<http://www.iptc.org/IPTC4XMP/>)
1965
+ },
1966
+ AddlModelInfo => { Name => 'AdditionalModelInformation' },
1967
+ ArtworkOrObject => {
1968
+ Struct => {
1969
+ STRUCT_NAME => 'ArtworkOrObjectDetails',
1970
+ NAMESPACE => 'Iptc4xmpExt',
1971
+ AOCopyrightNotice => { },
1972
+ AOCreator => { List => 'Seq' },
1973
+ AODateCreated=> { Groups => { 2 => 'Time' }, %dateTimeInfo },
1974
+ AOSource => { },
1975
+ AOSourceInvNo=> { },
1976
+ AOTitle => { Writable => 'lang-alt' },
1977
+ },
1978
+ List => 'Bag',
1979
+ },
1980
+ ArtworkOrObjectAOCopyrightNotice=> { Flat => 1, Name => 'ArtworkCopyrightNotice' },
1981
+ ArtworkOrObjectAOCreator => { Flat => 1, Name => 'ArtworkCreator' },
1982
+ ArtworkOrObjectAODateCreated => { Flat => 1, Name => 'ArtworkDateCreated' },
1983
+ ArtworkOrObjectAOSource => { Flat => 1, Name => 'ArtworkSource' },
1984
+ ArtworkOrObjectAOSourceInvNo => { Flat => 1, Name => 'ArtworkSourceInventoryNo' },
1985
+ ArtworkOrObjectAOTitle => { Flat => 1, Name => 'ArtworkTitle' },
1986
+ OrganisationInImageCode => { List => 'Bag' },
1987
+ CVterm => {
1988
+ Name => 'ControlledVocabularyTerm',
1989
+ List => 'Bag',
1990
+ },
1991
+ LocationShown => {
1992
+ Struct => \%sLocationDetails,
1993
+ Groups => { 2 => 'Location' },
1994
+ List => 'Bag',
1995
+ },
1996
+ ModelAge => { List => 'Bag', Writable => 'integer' },
1997
+ OrganisationInImageName => { List => 'Bag' },
1998
+ PersonInImage => { List => 'Bag' },
1999
+ DigImageGUID => { Name => 'DigitalImageGUID' },
2000
+ DigitalSourcefileType => {
2001
+ Name => 'DigitalSourceFileType',
2002
+ Notes => 'now deprecated -- replaced by DigitalSourceType',
2003
+ },
2004
+ DigitalSourceType => { Name => 'DigitalSourceType' },
2005
+ Event => { Writable => 'lang-alt' },
2006
+ RegistryId => {
2007
+ Name => 'RegistryID',
2008
+ Struct => {
2009
+ STRUCT_NAME => 'RegistryEntryDetails',
2010
+ NAMESPACE => 'Iptc4xmpExt',
2011
+ RegItemId => { },
2012
+ RegOrgId => { },
2013
+ },
2014
+ List => 'Bag',
2015
+ },
2016
+ RegistryIdRegItemId => { Flat => 1, Name => 'RegistryItemID' },
2017
+ RegistryIdRegOrgId => { Flat => 1, Name => 'RegistryOrganisationID' },
2018
+ IptcLastEdited => {
2019
+ Name => 'IPTCLastEdited',
2020
+ Groups => { 2 => 'Time' },
2021
+ %dateTimeInfo,
2022
+ },
2023
+ LocationCreated => {
2024
+ Struct => \%sLocationDetails,
2025
+ Groups => { 2 => 'Location' },
2026
+ List => 'Bag',
2027
+ },
2028
+ MaxAvailHeight => { Writable => 'integer' },
2029
+ MaxAvailWidth => { Writable => 'integer' },
2030
+ );
2031
+
2032
+ # Adobe Lightroom namespace properties (lr) (ref PH)
2033
+ %Image::ExifTool::XMP::Lightroom = (
2034
+ %xmpTableDefaults,
2035
+ GROUPS => { 1 => 'XMP-lr', 2 => 'Image' },
2036
+ NAMESPACE => 'lr',
2037
+ TABLE_DESC => 'XMP Adobe Lightroom',
2038
+ NOTES => 'Adobe Lightroom "lr" namespace tags.',
2039
+ privateRTKInfo => { },
2040
+ hierarchicalSubject => { List => 'Bag' },
2041
+ );
2042
+
2043
+ # Adobe Album namespace properties (album) (ref PH)
2044
+ %Image::ExifTool::XMP::Album = (
2045
+ %xmpTableDefaults,
2046
+ GROUPS => { 1 => 'XMP-album', 2 => 'Image' },
2047
+ NAMESPACE => 'album',
2048
+ TABLE_DESC => 'XMP Adobe Album',
2049
+ NOTES => 'Adobe Album namespace tags.',
2050
+ Notes => { },
2051
+ );
2052
+
2053
+ # table to add tags in other namespaces
2054
+ %Image::ExifTool::XMP::other = (
2055
+ GROUPS => { 2 => 'Unknown' },
2056
+ LANG_INFO => \&GetLangInfo,
2057
+ );
2058
+
2059
+ # Composite XMP tags
2060
+ %Image::ExifTool::XMP::Composite = (
2061
+ # get latitude/logitude reference from XMP lat/long tags
2062
+ # (used to set EXIF GPS position from XMP tags)
2063
+ GPSLatitudeRef => {
2064
+ Require => 'XMP:GPSLatitude',
2065
+ ValueConv => q{
2066
+ IsFloat($val[0]) and return $val[0] < 0 ? "S" : "N";
2067
+ $val[0] =~ /^.*([NS])/;
2068
+ return $1;
2069
+ },
2070
+ PrintConv => {
2071
+ N => 'North',
2072
+ S => 'South',
2073
+ },
2074
+ },
2075
+ GPSLongitudeRef => {
2076
+ Require => 'XMP:GPSLongitude',
2077
+ ValueConv => q{
2078
+ IsFloat($val[0]) and return $val[0] < 0 ? "W" : "E";
2079
+ $val[0] =~ /^.*([EW])/;
2080
+ return $1;
2081
+ },
2082
+ PrintConv => {
2083
+ E => 'East',
2084
+ W => 'West',
2085
+ },
2086
+ },
2087
+ LensID => {
2088
+ Notes => 'attempt to convert numerical XMP-aux:LensID stored by Adobe applications',
2089
+ Require => {
2090
+ 0 => 'XMP-aux:LensID',
2091
+ 1 => 'Make',
2092
+ },
2093
+ Desire => {
2094
+ 2 => 'LensInfo',
2095
+ 3 => 'FocalLength',
2096
+ 4 => 'LensModel',
2097
+ },
2098
+ Inhibit => {
2099
+ 5 => 'Composite:LensID', # don't override existing Composite:LensID
2100
+ },
2101
+ ValueConv => '$val',
2102
+ PrintConv => 'Image::ExifTool::XMP::PrintLensID($self, @val)',
2103
+ },
2104
+ Flash => {
2105
+ Notes => 'facilitates copying camera flash information between XMP and EXIF',
2106
+ Desire => {
2107
+ 0 => 'XMP:FlashFired',
2108
+ 1 => 'XMP:FlashReturn',
2109
+ 2 => 'XMP:FlashMode',
2110
+ 3 => 'XMP:FlashFunction',
2111
+ 4 => 'XMP:FlashRedEyeMode',
2112
+ 5 => 'XMP:Flash', # handle structured flash information too
2113
+ },
2114
+ Writable => 1,
2115
+ PrintHex => 1,
2116
+ SeparateTable => 'EXIF Flash',
2117
+ ValueConv => q{
2118
+ if (ref $val[5] eq 'HASH') {
2119
+ # copy structure fields into value array
2120
+ my $i = 0;
2121
+ $val[$i++] = $val[5]{$_} foreach qw(Fired Return Mode Function RedEyeMode);
2122
+ }
2123
+ return (($val[0] and lc($val[0]) eq 'true') ? 0x01 : 0) |
2124
+ (($val[1] || 0) << 1) |
2125
+ (($val[2] || 0) << 3) |
2126
+ (($val[3] and lc($val[3]) eq 'true') ? 0x20 : 0) |
2127
+ (($val[4] and lc($val[4]) eq 'true') ? 0x40 : 0);
2128
+ },
2129
+ PrintConv => \%Image::ExifTool::Exif::flash,
2130
+ WriteAlso => {
2131
+ 'XMP:FlashFired' => '$val & 0x01 ? "True" : "False"',
2132
+ 'XMP:FlashReturn' => '($val & 0x06) >> 1',
2133
+ 'XMP:FlashMode' => '($val & 0x18) >> 3',
2134
+ 'XMP:FlashFunction' => '$val & 0x20 ? "True" : "False"',
2135
+ 'XMP:FlashRedEyeMode' => '$val & 0x40 ? "True" : "False"',
2136
+ },
2137
+ },
2138
+ );
2139
+
2140
+ # add our composite tags
2141
+ Image::ExifTool::AddCompositeTags('Image::ExifTool::XMP');
2142
+
2143
+ #------------------------------------------------------------------------------
2144
+ # AutoLoad our writer routines when necessary
2145
+ #
2146
+ sub AUTOLOAD
2147
+ {
2148
+ return Image::ExifTool::DoAutoLoad($AUTOLOAD, @_);
2149
+ }
2150
+
2151
+ #------------------------------------------------------------------------------
2152
+ # Escape necessary XML characters in UTF-8 string
2153
+ # Inputs: 0) string to be escaped
2154
+ # Returns: escaped string
2155
+ my %charName = ('"'=>'quot', '&'=>'amp', "'"=>'#39', '<'=>'lt', '>'=>'gt');
2156
+ sub EscapeXML($)
2157
+ {
2158
+ my $str = shift;
2159
+ $str =~ s/([&><'"])/&$charName{$1};/sg; # escape necessary XML characters
2160
+ return $str;
2161
+ }
2162
+
2163
+ #------------------------------------------------------------------------------
2164
+ # Unescape XML character references (entities and numerical)
2165
+ # Inputs: 0) string to be unescaped
2166
+ # 1) optional hash reference to convert entity names to numbers
2167
+ # Returns: unescaped string
2168
+ my %charNum = ('quot'=>34, 'amp'=>38, 'apos'=>39, 'lt'=>60, 'gt'=>62);
2169
+ sub UnescapeXML($;$)
2170
+ {
2171
+ my ($str, $conv) = @_;
2172
+ $conv = \%charNum unless $conv;
2173
+ $str =~ s/&(#?\w+);/UnescapeChar($1,$conv)/sge;
2174
+ return $str;
2175
+ }
2176
+
2177
+ #------------------------------------------------------------------------------
2178
+ # Escape string for XML, ensuring valid XML and UTF-8
2179
+ # Inputs: 0) string
2180
+ # Returns: escaped string
2181
+ sub FullEscapeXML($)
2182
+ {
2183
+ my $str = shift;
2184
+ $str =~ s/([&><'"])/&$charName{$1};/sg; # escape necessary XML characters
2185
+ $str =~ s/\\/&#92;/sg; # escape backslashes too
2186
+ # then use C-escape sequences for invalid characters
2187
+ if ($str =~ /[\0-\x1f]/ or IsUTF8(\$str) < 0) {
2188
+ $str =~ s/([\0-\x1f\x80-\xff])/sprintf("\\x%.2x",ord $1)/sge;
2189
+ }
2190
+ return $str;
2191
+ }
2192
+
2193
+ #------------------------------------------------------------------------------
2194
+ # Unescape XML/C escaped string
2195
+ # Inputs: 0) string
2196
+ # Returns: unescaped string
2197
+ sub FullUnescapeXML($)
2198
+ {
2199
+ my $str = shift;
2200
+ # unescape C escape sequences first
2201
+ $str =~ s/\\x([\da-f]{2})/chr(hex($1))/sge;
2202
+ my $conv = \%charNum;
2203
+ $str =~ s/&(#?\w+);/UnescapeChar($1,$conv)/sge;
2204
+ return $str;
2205
+ }
2206
+
2207
+ #------------------------------------------------------------------------------
2208
+ # Convert XML character reference to UTF-8
2209
+ # Inputs: 0) XML character reference stripped of the '&' and ';' (ie. 'quot', '#34', '#x22')
2210
+ # 1) hash reference for looking up character numbers by name
2211
+ # Returns: UTF-8 equivalent (or original character on conversion error)
2212
+ sub UnescapeChar($$)
2213
+ {
2214
+ my ($ch, $conv) = @_;
2215
+ my $val = $$conv{$ch};
2216
+ unless (defined $val) {
2217
+ if ($ch =~ /^#x([0-9a-fA-F]+)$/) {
2218
+ $val = hex($1);
2219
+ } elsif ($ch =~ /^#(\d+)$/) {
2220
+ $val = $1;
2221
+ } else {
2222
+ return "&$ch;"; # should issue a warning here? [no]
2223
+ }
2224
+ }
2225
+ return chr($val) if $val < 0x80; # simple ASCII
2226
+ return pack('C0U', $val) if $] >= 5.006001;
2227
+ return Image::ExifTool::PackUTF8($val);
2228
+ }
2229
+
2230
+ #------------------------------------------------------------------------------
2231
+ # Does a string contain valid UTF-8 characters?
2232
+ # Inputs: 0) string reference
2233
+ # Returns: 0=regular ASCII, -1=invalid UTF-8, 1=valid UTF-8 with maximum 16-bit
2234
+ # wide characters, 2=valid UTF-8 requiring 32-bit wide characters
2235
+ # Notes: Changes current string position
2236
+ sub IsUTF8($)
2237
+ {
2238
+ my $strPt = shift;
2239
+ pos($$strPt) = 0; # start at beginning of string
2240
+ return 0 unless $$strPt =~ /([\x80-\xff])/g;
2241
+ my $rtnVal = 1;
2242
+ for (;;) {
2243
+ my $ch = ord($1);
2244
+ # minimum lead byte for 2-byte sequence is 0xc2 (overlong sequences
2245
+ # not allowed), 0xf8-0xfd are restricted by RFC 3629 (no 5 or 6 byte
2246
+ # sequences), and 0xfe and 0xff are not valid in UTF-8 strings
2247
+ return -1 if $ch < 0xc2 or $ch >= 0xf8;
2248
+ # determine number of bytes remaining in sequence
2249
+ my $n;
2250
+ if ($ch < 0xe0) {
2251
+ $n = 1;
2252
+ } elsif ($ch < 0xf0) {
2253
+ $n = 2;
2254
+ } else {
2255
+ $n = 3;
2256
+ # character code is greater than 0xffff if more than 2 extra bytes
2257
+ # were required in the UTF-8 character
2258
+ $rtnVal = 2;
2259
+ }
2260
+ return -1 unless $$strPt =~ /\G[\x80-\xbf]{$n}/g;
2261
+ last unless $$strPt =~ /([\x80-\xff])/g;
2262
+ }
2263
+ return $rtnVal;
2264
+ }
2265
+
2266
+ #------------------------------------------------------------------------------
2267
+ # Fix malformed UTF8 (by replacing bad bytes with '?')
2268
+ # Inputs: 0) string reference
2269
+ # Returns: true if string was fixed, and updates string
2270
+ sub FixUTF8($)
2271
+ {
2272
+ my $strPt = shift;
2273
+ my $fixed;
2274
+ pos($$strPt) = 0; # start at beginning of string
2275
+ for (;;) {
2276
+ last unless $$strPt =~ /([\x80-\xff])/g;
2277
+ my $ch = ord($1);
2278
+ my $pos = pos($$strPt);
2279
+ # (see comments in IsUTF8() above)
2280
+ if ($ch >= 0xc2 and $ch < 0xf8) {
2281
+ my $n = $ch < 0xe0 ? 1 : ($ch < 0xf0 ? 2 : 3);
2282
+ next if $$strPt =~ /\G[\x80-\xbf]{$n}/g;
2283
+ }
2284
+ # replace bad character with '?'
2285
+ substr($$strPt, $pos-1, 1) = '?';
2286
+ pos($$strPt) = $fixed = $pos;
2287
+ }
2288
+ return $fixed;
2289
+ }
2290
+
2291
+ #------------------------------------------------------------------------------
2292
+ # Utility routine to decode a base64 string
2293
+ # Inputs: 0) base64 string
2294
+ # Returns: reference to decoded data
2295
+ sub DecodeBase64($)
2296
+ {
2297
+ local($^W) = 0; # unpack('u',...) gives bogus warning in 5.00[123]
2298
+ my $str = shift;
2299
+
2300
+ # truncate at first unrecognized character (base 64 data
2301
+ # may only contain A-Z, a-z, 0-9, +, /, =, or white space)
2302
+ $str =~ s/[^A-Za-z0-9+\/= \t\n\r\f].*//s;
2303
+ # translate to uucoded and remove padding and white space
2304
+ $str =~ tr/A-Za-z0-9+\/= \t\n\r\f/ -_/d;
2305
+
2306
+ # convert the data to binary in chunks
2307
+ my $chunkSize = 60;
2308
+ my $uuLen = pack('c', 32 + $chunkSize * 3 / 4); # calculate length byte
2309
+ my $dat = '';
2310
+ my ($i, $substr);
2311
+ # loop through the whole chunks
2312
+ my $len = length($str) - $chunkSize;
2313
+ for ($i=0; $i<=$len; $i+=$chunkSize) {
2314
+ $substr = substr($str, $i, $chunkSize); # get a chunk of the data
2315
+ $dat .= unpack('u', $uuLen . $substr); # decode it
2316
+ }
2317
+ $len += $chunkSize;
2318
+ # handle last partial chunk if necessary
2319
+ if ($i < $len) {
2320
+ $uuLen = pack('c', 32 + ($len-$i) * 3 / 4); # recalculate length
2321
+ $substr = substr($str, $i, $len-$i); # get the last partial chunk
2322
+ $dat .= unpack('u', $uuLen . $substr); # decode it
2323
+ }
2324
+ return \$dat;
2325
+ }
2326
+
2327
+ #------------------------------------------------------------------------------
2328
+ # Generate a tag ID for this XMP tag
2329
+ # Inputs: 0) tag property name list ref, 1) array ref for receiving structure property list
2330
+ # 2) array for receiving namespace list
2331
+ # Returns: tagID and outtermost interesting namespace (or '' if no namespace)
2332
+ sub GetXMPTagID($;$$)
2333
+ {
2334
+ my ($props, $structProps, $nsList) = @_;
2335
+ my ($tag, $prop, $namespace);
2336
+ foreach $prop (@$props) {
2337
+ # split name into namespace and property name
2338
+ # (Note: namespace can be '' for property qualifiers)
2339
+ my ($ns, $nm) = ($prop =~ /(.*?):(.*)/) ? ($1, $2) : ('', $prop);
2340
+ if ($ignoreNamespace{$ns}) {
2341
+ # special case: don't ignore rdf numbered items
2342
+ unless ($prop =~ /^rdf:(_\d+)$/) {
2343
+ # save list index if necessary for structures
2344
+ if ($structProps and @$structProps and $prop =~ /^rdf:li (\d+)$/) {
2345
+ push @{$$structProps[-1]}, $1;
2346
+ }
2347
+ next;
2348
+ }
2349
+ $tag .= $1 if defined $tag;
2350
+ } else {
2351
+ $nm =~ s/ .*//; # remove nodeID if it exists
2352
+ # all uppercase is ugly, so convert it
2353
+ if ($nm !~ /[a-z]/) {
2354
+ my $xlatNS = $$xlatNamespace{$ns} || $ns;
2355
+ my $info = $Image::ExifTool::XMP::Main{$xlatNS};
2356
+ my $table;
2357
+ if (ref $info eq 'HASH' and $info->{SubDirectory}) {
2358
+ $table = GetTagTable($info->{SubDirectory}{TagTable});
2359
+ }
2360
+ unless ($table and $table->{$nm}) {
2361
+ $nm = lc($nm);
2362
+ $nm =~ s/_([a-z])/\u$1/g;
2363
+ }
2364
+ }
2365
+ if (defined $tag) {
2366
+ $tag .= ucfirst($nm); # add to tag name
2367
+ } else {
2368
+ $tag = $nm;
2369
+ }
2370
+ # save structure information if necessary
2371
+ if ($structProps) {
2372
+ push @$structProps, [ $nm ];
2373
+ push @$nsList, $ns if $nsList;
2374
+ }
2375
+ }
2376
+ # save namespace of first property to contribute to tag name
2377
+ $namespace = $ns unless $namespace;
2378
+ }
2379
+ if (wantarray) {
2380
+ return ($tag, $namespace || '');
2381
+ } else {
2382
+ return $tag;
2383
+ }
2384
+ }
2385
+
2386
+ #------------------------------------------------------------------------------
2387
+ # Register namespace for specified user-defined table
2388
+ # Inputs: 0) tag/structure table ref
2389
+ # Returns: namespace prefix
2390
+ sub RegisterNamespace($)
2391
+ {
2392
+ my $table = shift;
2393
+ return $$table{NAMESPACE} unless ref $$table{NAMESPACE};
2394
+ my $nsRef = $$table{NAMESPACE};
2395
+ # recognize as either a list or hash
2396
+ my $ns;
2397
+ if (ref $nsRef eq 'ARRAY') {
2398
+ $ns = $$nsRef[0];
2399
+ $nsURI{$ns} = $$nsRef[1];
2400
+ } else { # must be a hash
2401
+ my @ns = sort keys %$nsRef; # allow multiple namespace definitions
2402
+ while (@ns) {
2403
+ $ns = pop @ns;
2404
+ if ($nsURI{$ns} and $nsURI{$ns} ne $$nsRef{$ns}) {
2405
+ warn "User-defined namespace prefix '$ns' conflicts with existing namespace\n";
2406
+ }
2407
+ $nsURI{$ns} = $$nsRef{$ns};
2408
+ }
2409
+ }
2410
+ return $$table{NAMESPACE} = $ns;
2411
+ }
2412
+
2413
+ #------------------------------------------------------------------------------
2414
+ # Generate flattened tags and add to table
2415
+ # Inputs: 0) tag table ref, 1) tag ID for Struct tag (if not defined, whole table is done),
2416
+ # 2) flag to not expand sub-structures
2417
+ # Returns: number of tags added (not counting those just initialized)
2418
+ # Notes: Must have verified that $$tagTablePtr{$tagID}{Struct} exists before calling this routine
2419
+ # - makes sure that the tagInfo Struct is a HASH reference
2420
+ sub AddFlattenedTags($;$$)
2421
+ {
2422
+ local $_;
2423
+ my ($tagTablePtr, $tagID, $noSubStruct) = @_;
2424
+ my $count = 0;
2425
+ my @tagIDs;
2426
+
2427
+ if (defined $tagID) {
2428
+ push @tagIDs, $tagID;
2429
+ } else {
2430
+ foreach $tagID (TagTableKeys($tagTablePtr)) {
2431
+ my $tagInfo = $$tagTablePtr{$tagID};
2432
+ next unless ref $tagInfo eq 'HASH' and $$tagInfo{Struct};
2433
+ push @tagIDs, $tagID;
2434
+ }
2435
+ }
2436
+
2437
+ # loop through specified tags
2438
+ foreach $tagID (@tagIDs) {
2439
+
2440
+ my $tagInfo = $$tagTablePtr{$tagID};
2441
+
2442
+ $$tagInfo{Flattened} and next; # only generate flattened tags once
2443
+ $$tagInfo{Flattened} = 1;
2444
+
2445
+ my $strTable = $$tagInfo{Struct};
2446
+ unless (ref $strTable) { # (allow a structure name for backward compatibility only)
2447
+ my $strName = $strTable;
2448
+ $strTable = $Image::ExifTool::UserDefined::xmpStruct{$strTable} or next;
2449
+ $$strTable{STRUCT_NAME} or $$strTable{STRUCT_NAME} = "XMP $strName";
2450
+ $$tagInfo{Struct} = $strTable; # replace old-style name with HASH ref
2451
+ delete $$tagInfo{SubDirectory}; # deprecated use of SubDirectory in Struct tags
2452
+ }
2453
+ # do not add flattened tags to variable-namespace structures
2454
+ next if exists $$strTable{NAMESPACE} and not defined $$strTable{NAMESPACE};
2455
+
2456
+ # get prefix for flattened tag names
2457
+ my $flat = (defined $$tagInfo{FlatName} ? $$tagInfo{FlatName} : $$tagInfo{Name});
2458
+
2459
+ # get family 2 group name for this structure tag
2460
+ my ($tagG2, $field);
2461
+ $tagG2 = $$tagInfo{Groups}{2} if $$tagInfo{Groups};
2462
+ $tagG2 or $tagG2 = $$tagTablePtr{GROUPS}{2};
2463
+
2464
+ foreach $field (keys %$strTable) {
2465
+ next if $specialStruct{$field};
2466
+ my $fieldInfo = $$strTable{$field};
2467
+ next if $$fieldInfo{LangCode}; # don't flatten lang-alt tags
2468
+ next if $$fieldInfo{Struct} and $noSubStruct; # don't expand sub-structures if specified
2469
+ # build a tag ID for the corresponding flattened tag
2470
+ my $fieldName = ucfirst($field);
2471
+ my $flatField = $$fieldInfo{FlatName} || $fieldName;
2472
+ my $flatID = $tagID . $fieldName;
2473
+ my $flatInfo = $$tagTablePtr{$flatID};
2474
+ if ($flatInfo) {
2475
+ ref $flatInfo eq 'HASH' or warn("$flatInfo is not a HASH!\n"), next; # (to be safe)
2476
+ # pre-defined flattened tags should have Flat flag set
2477
+ if (not defined $$flatInfo{Flat} and $Image::ExifTool::debug) {
2478
+ warn "Missing Flat flag for $$flatInfo{Name}\n";
2479
+ }
2480
+ $$flatInfo{Flat} = 0;
2481
+ # copy all missing entries from field information
2482
+ foreach (keys %$fieldInfo) {
2483
+ # must not copy PropertyPath (but can't delete it afterwards
2484
+ # because the flat tag may already have this set)
2485
+ next if $_ eq 'PropertyPath';
2486
+ $$flatInfo{$_} = $$fieldInfo{$_} unless defined $$flatInfo{$_};
2487
+ }
2488
+ # NOTE: Do NOT delete Groups because we need them if GotGroups was done
2489
+ # --> just override group 2 later according to field group
2490
+ # re-generate List flag unless it is set to 0
2491
+ delete $$flatInfo{List} if $$flatInfo{List};
2492
+ } else {
2493
+ # generate new flattened tag information based on structure field
2494
+ my $flatName = $flat . $flatField;
2495
+ $flatInfo = { %$fieldInfo, Name => $flatName, Flat => 0 };
2496
+ # add new flattened tag to table
2497
+ AddTagToTable($tagTablePtr, $flatID, $flatInfo);
2498
+ ++$count;
2499
+ }
2500
+ # propagate List flag (unless set to 0 in pre-defined flattened tag)
2501
+ unless (defined $$flatInfo{List}) {
2502
+ $$flatInfo{List} = $$fieldInfo{List} || 1 if $$fieldInfo{List} or $$tagInfo{List};
2503
+ }
2504
+ # set group 2 name from the first existing family 2 group in the:
2505
+ # 1) structure field Groups, 2) structure table GROUPS, 3) structure tag Groups
2506
+ if ($$fieldInfo{Groups} and $$fieldInfo{Groups}{2}) {
2507
+ $$flatInfo{Groups}{2} = $$fieldInfo{Groups}{2};
2508
+ } elsif ($$strTable{GROUPS} and $$strTable{GROUPS}{2}) {
2509
+ $$flatInfo{Groups}{2} = $$strTable{GROUPS}{2};
2510
+ } else {
2511
+ $$flatInfo{Groups}{2} = $tagG2;
2512
+ }
2513
+ # save reference to top-level structure
2514
+ $$flatInfo{RootTagInfo} = $$tagInfo{RootTagInfo} || $tagInfo;
2515
+ # recursively generate flattened tags for sub-structures
2516
+ next unless $$flatInfo{Struct};
2517
+ length($flatID) > 250 and warn("Possible deep recursion for tag $flatID\n"), last;
2518
+ # reset flattened tag just in case we flattened hierarchy in the wrong order
2519
+ # because we must start from the outtermost structure to get the List flags right
2520
+ # (this should only happen when building tag tables)
2521
+ delete $$flatInfo{Flattened};
2522
+ $count += AddFlattenedTags($tagTablePtr, $flatID, $$flatInfo{NoSubStruct});
2523
+ }
2524
+ }
2525
+ return $count;
2526
+ }
2527
+
2528
+ #------------------------------------------------------------------------------
2529
+ # Get localized version of tagInfo hash
2530
+ # Inputs: 0) tagInfo hash ref, 1) language code (ie. "x-default")
2531
+ # Returns: new tagInfo hash ref, or undef if invalid
2532
+ sub GetLangInfo($$)
2533
+ {
2534
+ my ($tagInfo, $langCode) = @_;
2535
+ # only allow alternate language tags in lang-alt lists
2536
+ return undef unless $$tagInfo{Writable} and $$tagInfo{Writable} eq 'lang-alt';
2537
+ $langCode =~ tr/_/-/; # RFC 3066 specifies '-' as a separator
2538
+ my $langInfo = Image::ExifTool::GetLangInfo($tagInfo, $langCode);
2539
+ # save reference to source tagInfo hash in case we need to set the PropertyPath later
2540
+ $$langInfo{SrcTagInfo} = $tagInfo;
2541
+ return $langInfo;
2542
+ }
2543
+
2544
+ #------------------------------------------------------------------------------
2545
+ # Get standard case for language code
2546
+ # Inputs: 0) Language code
2547
+ # Returns: Language code in standard case
2548
+ sub StandardLangCase($)
2549
+ {
2550
+ my $lang = shift;
2551
+ # make 2nd subtag uppercase only if it is 2 letters
2552
+ return lc($1) . uc($2) . lc($3) if $lang =~ /^([a-z]{2,3}|[xi])(-[a-z]{2})\b(.*)/i;
2553
+ return lc($lang);
2554
+ }
2555
+
2556
+ #------------------------------------------------------------------------------
2557
+ # Scan for XMP in a file
2558
+ # Inputs: 0) ExifTool object ref, 1) RAF reference
2559
+ # Returns: 1 if xmp was found, 0 otherwise
2560
+ # Notes: Currently only recognizes UTF8-encoded XMP
2561
+ sub ScanForXMP($$)
2562
+ {
2563
+ my ($exifTool, $raf) = @_;
2564
+ my ($buff, $xmp);
2565
+ my $lastBuff = '';
2566
+
2567
+ $exifTool->VPrint(0,"Scanning for XMP\n");
2568
+ for (;;) {
2569
+ defined $buff or $raf->Read($buff, 65536) or return 0;
2570
+ unless (defined $xmp) {
2571
+ $lastBuff .= $buff;
2572
+ unless ($lastBuff =~ /(<\?xpacket begin=)/g) {
2573
+ # must keep last 15 bytes to match 16-byte "xpacket begin" string
2574
+ $lastBuff = length($buff) <= 15 ? $buff : substr($buff, -15);
2575
+ undef $buff;
2576
+ next;
2577
+ }
2578
+ $xmp = $1;
2579
+ $buff = substr($lastBuff, pos($lastBuff));
2580
+ }
2581
+ my $pos = length($xmp) - 18; # (18 = length("<?xpacket end...") - 1)
2582
+ $xmp .= $buff; # add new data to our XMP
2583
+ pos($xmp) = $pos if $pos > 0; # set start for "xpacket end" scan
2584
+ if ($xmp =~ /<\?xpacket end=['"][wr]['"]\?>/g) {
2585
+ $buff = substr($xmp, pos($xmp)); # save data after end of XMP
2586
+ $xmp = substr($xmp, 0, pos($xmp)); # isolate XMP
2587
+ # check XMP for validity (not valid if it contains null bytes)
2588
+ $pos = rindex($xmp, "\0") + 1 or last;
2589
+ $lastBuff = substr($xmp, $pos); # re-parse beginning after last null byte
2590
+ undef $xmp;
2591
+ } else {
2592
+ undef $buff;
2593
+ }
2594
+ }
2595
+ unless ($exifTool->{VALUE}{FileType}) {
2596
+ $exifTool->{FILE_TYPE} = $exifTool->{FILE_EXT};
2597
+ $exifTool->SetFileType('<unknown file containing XMP>');
2598
+ }
2599
+ my %dirInfo = (
2600
+ DataPt => \$xmp,
2601
+ DirLen => length $xmp,
2602
+ DataLen => length $xmp,
2603
+ );
2604
+ ProcessXMP($exifTool, \%dirInfo);
2605
+ return 1;
2606
+ }
2607
+
2608
+ #------------------------------------------------------------------------------
2609
+ # Print conversion for XMP-aux:LensID
2610
+ # Inputs: 0) ExifTool ref, 1) LensID, 2) Make, 3) LensInfo, 4) FocalLength, 5) LensModel
2611
+ # (yes, this is ugly -- blame Adobe)
2612
+ sub PrintLensID(@)
2613
+ {
2614
+ local $_;
2615
+ my ($exifTool, $id, $make, $info, $focalLength, $lensModel) = @_;
2616
+ my ($mk, $printConv);
2617
+ # missing: Olympus (no XMP:LensID written by Adobe)
2618
+ foreach $mk (qw(Canon Nikon Pentax Sony Sigma Samsung Leica)) {
2619
+ next unless $make =~ /$mk/i;
2620
+ # get name of module containing the lens lookup (default "Make.pm")
2621
+ my $mod = { Sigma => 'SigmaRaw', Leica => 'Panasonic' }->{$mk} || $mk;
2622
+ require "Image/ExifTool/$mod.pm";
2623
+ # get the name of the lens name lookup (default "makeLensTypes")
2624
+ # (canonLensTypes, pentaxLensTypes, nikonLensIDs, etc)
2625
+ my $convName = "Image::ExifTool::${mod}::" .
2626
+ ({ Nikon => 'nikonLensIDs' }->{$mk} || lc($mk) . 'LensTypes');
2627
+ no strict 'refs';
2628
+ %$convName or last;
2629
+ my $printConv = \%$convName;
2630
+ use strict 'refs';
2631
+ my ($minf, $maxf, $maxa, $mina);
2632
+ if ($info) {
2633
+ my @a = split ' ', $info;
2634
+ $_ eq 'undef' and $_ = undef foreach @a;
2635
+ ($minf, $maxf, $maxa, $mina) = @a;
2636
+ }
2637
+ if ($mk eq 'Pentax' and $id =~ /^\d+$/) {
2638
+ # for Pentax, CS4 stores an int16u, but we use 2 x int8u
2639
+ $id = join(' ', unpack('C*', pack('n', $id)));
2640
+ }
2641
+ my $str = $$printConv{$id} || "Unknown ($id)";
2642
+ # Nikon is a special case because Adobe doesn't store the full LensID
2643
+ if ($mk eq 'Nikon') {
2644
+ my $hex = sprintf("%.2X", $id);
2645
+ my %newConv;
2646
+ my $i = 0;
2647
+ foreach (grep /^$hex /, keys %$printConv) {
2648
+ $newConv{$i ? "$id.$i" : $id} = $$printConv{$_};
2649
+ ++$i;
2650
+ }
2651
+ $printConv = \%newConv;
2652
+ }
2653
+ return Image::ExifTool::Exif::PrintLensID($exifTool, $str, $printConv,
2654
+ undef, $id, $focalLength, $maxa, undef, $minf, $maxf, $lensModel);
2655
+ }
2656
+ return "Unknown ($id)";
2657
+ }
2658
+
2659
+ #------------------------------------------------------------------------------
2660
+ # Convert XMP date/time to EXIF format
2661
+ # Inputs: 0) XMP date/time string, 1) set if we aren't sure this is a date
2662
+ # Returns: EXIF date/time
2663
+ sub ConvertXMPDate($;$)
2664
+ {
2665
+ my ($val, $unsure) = @_;
2666
+ if ($val =~ /^(\d{4})-(\d{2})-(\d{2})[T ](\d{2}:\d{2})(:\d{2})?\s*(\S*)$/) {
2667
+ my $s = $5 || ''; # seconds may be missing
2668
+ $val = "$1:$2:$3 $4$s$6"; # convert back to EXIF time format
2669
+ } elsif (not $unsure and $val =~ /^(\d{4})(-\d{2}){0,2}/) {
2670
+ $val =~ tr/-/:/;
2671
+ }
2672
+ return $val;
2673
+ }
2674
+
2675
+ #------------------------------------------------------------------------------
2676
+ # Convert rational string value
2677
+ # Inputs: 0) string (converted to number, 'inf' or 'undef' on return if rational)
2678
+ # Returns: true if value was converted
2679
+ sub ConvertRational($)
2680
+ {
2681
+ my $val = $_[0];
2682
+ $val =~ m{^(-?\d+)/(-?\d+)$} or return undef;
2683
+ if ($2 != 0) {
2684
+ $_[0] = $1 / $2; # calculate quotient
2685
+ } elsif ($1) {
2686
+ $_[0] = 'inf';
2687
+ } else {
2688
+ $_[0] = 'undef';
2689
+ }
2690
+ return 1;
2691
+ }
2692
+
2693
+ #------------------------------------------------------------------------------
2694
+ # Convert a string of floating point values to rationals
2695
+ # Inputs: 0) string of floating point numbers separated by spaces
2696
+ # Returns: string of rational numbers separated by spaces
2697
+ sub ConvertRationalList($)
2698
+ {
2699
+ my $val = shift;
2700
+ my @vals = split ' ', $val;
2701
+ return $val unless @vals == 4;
2702
+ foreach (@vals) {
2703
+ ConvertRational($_) or return $val;
2704
+ }
2705
+ return join ' ', @vals;
2706
+ }
2707
+
2708
+ #------------------------------------------------------------------------------
2709
+ # We found an XMP property name/value
2710
+ # Inputs: 0) ExifTool object ref, 1) Pointer to tag table
2711
+ # 2) reference to array of XMP property names (last is current property)
2712
+ # 3) property value, 4) attribute hash ref (for 'xml:lang' or 'rdf:datatype')
2713
+ # Returns: 1 if valid tag was found
2714
+ sub FoundXMP($$$$;$)
2715
+ {
2716
+ local $_;
2717
+ my ($exifTool, $tagTablePtr, $props, $val, $attrs) = @_;
2718
+ my ($lang, @structProps, $rawVal, $rational);
2719
+ my ($tag, $ns) = GetXMPTagID($props, $exifTool->{OPTIONS}{Struct} ? \@structProps : undef);
2720
+ return 0 unless $tag; # ignore things that aren't valid tags
2721
+
2722
+ # translate namespace if necessary
2723
+ $ns = $$xlatNamespace{$ns} if $$xlatNamespace{$ns};
2724
+ my $info = $tagTablePtr->{$ns};
2725
+ my ($table, $added, $xns, $tagID);
2726
+ if ($info) {
2727
+ $table = $info->{SubDirectory}{TagTable} or warn "Missing TagTable for $tag!\n";
2728
+ } elsif ($$props[0] eq 'svg:svg') {
2729
+ if (not $ns) {
2730
+ # disambiguate MetadataID by adding back the 'metadata' we ignored
2731
+ $tag = 'metadataId' if $tag eq 'id' and $$props[1] eq 'svg:metadata';
2732
+ # use SVG namespace in SVG files if nothing better to use
2733
+ $table = 'Image::ExifTool::XMP::SVG';
2734
+ } elsif (not grep /^rdf:/, @$props) {
2735
+ # only other SVG information if not inside RDF (call it XMP if in RDF)
2736
+ $table = 'Image::ExifTool::XMP::otherSVG';
2737
+ }
2738
+ }
2739
+
2740
+ # look up this tag in the appropriate table
2741
+ $table or $table = 'Image::ExifTool::XMP::other';
2742
+ $tagTablePtr = GetTagTable($table);
2743
+ if ($$tagTablePtr{NAMESPACE}) {
2744
+ $tagID = $tag;
2745
+ } else {
2746
+ # add XMP namespace prefix to avoid collisions in variable-namespace tables
2747
+ $xns = $xmpNS{$ns} || $ns;
2748
+ $tagID = "$xns:$tag";
2749
+ # add namespace to top-level structure property
2750
+ $structProps[0][0] = "$xns:" . $structProps[0][0] if @structProps;
2751
+ }
2752
+ my $tagInfo = $exifTool->GetTagInfo($tagTablePtr, $tagID);
2753
+
2754
+ $lang = $$attrs{'xml:lang'} if $attrs;
2755
+
2756
+ # must add a new tag table entry if this tag isn't pre-defined
2757
+ # (or initialize from structure field if this is a pre-defined flattened tag)
2758
+ NoLoop:
2759
+ while (not $tagInfo or $$tagInfo{Flat}) {
2760
+ my (@tagList, @nsList);
2761
+ GetXMPTagID($props, \@tagList, \@nsList);
2762
+ my ($ta, $t, $ti, $addedFlat, $i, $j);
2763
+ # build tag ID strings for each level in the property path
2764
+ foreach $ta (@tagList) {
2765
+ # insert tag ID in index 1 of tagList list
2766
+ $t = $$ta[1] = $t ? $t . ucfirst($$ta[0]) : $$ta[0];
2767
+ # generate flattened tags for top-level structure if necessary
2768
+ next if defined $addedFlat;
2769
+ $ti = $$tagTablePtr{$t} or next;
2770
+ next unless ref $ti eq 'HASH' and $$ti{Struct};
2771
+ $addedFlat = AddFlattenedTags($tagTablePtr, $t);
2772
+ if ($tagInfo) {
2773
+ # all done if we just wanted to initialize the flattened tag
2774
+ if ($$tagInfo{Flat}) {
2775
+ warn "Orphan tagInfo with Flat flag set: $$tagInfo{Name}\n";
2776
+ delete $$tagInfo{Flat};
2777
+ }
2778
+ last NoLoop;
2779
+ }
2780
+ # all done if we generated the tag we are looking for
2781
+ $tagInfo = $$tagTablePtr{$tagID} and last NoLoop if $addedFlat;
2782
+ }
2783
+ my $name = ucfirst($tag);
2784
+
2785
+ # search for the innermost containing structure
2786
+ # (in case tag is an unknown field in a known structure)
2787
+ # (only necessary if we found a structure above)
2788
+ if (defined $addedFlat) {
2789
+ my $t2 = '';
2790
+ for ($i=$#tagList-1; $i>=0; --$i) {
2791
+ $t = $tagList[$i][1];
2792
+ $t2 = $tagList[$i+1][0] . ucfirst($t2); # build relative tag id
2793
+ $ti = $$tagTablePtr{$t} or next;
2794
+ next unless ref $ti eq 'HASH';
2795
+ my $strTable = $$ti{Struct} or next;
2796
+ my $flat = (defined $$ti{FlatName} ? $$ti{FlatName} : $$ti{Name});
2797
+ $name = $flat . ucfirst($t2);
2798
+ # don't continue if structure is known but field is not
2799
+ last if $$strTable{NAMESPACE} or not exists $$strTable{NAMESPACE};
2800
+ # this is a variable-namespace structure, so we must:
2801
+ # 1) get tagInfo from corresponding top-level XMP tag if it exists
2802
+ # 2) add new entry in this tag table, but with namespace prefix on tag ID
2803
+ my $n = $nsList[$i+1]; # namespace of structure field
2804
+ # translate to standard ExifTool namespace
2805
+ $n = $$xlatNamespace{$n} if $$xlatNamespace{$n};
2806
+ my $xn = $xmpNS{$n} || $n; # standard XMP namespace
2807
+ # no need to continue with variable-namespace logic if
2808
+ # we are in our own namespace (right?)
2809
+ last if $xn eq ($$tagTablePtr{NAMESPACE} || '');
2810
+ $tagID = "$xn:$tag"; # add namespace to avoid collisions
2811
+ # change structure properties to add the standard XMP namespace
2812
+ # prefix for this field (needed for variable-namespace fields)
2813
+ if (@structProps) {
2814
+ $structProps[$i+1][0] = "$xn:" . $structProps[$i+1][0];
2815
+ }
2816
+ # copy tagInfo entries from the existing top-level XMP tag
2817
+ my $tg = $Image::ExifTool::XMP::Main{$n};
2818
+ last unless ref $tg eq 'HASH' and $$tg{SubDirectory};
2819
+ my $tbl = GetTagTable($$tg{SubDirectory}{TagTable}) or last;
2820
+ my $sti = $exifTool->GetTagInfo($tbl, $t2);
2821
+ if (not $sti or $$sti{Flat}) {
2822
+ # again, we must initialize flattened tags if necessary
2823
+ # (but don't bother to recursively apply full logic to
2824
+ # allow nested variable-namespace strucures until someone
2825
+ # actually wants to do such a silly thing)
2826
+ my $t3 = '';
2827
+ for ($j=$i+1; $j<@tagList; ++$j) {
2828
+ $t3 = $tagList[$j][0] . ucfirst($t3);
2829
+ my $ti3 = $$tbl{$t3} or next;
2830
+ next unless ref $ti3 eq 'HASH' and $$ti3{Struct};
2831
+ last unless AddFlattenedTags($tbl, $t3);
2832
+ $sti = $$tbl{$t2};
2833
+ last;
2834
+ }
2835
+ last unless $sti;
2836
+ }
2837
+ $tagInfo = {
2838
+ %$sti,
2839
+ Name => $flat . $$sti{Name},
2840
+ WasAdded => 1,
2841
+ };
2842
+ # be careful not to copy elements we shouldn't...
2843
+ delete $$tagInfo{Description}; # Description will be different
2844
+ # can't copy group hash because group 1 will be different and
2845
+ # we need to check this when writing tag to a specific group
2846
+ delete $$tagInfo{Groups};
2847
+ $$tagInfo{Groups}{2} = $$sti{Groups}{2} if $$sti{Groups};
2848
+ last;
2849
+ }
2850
+ }
2851
+ $tagInfo or $tagInfo = { Name => $name, WasAdded => 1 };
2852
+
2853
+ # add tag Namespace entry for tags in variable-namespace tables
2854
+ $$tagInfo{Namespace} = $xns if $xns;
2855
+ if ($curNS{$ns} and $curNS{$ns} =~ m{^http://ns.exiftool.ca/(.*?)/(.*?)/}) {
2856
+ my %grps = ( 0 => $1, 1 => $2 );
2857
+ # apply a little magic to recover original group names
2858
+ # from this exiftool-written RDF/XML file
2859
+ if ($grps{1} =~ /^\d/) {
2860
+ # URI's with only family 0 are internal tags from the source file,
2861
+ # so change the group name to avoid confusion with tags from this file
2862
+ $grps{1} = "XML-$grps{0}";
2863
+ $grps{0} = 'XML';
2864
+ }
2865
+ $$tagInfo{Groups} = \%grps;
2866
+ # flag to avoid setting group 1 later
2867
+ $$tagInfo{StaticGroup1} = 1;
2868
+ }
2869
+ # construct tag information for this unknown tag
2870
+ # -> make this a List or lang-alt tag if necessary
2871
+ if (@$props > 2 and $$props[-1] =~ /^rdf:li \d+$/ and
2872
+ $$props[-2] =~ /^rdf:(Bag|Seq|Alt)$/)
2873
+ {
2874
+ if ($lang and $1 eq 'Alt') {
2875
+ $$tagInfo{Writable} = 'lang-alt';
2876
+ } else {
2877
+ $$tagInfo{List} = $1;
2878
+ }
2879
+ # tried this, but maybe not a good idea for complex structures:
2880
+ #} elsif (grep / /, @$props) {
2881
+ # $$tagInfo{List} = 1;
2882
+ }
2883
+ AddTagToTable($tagTablePtr, $tagID, $tagInfo);
2884
+ $added = 1;
2885
+ last;
2886
+ }
2887
+ # decode value if necessary (et:encoding was used before exiftool 7.71)
2888
+ if ($attrs) {
2889
+ my $enc = $$attrs{'rdf:datatype'} || $$attrs{'et:encoding'};
2890
+ if ($enc and $enc =~ /base64/) {
2891
+ $val = DecodeBase64($val); # (now a value ref)
2892
+ $val = $$val unless length $$val > 100 or $$val =~ /[\0-\x08\x0b\0x0c\x0e-\x1f]/;
2893
+ }
2894
+ }
2895
+ if (defined $lang and lc($lang) ne 'x-default') {
2896
+ $lang = StandardLangCase($lang);
2897
+ my $langInfo = GetLangInfo($tagInfo, $lang);
2898
+ $tagInfo = $langInfo if $langInfo;
2899
+ }
2900
+ # un-escape XML character entities (handling CDATA)
2901
+ pos($val) = 0;
2902
+ if ($val =~ /<!\[CDATA\[(.*?)\]\]>/sg) {
2903
+ my $p = pos $val;
2904
+ # unescape everything up to the start of the CDATA section
2905
+ # (the length of "<[[CDATA[]]>" is 12 characters)
2906
+ my $v = UnescapeXML(substr($val, 0, $p - length($1) - 12)) . $1;
2907
+ while ($val =~ /<!\[CDATA\[(.*?)\]\]>/sg) {
2908
+ my $p1 = pos $val;
2909
+ $v .= UnescapeXML(substr($val, $p, $p1 - length($1) - 12)) . $1;
2910
+ $p = $p1;
2911
+ }
2912
+ $val = $v . UnescapeXML(substr($val, $p));
2913
+ } else {
2914
+ $val = UnescapeXML($val);
2915
+ }
2916
+ # decode from UTF8
2917
+ $val = $exifTool->Decode($val, 'UTF8');
2918
+ # convert rational and date values to a more sensible format
2919
+ my $fmt = $$tagInfo{Writable};
2920
+ my $new = $$tagInfo{WasAdded} && $$exifTool{OPTIONS}{XMPAutoConv};
2921
+ if ($fmt or $new) {
2922
+ $rawVal = $val; # save raw value for verbose output
2923
+ if (($new or $fmt eq 'rational') and ConvertRational($val)) {
2924
+ $rational = $rawVal;
2925
+ } else {
2926
+ $val = ConvertXMPDate($val, $new) if $new or $fmt eq 'date';
2927
+ }
2928
+ # protect against large binary data in unknown tags
2929
+ $$tagInfo{Binary} = 1 if $new and length($val) > 65536;
2930
+ }
2931
+ # store the value for this tag
2932
+ my $key = $exifTool->FoundTag($tagInfo, $val) or return 0;
2933
+ # save original components of rational numbers (used when copying)
2934
+ $$exifTool{RATIONAL}{$key} = $rational if defined $rational;
2935
+ # save structure/list information if necessary
2936
+ if (@structProps and (@structProps > 1 or defined $structProps[0][1])) {
2937
+ $exifTool->{TAG_EXTRA}{$key}{Struct} = \@structProps;
2938
+ $exifTool->{IsStruct} = 1;
2939
+ }
2940
+ if ($ns and not $$tagInfo{StaticGroup1}) {
2941
+ # set group1 dynamically according to the namespace
2942
+ $exifTool->SetGroup($key, "$tagTablePtr->{GROUPS}{0}-$ns");
2943
+ }
2944
+ if ($exifTool->{OPTIONS}{Verbose}) {
2945
+ if ($added) {
2946
+ my $g1 = $exifTool->GetGroup($key, 1);
2947
+ $exifTool->VPrint(0, $exifTool->{INDENT}, "[adding $g1:$tag]\n");
2948
+ }
2949
+ my $tagID = join('/',@$props);
2950
+ $exifTool->VerboseInfo($tagID, $tagInfo, Value => $rawVal || $val);
2951
+ }
2952
+ return 1;
2953
+ }
2954
+
2955
+ #------------------------------------------------------------------------------
2956
+ # Recursively parse nested XMP data element
2957
+ # Inputs: 0) ExifTool ref, 1) tag table ref, 2) XMP data ref
2958
+ # 3) offset to start of XMP element, 4) offset to end of XMP element
2959
+ # 5) reference to array of enclosing XMP property names (undef if none)
2960
+ # 6) reference to blank node information hash
2961
+ # Returns: Number of contained XMP elements
2962
+ sub ParseXMPElement($$$;$$$$)
2963
+ {
2964
+ my ($exifTool, $tagTablePtr, $dataPt, $start, $end, $propListPt, $blankInfo) = @_;
2965
+ my ($count, $nItems) = (0, 0);
2966
+ my $isWriting = $exifTool->{XMP_CAPTURE};
2967
+ my $isSVG = $$exifTool{XMP_IS_SVG};
2968
+
2969
+ # get our parse procs
2970
+ my ($attrProc, $foundProc);
2971
+ if ($$exifTool{XMPParseOpts}) {
2972
+ $attrProc = $$exifTool{XMPParseOpts}{AttrProc};
2973
+ $foundProc = $$exifTool{XMPParseOpts}{FoundProc} || \&FoundXMP;
2974
+ } else {
2975
+ $foundProc = \&FoundXMP;
2976
+ }
2977
+ $start or $start = 0;
2978
+ $end or $end = length $$dataPt;
2979
+ $propListPt or $propListPt = [ ];
2980
+
2981
+ my $processBlankInfo;
2982
+ # create empty blank node information hash if necessary
2983
+ $blankInfo or $blankInfo = $processBlankInfo = { Prop => { } };
2984
+ # keep track of current nodeID at this nesting level
2985
+ my $oldNodeID = $$blankInfo{NodeID};
2986
+ pos($$dataPt) = $start;
2987
+
2988
+ Element: for (;;) {
2989
+ # all done if there isn't enough data for another element
2990
+ # (the smallest possible element is 4 bytes, ie. "<a/>")
2991
+ last if pos($$dataPt) > $end - 4;
2992
+ # reset nodeID before processing each element
2993
+ my $nodeID = $$blankInfo{NodeID} = $oldNodeID;
2994
+ # get next element
2995
+ last if $$dataPt !~ m{<([?/]?)([-\w:.\x80-\xff]+)([^>]*)>}sg or pos($$dataPt) > $end;
2996
+ # (the only reason we match '<[?/]' is to keep from scanning past the
2997
+ # "<?xpacket end..." terminator or other closing token, so
2998
+ next if $1;
2999
+ my ($prop, $attrs) = ($2, $3);
3000
+ my $valStart = pos($$dataPt);
3001
+ my $valEnd;
3002
+ # only look for closing token if this is not an empty element
3003
+ # (empty elements end with '/', ie. <a:b/>)
3004
+ if ($attrs !~ s/\/$//) {
3005
+ my $nesting = 1;
3006
+ my $tok;
3007
+ for (;;) {
3008
+ # this match fails with perl 5.6.2 (perl bug!), but it works without
3009
+ # the '(.*?)', so we must do it differently...
3010
+ # $$dataPt =~ m/(.*?)<\/$prop>/sg or last Element;
3011
+ # my $val2 = $1;
3012
+ # find next matching closing token, or the next opening token
3013
+ # of a nested same-named element
3014
+ if ($$dataPt !~ m{<(/?)$prop([-\w:.\x80-\xff]*)(.*?(/?))>}sg or
3015
+ pos($$dataPt) > $end)
3016
+ {
3017
+ $exifTool->Warn("XMP format error (no closing tag for $prop)");
3018
+ last Element;
3019
+ }
3020
+ next if $2; # ignore opening properties with different names
3021
+ if ($1) {
3022
+ next if --$nesting;
3023
+ $valEnd = pos($$dataPt) - length($prop) - length($3) - 3;
3024
+ last; # this element is complete
3025
+ }
3026
+ # this is a nested opening token (or empty element)
3027
+ ++$nesting unless $4;
3028
+ }
3029
+ } else {
3030
+ $valEnd = $valStart;
3031
+ }
3032
+ $start = pos($$dataPt); # start from here the next time around
3033
+ my $parseResource;
3034
+ if ($prop eq 'rdf:li') {
3035
+ # add index to list items so we can keep them in order
3036
+ # (this also enables us to keep structure elements grouped properly
3037
+ # for lists of structures, like JobRef)
3038
+ # Note: the list index is prefixed by the number of digits so sorting
3039
+ # alphabetically gives the correct order while still allowing a flexible
3040
+ # number of digits -- this scheme allows up to 9 digits in the index,
3041
+ # with index numbers ranging from 0 to 999999999. The sequence is:
3042
+ # 10,11,12-19,210,211-299,3100,3101-3999,41000...9999999999.
3043
+ $prop .= ' ' . length($nItems) . $nItems;
3044
+ # reset LIST_TAGS at the start of the outtermost list
3045
+ # (avoids accumulating incorrectly-written elements in a correctly-written list)
3046
+ if (not $nItems and not grep /^rdf:li /, @$propListPt) {
3047
+ $$exifTool{LIST_TAGS} = { };
3048
+ }
3049
+ ++$nItems;
3050
+ } elsif ($prop eq 'rdf:Description') {
3051
+ # remove unnecessary rdf:Description elements since parseType='Resource'
3052
+ # is more efficient (also necessary to make property path consistent)
3053
+ $parseResource = 1 if grep /^rdf:Description$/, @$propListPt;
3054
+ } elsif ($prop eq 'xmp:xmpmeta') {
3055
+ # patch MicrosoftPhoto unconformity
3056
+ $prop = 'x:xmpmeta';
3057
+ }
3058
+
3059
+ # extract property attributes
3060
+ my (%attrs, @attrs, $val);
3061
+ while ($attrs =~ m/(\S+?)\s*=\s*(['"])(.*?)\2/sg) {
3062
+ push @attrs, $1; # preserve order
3063
+ $attrs{$1} = $3;
3064
+ }
3065
+
3066
+ # hook for special parsing of attributes
3067
+ if ($attrProc) {
3068
+ $val = substr($$dataPt, $valStart, $valEnd - $valStart);
3069
+ if (&$attrProc(\@attrs, \%attrs, \$prop, \$val)) {
3070
+ # the value was changed, so reset $valStart/$valEnd to use $val instead
3071
+ $valStart = $valEnd;
3072
+ }
3073
+ }
3074
+
3075
+ # add nodeID to property path (with leading ' #') if it exists
3076
+ if (defined $attrs{'rdf:nodeID'}) {
3077
+ $nodeID = $$blankInfo{NodeID} = $attrs{'rdf:nodeID'};
3078
+ delete $attrs{'rdf:nodeID'};
3079
+ $prop .= ' #' . $nodeID;
3080
+ undef $parseResource; # can't ignore if this is a node
3081
+ }
3082
+
3083
+ # push this property name onto our hierarchy list
3084
+ push @$propListPt, $prop unless $parseResource;
3085
+
3086
+ if ($isSVG) {
3087
+ # ignore everything but top level SVG tags and metadata unless Unknown set
3088
+ unless ($exifTool->{OPTIONS}{Unknown} > 1 or $exifTool->{OPTIONS}{Verbose}) {
3089
+ if (@$propListPt > 1 and $$propListPt[1] !~ /\b(metadata|desc|title)$/) {
3090
+ pop @$propListPt;
3091
+ next;
3092
+ }
3093
+ }
3094
+ if ($prop eq 'svg' or $prop eq 'metadata') {
3095
+ # add svg namespace prefix if missing to ignore these entries in the tag name
3096
+ $$propListPt[-1] = "svg:$prop";
3097
+ }
3098
+ }
3099
+
3100
+ # handle properties inside element attributes (RDF shorthand format):
3101
+ # (attributes take the form a:b='c' or a:b="c")
3102
+ my ($shortName, $shorthand, $ignored);
3103
+ foreach $shortName (@attrs) {
3104
+ my $propName = $shortName;
3105
+ my ($ns, $name);
3106
+ if ($propName =~ /(.*?):(.*)/) {
3107
+ $ns = $1; # specified namespace
3108
+ $name = $2;
3109
+ } elsif ($prop =~ /(\S*?):/) {
3110
+ $ns = $1; # assume same namespace as parent
3111
+ $name = $propName;
3112
+ $propName = "$ns:$name"; # generate full property name
3113
+ } else {
3114
+ # a property qualifier is the only property name that may not
3115
+ # have a namespace, and a qualifier shouldn't have attributes,
3116
+ # but what the heck, let's allow this anyway
3117
+ $ns = '';
3118
+ $name = $propName;
3119
+ }
3120
+ # keep track of the namespace prefixes used
3121
+ if ($ns eq 'xmlns') {
3122
+ unless ($attrs{$shortName}) {
3123
+ $exifTool->WarnOnce("Duplicate namespace '$shortName'");
3124
+ next;
3125
+ }
3126
+ $curNS{$name} = $attrs{$shortName};
3127
+ my $stdNS = $uri2ns{$attrs{$shortName}};
3128
+ # translate namespace if non-standard (except 'x' and 'iX')
3129
+ if ($stdNS and $name ne $stdNS and $stdNS ne 'x' and $stdNS ne 'iX') {
3130
+ # make a copy of the standard translations so we can modify it
3131
+ $xlatNamespace = { %stdXlatNS } if $xlatNamespace eq \%stdXlatNS;
3132
+ # translate this namespace prefix to the standard version
3133
+ $$xlatNamespace{$name} = $stdXlatNS{$stdNS} || $stdNS;
3134
+ }
3135
+ }
3136
+ if ($isWriting) {
3137
+ # keep track of our namespaces when writing
3138
+ if ($ns eq 'xmlns') {
3139
+ my $stdNS = $uri2ns{$attrs{$shortName}};
3140
+ unless ($stdNS and ($stdNS eq 'x' or $stdNS eq 'iX')) {
3141
+ my $nsUsed = $exifTool->{XMP_NS};
3142
+ $$nsUsed{$name} = $attrs{$shortName} unless defined $$nsUsed{$name};
3143
+ }
3144
+ delete $attrs{$shortName}; # (handled by namespace logic)
3145
+ next;
3146
+ } elsif ($recognizedAttrs{$propName}) {
3147
+ # save UUID to use same ID when writing
3148
+ if ($propName eq 'rdf:about') {
3149
+ if (not $exifTool->{XMP_ABOUT}) {
3150
+ $exifTool->{XMP_ABOUT} = $attrs{$shortName};
3151
+ } elsif ($exifTool->{XMP_ABOUT} ne $attrs{$shortName}) {
3152
+ $exifTool->Error("Different 'rdf:about' attributes not handled", 1);
3153
+ }
3154
+ }
3155
+ next;
3156
+ }
3157
+ }
3158
+ my $shortVal = $attrs{$shortName};
3159
+ if ($ignoreNamespace{$ns}) {
3160
+ $ignored = $propName;
3161
+ # handle special attributes (extract as tags only once if not empty)
3162
+ if (ref $recognizedAttrs{$propName} and $shortVal) {
3163
+ my ($tbl, $id, $name) = @{$recognizedAttrs{$propName}};
3164
+ my $tval = UnescapeXML($shortVal);
3165
+ unless (defined $$exifTool{VALUE}{$name} and $$exifTool{VALUE}{$name} eq $tval) {
3166
+ $exifTool->HandleTag(GetTagTable($tbl), $id, $tval);
3167
+ }
3168
+ }
3169
+ next;
3170
+ }
3171
+ delete $attrs{$shortName}; # don't re-use this attribute
3172
+ push @$propListPt, $propName;
3173
+ # save this shorthand XMP property
3174
+ if (defined $nodeID) {
3175
+ SaveBlankInfo($blankInfo, $propListPt, $shortVal);
3176
+ } elsif ($isWriting) {
3177
+ CaptureXMP($exifTool, $propListPt, $shortVal);
3178
+ } else {
3179
+ &$foundProc($exifTool, $tagTablePtr, $propListPt, $shortVal);
3180
+ }
3181
+ pop @$propListPt;
3182
+ $shorthand = 1;
3183
+ }
3184
+ if ($isWriting) {
3185
+ if (ParseXMPElement($exifTool, $tagTablePtr, $dataPt, $valStart, $valEnd,
3186
+ $propListPt, $blankInfo))
3187
+ {
3188
+ # (no value since we found more properties within this one)
3189
+ # set an error on any ignored attributes here, because they will be lost
3190
+ $exifTool->{XMP_ERROR} = "Can't handle XMP attribute '$ignored'" if $ignored;
3191
+ } elsif (not $shorthand or $valEnd != $valStart) {
3192
+ $val = substr($$dataPt, $valStart, $valEnd - $valStart);
3193
+ # remove comments and whitespace from rdf:Description only
3194
+ if ($prop eq 'rdf:Description') {
3195
+ $val =~ s/<!--.*?-->//g; $val =~ s/^\s+//; $val =~ s/\s+$//;
3196
+ }
3197
+ if (defined $nodeID) {
3198
+ SaveBlankInfo($blankInfo, $propListPt, $val, \%attrs);
3199
+ } else {
3200
+ CaptureXMP($exifTool, $propListPt, $val, \%attrs);
3201
+ }
3202
+ }
3203
+ } else {
3204
+ # look for additional elements contained within this one
3205
+ if ($valStart == $valEnd or
3206
+ !ParseXMPElement($exifTool, $tagTablePtr, $dataPt, $valStart, $valEnd,
3207
+ $propListPt, $blankInfo))
3208
+ {
3209
+ my $wasEmpty;
3210
+ unless (defined $val) {
3211
+ $val = substr($$dataPt, $valStart, $valEnd - $valStart);
3212
+ # remove comments and whitespace from rdf:Description only
3213
+ if ($prop eq 'rdf:Description' and $val) {
3214
+ $val =~ s/<!--.*?-->//g; $val =~ s/^\s+//; $val =~ s/\s+$//;
3215
+ }
3216
+ # if element value is empty, take value from 'resource' attribute
3217
+ # (preferentially) or 'about' attribute (if no 'resource')
3218
+ if ($val eq '' and ($attrs =~ /\bresource=(['"])(.*?)\1/ or
3219
+ $attrs =~ /\babout=(['"])(.*?)\1/))
3220
+ {
3221
+ $val = $2;
3222
+ $wasEmpty = 1;
3223
+ }
3224
+ }
3225
+ # there are no contained elements, so this must be a simple property value
3226
+ # (unless we already extracted shorthand values from this element)
3227
+ if (length $val or not $shorthand) {
3228
+ my $lastProp = $$propListPt[-1];
3229
+ if (defined $nodeID) {
3230
+ SaveBlankInfo($blankInfo, $propListPt, $val);
3231
+ } elsif ($lastProp eq 'rdf:type' and $wasEmpty) {
3232
+ # do not extract empty structure types (for now)
3233
+ } elsif ($lastProp =~ /^et:(desc|prt|val)$/ and ($count or $1 eq 'desc')) {
3234
+ # ignore et:desc, and et:val if preceded by et:prt
3235
+ --$count;
3236
+ } else {
3237
+ &$foundProc($exifTool, $tagTablePtr, $propListPt, $val, \%attrs);
3238
+ }
3239
+ }
3240
+ }
3241
+ }
3242
+ pop @$propListPt unless $parseResource;
3243
+ ++$count;
3244
+ last if $start >= $end;
3245
+ pos($$dataPt) = $start;
3246
+ $$dataPt =~ /\G\s+/gc; # skip white space after closing token
3247
+ }
3248
+ #
3249
+ # process resources referenced by blank nodeID's
3250
+ #
3251
+ if ($processBlankInfo and %{$$blankInfo{Prop}}) {
3252
+ ProcessBlankInfo($exifTool, $tagTablePtr, $blankInfo, $isWriting);
3253
+ %$blankInfo = (); # free some memory
3254
+ }
3255
+ return $count; # return the number of elements found at this level
3256
+ }
3257
+
3258
+ #------------------------------------------------------------------------------
3259
+ # Process XMP data
3260
+ # Inputs: 0) ExifTool object reference, 1) DirInfo reference, 2) Pointer to tag table
3261
+ # Returns: 1 on success
3262
+ # Notes: The following flavours of XMP files are currently recognized:
3263
+ # - standard XMP with xpacket, x:xmpmeta and rdf:RDF elements
3264
+ # - XMP that is missing the xpacket and/or x:xmpmeta elements
3265
+ # - mutant Microsoft XMP with xmp:xmpmeta element
3266
+ # - XML files beginning with "<xml"
3267
+ # - SVG files that begin with "<svg" or "<!DOCTYPE svg"
3268
+ # - XMP and XML files beginning with a UTF-8 byte order mark
3269
+ # - UTF-8, UTF-16 and UTF-32 encoded XMP
3270
+ # - erroneously double-UTF8 encoded XMP
3271
+ # - otherwise valid files with leading XML comment
3272
+ sub ProcessXMP($$;$)
3273
+ {
3274
+ my ($exifTool, $dirInfo, $tagTablePtr) = @_;
3275
+ my $dataPt = $$dirInfo{DataPt};
3276
+ my ($dirStart, $dirLen, $dataLen, $double);
3277
+ my ($buff, $fmt, $hasXMP, $isXML, $isRDF, $isSVG);
3278
+ my $rtnVal = 0;
3279
+ my $bom = 0;
3280
+ undef %curNS;
3281
+
3282
+ # ignore non-standard XMP while in strict MWG compatibility mode
3283
+ if ($Image::ExifTool::MWG::strict and not $$exifTool{XMP_CAPTURE} and
3284
+ $$exifTool{FILE_TYPE} =~ /^(JPEG|TIFF|PSD)$/)
3285
+ {
3286
+ my $path = $exifTool->MetadataPath();
3287
+ unless ($path =~ /^(JPEG-APP1-XMP|TIFF-IFD0-XMP|PSD-XMP)$/) {
3288
+ $exifTool->Warn("Ignored non-standard XMP at $path");
3289
+ return 1;
3290
+ }
3291
+ }
3292
+ if ($dataPt) {
3293
+ $dirStart = $$dirInfo{DirStart} || 0;
3294
+ $dirLen = $$dirInfo{DirLen} || (length($$dataPt) - $dirStart);
3295
+ $dataLen = $$dirInfo{DataLen} || length($$dataPt);
3296
+ # check leading BOM (may indicate double-encoded UTF)
3297
+ pos($$dataPt) = $dirStart;
3298
+ $double = $1 if $$dataPt =~ /\G((\0\0)?\xfe\xff|\xff\xfe(\0\0)?|\xef\xbb\xbf)\0*<\0*\?\0*x\0*p\0*a\0*c\0*k\0*e\0*t/g;
3299
+ } else {
3300
+ my ($type, $buf2, $buf3);
3301
+ # read information from XMP file
3302
+ my $raf = $$dirInfo{RAF} or return 0;
3303
+ $raf->Read($buff, 256) or return 0;
3304
+ ($buf2 = $buff) =~ tr/\0//d; # cheap conversion to UTF-8
3305
+ # remove leading comments if they exist (ie. ImageIngester)
3306
+ while ($buf2 =~ /^\s*<!--/) {
3307
+ # remove the comment if it is complete
3308
+ if ($buf2 =~ s/^\s*<!--.*?-->\s+//s) {
3309
+ # continue with parsing if we have more than 128 bytes remaining
3310
+ next if length $buf2 > 128;
3311
+ } else {
3312
+ # don't read more than 10k when looking for the end of comment
3313
+ return 0 if length($buf2) > 10000;
3314
+ }
3315
+ $raf->Read($buf3, 256) or last; # read more data if available
3316
+ $buff .= $buf3;
3317
+ $buf3 =~ tr/\0//d;
3318
+ $buf2 .= $buf3;
3319
+ }
3320
+ # check to see if this is XMP format
3321
+ # (CS2 writes .XMP files without the "xpacket begin")
3322
+ if ($buf2 =~ /^\s*(<\?xpacket begin=|<x(mp)?:x[ma]pmeta)/) {
3323
+ $hasXMP = 1;
3324
+ } else {
3325
+ # also recognize XML files and .XMP files with BOM and without x:xmpmeta
3326
+ if ($buf2 =~ /^(\xfe\xff)(<\?xml|<rdf:RDF|<x(mp)?:x[ma]pmeta)/g) {
3327
+ $fmt = 'n'; # UTF-16 or 32 MM with BOM
3328
+ } elsif ($buf2 =~ /^(\xff\xfe)(<\?xml|<rdf:RDF|<x(mp)?:x[ma]pmeta)/g) {
3329
+ $fmt = 'v'; # UTF-16 or 32 II with BOM
3330
+ } elsif ($buf2 =~ /^(\xef\xbb\xbf)?(<\?xml|<rdf:RDF|<x(mp)?:x[ma]pmeta)/g) {
3331
+ $fmt = 0; # UTF-8 with BOM or unknown encoding without BOM
3332
+ } elsif ($buf2 =~ /^(\xfe\xff|\xff\xfe|\xef\xbb\xbf)(<\?xpacket begin=)/g) {
3333
+ $double = $1; # double-encoded UTF
3334
+ } else {
3335
+ return 0; # not recognized XMP or XML
3336
+ }
3337
+ $bom = 1 if $1;
3338
+ if ($2 eq '<?xml') {
3339
+ if (defined $fmt and not $fmt and $buf2 =~ /^[^\n\r]*[\n\r]+<\?aid /s) {
3340
+ if ($exifTool->{XMP_CAPTURE}) {
3341
+ $exifTool->Error("ExifTool does not yet support writing of INX files");
3342
+ return 0;
3343
+ }
3344
+ $type = 'INX';
3345
+ } elsif ($buf2 =~ /<x(mp)?:x[ma]pmeta/) {
3346
+ $hasXMP = 1;
3347
+ } else {
3348
+ # identify SVG images and PLIST files by DOCTYPE if available
3349
+ if ($buf2 =~ /<!DOCTYPE\s+(\w+)/) {
3350
+ if ($1 eq 'svg') {
3351
+ $isSVG = 1;
3352
+ } elsif ($1 eq 'plist') {
3353
+ $type = 'PLIST';
3354
+ } else {
3355
+ return 0;
3356
+ }
3357
+ } elsif ($buf2 =~ /<svg[\s>]/) {
3358
+ $isSVG = 1;
3359
+ } elsif ($buf2 =~ /<rdf:RDF/) {
3360
+ $isRDF = 1;
3361
+ } elsif ($buf2 =~ /<plist[\s>]/) {
3362
+ $type = 'PLIST';
3363
+ }
3364
+ if ($isSVG and $exifTool->{XMP_CAPTURE}) {
3365
+ $exifTool->Error("ExifTool does not yet support writing of SVG images");
3366
+ return 0;
3367
+ }
3368
+ }
3369
+ $isXML = 1;
3370
+ } elsif ($2 eq '<rdf:RDF') {
3371
+ $isRDF = 1; # recognize XMP without x:xmpmeta element
3372
+ }
3373
+ if ($buff =~ /^\0\0/) {
3374
+ $fmt = 'N'; # UTF-32 MM with or without BOM
3375
+ } elsif ($buff =~ /^..\0\0/s) {
3376
+ $fmt = 'V'; # UTF-32 II with or without BOM
3377
+ } elsif (not $fmt) {
3378
+ if ($buff =~ /^\0/) {
3379
+ $fmt = 'n'; # UTF-16 MM without BOM
3380
+ } elsif ($buff =~ /^.\0/s) {
3381
+ $fmt = 'v'; # UTF-16 II without BOM
3382
+ }
3383
+ }
3384
+ }
3385
+ my $size;
3386
+ if ($type) {
3387
+ if ($type eq 'PLIST') {
3388
+ my $ext = $$exifTool{FILE_EXT};
3389
+ $type = $ext if $ext and $ext eq 'MODD';
3390
+ $tagTablePtr = GetTagTable('Image::ExifTool::PLIST::Main');
3391
+ $$dirInfo{XMPParseOpts}{FoundProc} = \&Image::ExifTool::PLIST::FoundTag;
3392
+ }
3393
+ } else {
3394
+ if ($isSVG) {
3395
+ $type = 'SVG';
3396
+ } elsif ($isXML and not $hasXMP and not $isRDF) {
3397
+ $type = 'XML';
3398
+ }
3399
+ }
3400
+ $exifTool->SetFileType($type);
3401
+
3402
+ if ($type and $type eq 'INX') {
3403
+ # brute force search for first XMP packet in INX file
3404
+ # start: '<![CDATA[<?xpacket begin' (24 bytes)
3405
+ # end: '<?xpacket end="r"?>]]>' (22 bytes)
3406
+ $raf->Seek(0, 0) or return 0;
3407
+ $raf->Read($buff, 65536) or return 1;
3408
+ for (;;) {
3409
+ last if $buff =~ /<!\[CDATA\[<\?xpacket begin/g;
3410
+ $raf->Read($buf2, 65536) or return 1;
3411
+ $buff = substr($buff, -24) . $buf2;
3412
+ }
3413
+ $buff = substr($buff, pos($buff) - 15); # (discard '<![CDATA[' and before)
3414
+ for (;;) {
3415
+ last if $buff =~ /<\?xpacket end="[rw]"\?>\]\]>/g;
3416
+ my $n = length $buff;
3417
+ $raf->Read($buf2, 65536) or $exifTool->Warn('Missing xpacket end'), return 1;
3418
+ $buff .= $buf2;
3419
+ pos($buff) = $n - 22; # don't miss end pattern if it was split
3420
+ }
3421
+ $size = pos($buff) - 3; # (discard ']]>' and after)
3422
+ $buff = substr($buff, 0, $size);
3423
+ } else {
3424
+ # read the entire file
3425
+ $raf->Seek(0, 2) or return 0;
3426
+ $size = $raf->Tell() or return 0;
3427
+ $raf->Seek(0, 0) or return 0;
3428
+ $raf->Read($buff, $size) == $size or return 0;
3429
+ }
3430
+ $dataPt = \$buff;
3431
+ $dirStart = 0;
3432
+ $dirLen = $dataLen = $size;
3433
+ }
3434
+
3435
+ # decode the first layer of double-encoded UTF text (if necessary)
3436
+ if ($double) {
3437
+ my ($buf2, $fmt);
3438
+ $buff = substr($$dataPt, $dirStart + length $double); # remove leading BOM
3439
+ Image::ExifTool::SetWarning(undef); # clear old warning
3440
+ local $SIG{'__WARN__'} = \&Image::ExifTool::SetWarning;
3441
+ # assume that character data has been re-encoded in UTF, so re-pack
3442
+ # as characters and look for warnings indicating a false assumption
3443
+ if ($double eq "\xef\xbb\xbf") {
3444
+ require Image::ExifTool::Charset;
3445
+ my $uni = Image::ExifTool::Charset::Decompose(undef,$buff,'UTF8');
3446
+ $buf2 = pack('C*', @$uni);
3447
+ } else {
3448
+ if (length($double) == 2) {
3449
+ $fmt = ($double eq "\xfe\xff") ? 'n' : 'v';
3450
+ } else {
3451
+ $fmt = ($double eq "\0\0\xfe\xff") ? 'N' : 'V';
3452
+ }
3453
+ $buf2 = pack('C*', unpack("$fmt*",$buff));
3454
+ }
3455
+ if (Image::ExifTool::GetWarning()) {
3456
+ $exifTool->Warn('Superfluous BOM at start of XMP');
3457
+ $dataPt = \$buff; # use XMP with the BOM removed
3458
+ } else {
3459
+ $exifTool->Warn('XMP is double UTF-encoded');
3460
+ $dataPt = \$buf2; # use the decoded XMP
3461
+ }
3462
+ $dirStart = 0;
3463
+ $dirLen = $dataLen = length $$dataPt;
3464
+ }
3465
+
3466
+ # extract XMP as a block if specified
3467
+ if (($exifTool->{REQ_TAG_LOOKUP}{xmp} or ($exifTool->{TAGS_FROM_FILE} and
3468
+ not $exifTool->{EXCL_TAG_LOOKUP}{xmp})) and not $isSVG)
3469
+ {
3470
+ $exifTool->FoundTag('XMP', substr($$dataPt, $dirStart, $dirLen));
3471
+ }
3472
+
3473
+ $tagTablePtr or $tagTablePtr = GetTagTable('Image::ExifTool::XMP::Main');
3474
+ if ($exifTool->Options('Verbose') and not $exifTool->{XMP_CAPTURE}) {
3475
+ my $dirType = $isSVG ? 'SVG' : $$tagTablePtr{GROUPS}{1};
3476
+ $exifTool->VerboseDir($dirType, 0, $dirLen);
3477
+ }
3478
+ #
3479
+ # convert UTF-16 or UTF-32 encoded XMP to UTF-8 if necessary
3480
+ #
3481
+ my $begin = '<?xpacket begin=';
3482
+ my $dirEnd = $dirStart + $dirLen;
3483
+ pos($$dataPt) = $dirStart;
3484
+ delete $$exifTool{XMP_IS_XML};
3485
+ delete $$exifTool{XMP_IS_SVG};
3486
+ if ($isXML or $isRDF) {
3487
+ $$exifTool{XMP_IS_XML} = $isXML;
3488
+ $$exifTool{XMP_IS_SVG} = $isSVG;
3489
+ $$exifTool{XMP_NO_XPACKET} = 1 + $bom;
3490
+ } elsif ($$dataPt =~ /\G\Q$begin\E/gc) {
3491
+ delete $$exifTool{XMP_NO_XPACKET};
3492
+ } elsif ($$dataPt =~ /<x(mp)?:x[ma]pmeta/gc and
3493
+ pos($$dataPt) > $dirStart and pos($$dataPt) < $dirEnd)
3494
+ {
3495
+ $$exifTool{XMP_NO_XPACKET} = 1 + $bom;
3496
+ } else {
3497
+ delete $$exifTool{XMP_NO_XPACKET};
3498
+ # check for UTF-16 encoding (insert one \0 between characters)
3499
+ $begin = join "\0", split //, $begin;
3500
+ # must reset pos because it was killed by previous unsuccessful //g match
3501
+ pos($$dataPt) = $dirStart;
3502
+ if ($$dataPt =~ /\G(\0)?\Q$begin\E\0./sg) {
3503
+ # validate byte ordering by checking for U+FEFF character
3504
+ if ($1) {
3505
+ # should be big-endian since we had a leading \0
3506
+ $fmt = 'n' if $$dataPt =~ /\G\xfe\xff/g;
3507
+ } else {
3508
+ $fmt = 'v' if $$dataPt =~ /\G\0\xff\xfe/g;
3509
+ }
3510
+ } else {
3511
+ # check for UTF-32 encoding (with three \0's between characters)
3512
+ $begin =~ s/\0/\0\0\0/g;
3513
+ pos($$dataPt) = $dirStart;
3514
+ if ($$dataPt !~ /\G(\0\0\0)?\Q$begin\E\0\0\0./sg) {
3515
+ $fmt = 0; # set format to zero as indication we didn't find encoded XMP
3516
+ } elsif ($1) {
3517
+ # should be big-endian
3518
+ $fmt = 'N' if $$dataPt =~ /\G\0\0\xfe\xff/g;
3519
+ } else {
3520
+ $fmt = 'V' if $$dataPt =~ /\G\0\0\0\xff\xfe\0\0/g;
3521
+ }
3522
+ }
3523
+ defined $fmt or $exifTool->Warn('XMP character encoding error');
3524
+ }
3525
+ if ($fmt) {
3526
+ # trim if necessary to avoid converting non-UTF data
3527
+ if ($dirStart or $dirEnd != length($$dataPt)) {
3528
+ $buff = substr($$dataPt, $dirStart, $dirLen);
3529
+ $dataPt = \$buff;
3530
+ }
3531
+ # convert into UTF-8
3532
+ if ($] >= 5.006001) {
3533
+ $buff = pack('C0U*', unpack("$fmt*",$$dataPt));
3534
+ } else {
3535
+ $buff = Image::ExifTool::PackUTF8(unpack("$fmt*",$$dataPt));
3536
+ }
3537
+ $dataPt = \$buff;
3538
+ $dirStart = 0;
3539
+ $dirLen = length $$dataPt;
3540
+ $dirEnd = $dirStart + $dirLen;
3541
+ }
3542
+ # initialize namespace translation
3543
+ $xlatNamespace = \%stdXlatNS;
3544
+
3545
+ # avoid scanning for XMP later in case ScanForXMP is set
3546
+ $$exifTool{FoundXMP} = 1;
3547
+
3548
+ # set XMP parsing options
3549
+ $$exifTool{XMPParseOpts} = $$dirInfo{XMPParseOpts};
3550
+
3551
+ # need to preserve list indices to be able to handle multi-dimensional lists
3552
+ my $keepFlat;
3553
+ if ($exifTool->{OPTIONS}{Struct}) {
3554
+ if ($exifTool->{OPTIONS}{Struct} eq '2') {
3555
+ $keepFlat = 1; # preserve flattened tags
3556
+ # setting NO_LIST to 0 combines list items in a TAG_EXTRA "NoList" element
3557
+ # to allow them to be re-listed later if necessary. A "NoListDel" element
3558
+ # is also created for tags that wouldn't have existed.
3559
+ $$exifTool{NO_LIST} = 0;
3560
+ } else {
3561
+ $$exifTool{NO_LIST} = 1;
3562
+ }
3563
+ }
3564
+
3565
+ # parse the XMP
3566
+ if (ParseXMPElement($exifTool, $tagTablePtr, $dataPt, $dirStart, $dirEnd)) {
3567
+ $rtnVal = 1;
3568
+ } elsif ($$dirInfo{DirName} and $$dirInfo{DirName} eq 'XMP') {
3569
+ # if DirName was 'XMP' we expect well-formed XMP, so set Warning since it wasn't
3570
+ $exifTool->Warn('Invalid XMP');
3571
+ }
3572
+
3573
+ # return DataPt if successful in case we want it for writing
3574
+ $$dirInfo{DataPt} = $dataPt if $rtnVal and $$dirInfo{RAF};
3575
+
3576
+ # restore structures if necessary
3577
+ if ($$exifTool{IsStruct}) {
3578
+ require 'Image/ExifTool/XMPStruct.pl';
3579
+ RestoreStruct($exifTool, $keepFlat);
3580
+ delete $$exifTool{IsStruct};
3581
+ }
3582
+ # reset NO_LIST flag (must do this _after_ RestoreStruct() above)
3583
+ delete $$exifTool{NO_LIST};
3584
+ delete $$exifTool{XMPParseOpts};
3585
+
3586
+ undef %curNS;
3587
+ return $rtnVal;
3588
+ }
3589
+
3590
+
3591
+ 1; #end
3592
+
3593
+ __END__
3594
+
3595
+ =head1 NAME
3596
+
3597
+ Image::ExifTool::XMP - Read XMP meta information
3598
+
3599
+ =head1 SYNOPSIS
3600
+
3601
+ This module is loaded automatically by Image::ExifTool when required.
3602
+
3603
+ =head1 DESCRIPTION
3604
+
3605
+ XMP stands for Extensible Metadata Platform. It is a format based on XML
3606
+ that Adobe developed for embedding metadata information in image files.
3607
+ This module contains the definitions required by Image::ExifTool to read XMP
3608
+ information.
3609
+
3610
+ =head1 AUTHOR
3611
+
3612
+ Copyright 2003-2013, Phil Harvey (phil at owl.phy.queensu.ca)
3613
+
3614
+ This library is free software; you can redistribute it and/or modify it
3615
+ under the same terms as Perl itself.
3616
+
3617
+ =head1 REFERENCES
3618
+
3619
+ =over 4
3620
+
3621
+ =item L<http://www.adobe.com/devnet/xmp/>
3622
+
3623
+ =item L<http://www.w3.org/TR/rdf-syntax-grammar/>
3624
+
3625
+ =item L<http://www.iptc.org/IPTC4XMP/>
3626
+
3627
+ =back
3628
+
3629
+ =head1 SEE ALSO
3630
+
3631
+ L<Image::ExifTool::TagNames/XMP Tags>,
3632
+ L<Image::ExifTool(3pm)|Image::ExifTool>
3633
+
3634
+ =cut