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,4542 @@
1
+ #------------------------------------------------------------------------------
2
+ # File: Exif.pm
3
+ #
4
+ # Description: Read EXIF/TIFF meta information
5
+ #
6
+ # Revisions: 11/25/2003 - P. Harvey Created
7
+ # 02/06/2004 - P. Harvey Moved processing functions from ExifTool
8
+ # 03/19/2004 - P. Harvey Check PreviewImage for validity
9
+ # 11/11/2004 - P. Harvey Split off maker notes into MakerNotes.pm
10
+ # 12/13/2004 - P. Harvey Added AUTOLOAD to load write routines
11
+ #
12
+ # References: 0) http://www.exif.org/Exif2-2.PDF
13
+ # 1) http://partners.adobe.com/asn/developer/pdfs/tn/TIFF6.pdf
14
+ # 2) http://www.adobe.com/products/dng/pdfs/dng_spec_1_3_0_0.pdf
15
+ # 3) http://www.awaresystems.be/imaging/tiff/tifftags.html
16
+ # 4) http://www.remotesensing.org/libtiff/TIFFTechNote2.html
17
+ # 5) http://www.exif.org/dcf.PDF
18
+ # 6) http://park2.wakwak.com/~tsuruzoh/Computer/Digicams/exif-e.html
19
+ # 7) http://www.fine-view.com/jp/lab/doc/ps6ffspecsv2.pdf
20
+ # 8) http://www.ozhiker.com/electronics/pjmt/jpeg_info/meta.html
21
+ # 9) http://hul.harvard.edu/jhove/tiff-tags.html
22
+ # 10) http://partners.adobe.com/public/developer/en/tiff/TIFFPM6.pdf
23
+ # 11) Robert Mucke private communication
24
+ # 12) http://www.broomscloset.com/closet/photo/exif/TAG2000-22_DIS12234-2.PDF
25
+ # 13) http://www.microsoft.com/whdc/xps/wmphoto.mspx
26
+ # 14) http://www.asmail.be/msg0054681802.html
27
+ # 15) http://crousseau.free.fr/imgfmt_raw.htm
28
+ # 16) http://www.cybercom.net/~dcoffin/dcraw/
29
+ # 17) http://www.digitalpreservation.gov/formats/content/tiff_tags.shtml
30
+ # 18) http://www.asmail.be/msg0055568584.html
31
+ # 19) http://libpsd.graphest.com/files/Photoshop%20File%20Formats.pdf
32
+ # 20) http://tiki-lounge.com/~raf/tiff/fields.html
33
+ # 21) http://community.roxen.com/developers/idocs/rfc/rfc3949.html
34
+ # 22) http://tools.ietf.org/html/draft-ietf-fax-tiff-fx-extension1-01
35
+ # 23) MetaMorph Stack (STK) Image File Format:
36
+ # --> ftp://ftp.meta.moleculardevices.com/support/stack/STK.doc
37
+ # 24) http://www.cipa.jp/english/hyoujunka/kikaku/pdf/DC-008-2010_E.pdf (Exif 2.3)
38
+ # 25) Vesa Kivisto private communication (7D)
39
+ # 26) Jeremy Brown private communication
40
+ # 27) Gregg Lee private communication
41
+ # 28) http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/cinemadng/pdfs/CinemaDNG_Format_Specification_v1_1.pdf
42
+ # JD) Jens Duttke private communication
43
+ #------------------------------------------------------------------------------
44
+
45
+ package Image::ExifTool::Exif;
46
+
47
+ use strict;
48
+ use vars qw($VERSION $AUTOLOAD @formatSize @formatName %formatNumber %intFormat
49
+ %lightSource %flash %compression %photometricInterpretation %orientation
50
+ %subfileType);
51
+ use Image::ExifTool qw(:DataAccess :Utils);
52
+ use Image::ExifTool::MakerNotes;
53
+
54
+ $VERSION = '3.53';
55
+
56
+ sub ProcessExif($$$);
57
+ sub WriteExif($$$);
58
+ sub CheckExif($$$);
59
+ sub RebuildMakerNotes($$$);
60
+ sub EncodeExifText($$);
61
+ sub ValidateIFD($;$);
62
+ sub ProcessTiffIFD($$$);
63
+ sub PrintParameter($$$);
64
+ sub GetOffList($$$$$);
65
+ sub PrintLensInfo($);
66
+ sub ConvertLensInfo($);
67
+
68
+ # size limit for loading binary data block into memory
69
+ sub BINARY_DATA_LIMIT { return 10 * 1024 * 1024; }
70
+
71
+ # byte sizes for the various EXIF format types below
72
+ @formatSize = (undef,1,1,2,4,8,1,1,2,4,8,4,8,4,2,8,8,8,8);
73
+
74
+ @formatName = (
75
+ undef, 'int8u', 'string', 'int16u',
76
+ 'int32u', 'rational64u','int8s', 'undef',
77
+ 'int16s', 'int32s', 'rational64s','float',
78
+ 'double', 'ifd', 'unicode', 'complex',
79
+ 'int64u', 'int64s', 'ifd64', # (new BigTIFF formats)
80
+ );
81
+
82
+ # hash to look up EXIF format numbers by name
83
+ # (format types are all lower case)
84
+ %formatNumber = (
85
+ 'int8u' => 1, # BYTE
86
+ 'string' => 2, # ASCII
87
+ 'int16u' => 3, # SHORT
88
+ 'int32u' => 4, # LONG
89
+ 'rational64u' => 5, # RATIONAL
90
+ 'int8s' => 6, # SBYTE
91
+ 'undef' => 7, # UNDEFINED
92
+ 'binary' => 7, # (treat binary data as undef)
93
+ 'int16s' => 8, # SSHORT
94
+ 'int32s' => 9, # SLONG
95
+ 'rational64s' => 10, # SRATIONAL
96
+ 'float' => 11, # FLOAT
97
+ 'double' => 12, # DOUBLE
98
+ 'ifd' => 13, # IFD (with int32u format)
99
+ 'unicode' => 14, # UNICODE [see Note below]
100
+ 'complex' => 15, # COMPLEX [see Note below]
101
+ 'int64u' => 16, # LONG8 [BigTIFF]
102
+ 'int64s' => 17, # SLONG8 [BigTIFF]
103
+ 'ifd64' => 18, # IFD8 (with int64u format) [BigTIFF]
104
+ # Note: unicode and complex types are not yet properly supported by ExifTool.
105
+ # These are types which have been observed in the Adobe DNG SDK code, but
106
+ # aren't fully supported there either. We know the sizes, but that's about it.
107
+ # We don't know if the unicode is null terminated, or the format for complex
108
+ # (although I suspect it would be two 4-byte floats, real and imaginary).
109
+ );
110
+
111
+ # lookup for integer format strings
112
+ %intFormat = (
113
+ 'int8u' => 1,
114
+ 'int16u' => 3,
115
+ 'int32u' => 4,
116
+ 'int8s' => 6,
117
+ 'int16s' => 8,
118
+ 'int32s' => 9,
119
+ 'ifd' => 13,
120
+ 'int64u' => 16,
121
+ 'int64s' => 17,
122
+ 'ifd64' => 18,
123
+ );
124
+
125
+ # EXIF LightSource PrintConv values
126
+ %lightSource = (
127
+ 0 => 'Unknown',
128
+ 1 => 'Daylight',
129
+ 2 => 'Fluorescent',
130
+ 3 => 'Tungsten (Incandescent)',
131
+ 4 => 'Flash',
132
+ 9 => 'Fine Weather',
133
+ 10 => 'Cloudy',
134
+ 11 => 'Shade',
135
+ 12 => 'Daylight Fluorescent', # (D 5700 - 7100K)
136
+ 13 => 'Day White Fluorescent', # (N 4600 - 5500K)
137
+ 14 => 'Cool White Fluorescent', # (W 3800 - 4500K)
138
+ 15 => 'White Fluorescent', # (WW 3250 - 3800K)
139
+ 16 => 'Warm White Fluorescent', # (L 2600 - 3250K)
140
+ 17 => 'Standard Light A',
141
+ 18 => 'Standard Light B',
142
+ 19 => 'Standard Light C',
143
+ 20 => 'D55',
144
+ 21 => 'D65',
145
+ 22 => 'D75',
146
+ 23 => 'D50',
147
+ 24 => 'ISO Studio Tungsten',
148
+ 255 => 'Other',
149
+ );
150
+
151
+ # EXIF Flash values
152
+ %flash = (
153
+ OTHER => sub {
154
+ # translate "Off" and "On" when writing
155
+ my ($val, $inv) = @_;
156
+ return undef unless $inv and $val =~ /^(off|on)$/i;
157
+ return lc $val eq 'off' ? 0x00 : 0x01;
158
+ },
159
+ 0x00 => 'No Flash',
160
+ 0x01 => 'Fired',
161
+ 0x05 => 'Fired, Return not detected',
162
+ 0x07 => 'Fired, Return detected',
163
+ 0x08 => 'On, Did not fire', # not charged up?
164
+ 0x09 => 'On, Fired',
165
+ 0x0d => 'On, Return not detected',
166
+ 0x0f => 'On, Return detected',
167
+ 0x10 => 'Off, Did not fire',
168
+ 0x14 => 'Off, Did not fire, Return not detected',
169
+ 0x18 => 'Auto, Did not fire',
170
+ 0x19 => 'Auto, Fired',
171
+ 0x1d => 'Auto, Fired, Return not detected',
172
+ 0x1f => 'Auto, Fired, Return detected',
173
+ 0x20 => 'No flash function',
174
+ 0x30 => 'Off, No flash function',
175
+ 0x41 => 'Fired, Red-eye reduction',
176
+ 0x45 => 'Fired, Red-eye reduction, Return not detected',
177
+ 0x47 => 'Fired, Red-eye reduction, Return detected',
178
+ 0x49 => 'On, Red-eye reduction',
179
+ 0x4d => 'On, Red-eye reduction, Return not detected',
180
+ 0x4f => 'On, Red-eye reduction, Return detected',
181
+ 0x50 => 'Off, Red-eye reduction',
182
+ 0x58 => 'Auto, Did not fire, Red-eye reduction',
183
+ 0x59 => 'Auto, Fired, Red-eye reduction',
184
+ 0x5d => 'Auto, Fired, Red-eye reduction, Return not detected',
185
+ 0x5f => 'Auto, Fired, Red-eye reduction, Return detected',
186
+ );
187
+
188
+ # TIFF Compression values
189
+ # (values with format "Xxxxx XXX Compressed" are used to identify RAW file types)
190
+ %compression = (
191
+ 1 => 'Uncompressed',
192
+ 2 => 'CCITT 1D',
193
+ 3 => 'T4/Group 3 Fax',
194
+ 4 => 'T6/Group 4 Fax',
195
+ 5 => 'LZW',
196
+ 6 => 'JPEG (old-style)', #3
197
+ 7 => 'JPEG', #4
198
+ 8 => 'Adobe Deflate', #3
199
+ 9 => 'JBIG B&W', #3
200
+ 10 => 'JBIG Color', #3
201
+ 99 => 'JPEG', #16
202
+ 262 => 'Kodak 262', #16
203
+ 32766 => 'Next', #3
204
+ 32767 => 'Sony ARW Compressed', #16
205
+ 32769 => 'Packed RAW', #PH (used by Epson, Nikon, Samsung)
206
+ 32770 => 'Samsung SRW Compressed', #PH
207
+ 32771 => 'CCIRLEW', #3
208
+ 32773 => 'PackBits',
209
+ 32809 => 'Thunderscan', #3
210
+ 32867 => 'Kodak KDC Compressed', #PH
211
+ 32895 => 'IT8CTPAD', #3
212
+ 32896 => 'IT8LW', #3
213
+ 32897 => 'IT8MP', #3
214
+ 32898 => 'IT8BL', #3
215
+ 32908 => 'PixarFilm', #3
216
+ 32909 => 'PixarLog', #3
217
+ 32946 => 'Deflate', #3
218
+ 32947 => 'DCS', #3
219
+ 34661 => 'JBIG', #3
220
+ 34676 => 'SGILog', #3
221
+ 34677 => 'SGILog24', #3
222
+ 34712 => 'JPEG 2000', #3
223
+ 34713 => 'Nikon NEF Compressed', #PH
224
+ 34715 => 'JBIG2 TIFF FX', #20
225
+ 34718 => 'Microsoft Document Imaging (MDI) Binary Level Codec', #18
226
+ 34719 => 'Microsoft Document Imaging (MDI) Progressive Transform Codec', #18
227
+ 34720 => 'Microsoft Document Imaging (MDI) Vector', #18
228
+ 34892 => 'Lossy JPEG', # (DNG 1.4)
229
+ 65000 => 'Kodak DCR Compressed', #PH
230
+ 65535 => 'Pentax PEF Compressed', #Jens
231
+ );
232
+
233
+ %photometricInterpretation = (
234
+ 0 => 'WhiteIsZero',
235
+ 1 => 'BlackIsZero',
236
+ 2 => 'RGB',
237
+ 3 => 'RGB Palette',
238
+ 4 => 'Transparency Mask',
239
+ 5 => 'CMYK',
240
+ 6 => 'YCbCr',
241
+ 8 => 'CIELab',
242
+ 9 => 'ICCLab', #3
243
+ 10 => 'ITULab', #3
244
+ 32803 => 'Color Filter Array', #2
245
+ 32844 => 'Pixar LogL', #3
246
+ 32845 => 'Pixar LogLuv', #3
247
+ 34892 => 'Linear Raw', #2
248
+ );
249
+
250
+ %orientation = (
251
+ 1 => 'Horizontal (normal)',
252
+ 2 => 'Mirror horizontal',
253
+ 3 => 'Rotate 180',
254
+ 4 => 'Mirror vertical',
255
+ 5 => 'Mirror horizontal and rotate 270 CW',
256
+ 6 => 'Rotate 90 CW',
257
+ 7 => 'Mirror horizontal and rotate 90 CW',
258
+ 8 => 'Rotate 270 CW',
259
+ );
260
+
261
+ %subfileType = (
262
+ 0 => 'Full-resolution Image',
263
+ 1 => 'Reduced-resolution image',
264
+ 2 => 'Single page of multi-page image',
265
+ 3 => 'Single page of multi-page reduced-resolution image',
266
+ 4 => 'Transparency mask',
267
+ 5 => 'Transparency mask of reduced-resolution image',
268
+ 6 => 'Transparency mask of multi-page image',
269
+ 7 => 'Transparency mask of reduced-resolution multi-page image',
270
+ 0x10001 => 'Alternate reduced-resolution image', # (DNG 1.2)
271
+ 0xffffffff => 'invalid', #(found in E5700 NEF's)
272
+ BITMASK => {
273
+ 0 => 'Reduced resolution',
274
+ 1 => 'Single page',
275
+ 2 => 'Transparency mask',
276
+ 3 => 'TIFF/IT final page', #20
277
+ 4 => 'TIFF-FX mixed raster content', #20
278
+ },
279
+ );
280
+
281
+ # PrintConv for parameter tags
282
+ %Image::ExifTool::Exif::printParameter = (
283
+ PrintConv => {
284
+ 0 => 'Normal',
285
+ OTHER => \&Image::ExifTool::Exif::PrintParameter,
286
+ },
287
+ );
288
+
289
+ # ValueConv that makes long values binary type
290
+ my %longBin = (
291
+ ValueConv => 'length($val) > 64 ? \$val : $val',
292
+ ValueConvInv => '$val',
293
+ );
294
+
295
+ # PrintConv for SampleFormat (0x153)
296
+ my %sampleFormat = (
297
+ 1 => 'Unsigned', # unsigned integer
298
+ 2 => 'Signed', # two's complement signed integer
299
+ 3 => 'Float', # IEEE floating point
300
+ 4 => 'Undefined',
301
+ 5 => 'Complex int', # complex integer (ref 3)
302
+ 6 => 'Complex float', # complex IEEE floating point (ref 3)
303
+ );
304
+
305
+ # main EXIF tag table
306
+ %Image::ExifTool::Exif::Main = (
307
+ GROUPS => { 0 => 'EXIF', 1 => 'IFD0', 2 => 'Image'},
308
+ WRITE_PROC => \&WriteExif,
309
+ WRITE_GROUP => 'ExifIFD', # default write group
310
+ SET_GROUP1 => 1, # set group1 name to directory name for all tags in table
311
+ 0x1 => {
312
+ Name => 'InteropIndex',
313
+ Description => 'Interoperability Index',
314
+ PrintConv => {
315
+ R98 => 'R98 - DCF basic file (sRGB)',
316
+ R03 => 'R03 - DCF option file (Adobe RGB)',
317
+ THM => 'THM - DCF thumbnail file',
318
+ },
319
+ },
320
+ 0x2 => { #5
321
+ Name => 'InteropVersion',
322
+ Description => 'Interoperability Version',
323
+ RawConv => '$val=~s/\0+$//; $val', # (some idiots add null terminators)
324
+ },
325
+ 0x0b => { #PH
326
+ Name => 'ProcessingSoftware',
327
+ Notes => 'used by ACD Systems Digital Imaging',
328
+ },
329
+ 0xfe => {
330
+ Name => 'SubfileType',
331
+ # set priority directory if this is the full resolution image
332
+ DataMember => 'SubfileType',
333
+ RawConv => '$self->SetPriorityDir() if $val eq "0"; $$self{SubfileType} = $val',
334
+ PrintConv => \%subfileType,
335
+ },
336
+ 0xff => {
337
+ Name => 'OldSubfileType',
338
+ # set priority directory if this is the full resolution image
339
+ RawConv => '$self->SetPriorityDir() if $val eq "1"; $val',
340
+ PrintConv => {
341
+ 1 => 'Full-resolution image',
342
+ 2 => 'Reduced-resolution image',
343
+ 3 => 'Single page of multi-page image',
344
+ },
345
+ },
346
+ 0x100 => {
347
+ Name => 'ImageWidth',
348
+ # even though Group 1 is set dynamically we need to register IFD1 once
349
+ # so it will show up in the group lists
350
+ Groups => { 1 => 'IFD1' },
351
+ # Note: priority 0 tags automatically have their priority increased for the
352
+ # priority direcory (the directory with a SubfileType of "Full-resolution image")
353
+ Priority => 0,
354
+ },
355
+ 0x101 => {
356
+ Name => 'ImageHeight',
357
+ Notes => 'called ImageLength by the EXIF spec.',
358
+ Priority => 0,
359
+ },
360
+ 0x102 => {
361
+ Name => 'BitsPerSample',
362
+ Priority => 0,
363
+ },
364
+ 0x103 => {
365
+ Name => 'Compression',
366
+ DataMember => 'Compression',
367
+ SeparateTable => 'Compression',
368
+ RawConv => q{
369
+ Image::ExifTool::Exif::IdentifyRawFile($self, $val);
370
+ return $$self{Compression} = $val;
371
+ },
372
+ PrintConv => \%compression,
373
+ Priority => 0,
374
+ },
375
+ 0x106 => {
376
+ Name => 'PhotometricInterpretation',
377
+ PrintConv => \%photometricInterpretation,
378
+ Priority => 0,
379
+ },
380
+ 0x107 => {
381
+ Name => 'Thresholding',
382
+ PrintConv => {
383
+ 1 => 'No dithering or halftoning',
384
+ 2 => 'Ordered dither or halftone',
385
+ 3 => 'Randomized dither',
386
+ },
387
+ },
388
+ 0x108 => 'CellWidth',
389
+ 0x109 => 'CellLength',
390
+ 0x10a => {
391
+ Name => 'FillOrder',
392
+ PrintConv => {
393
+ 1 => 'Normal',
394
+ 2 => 'Reversed',
395
+ },
396
+ },
397
+ 0x10d => 'DocumentName',
398
+ 0x10e => {
399
+ Name => 'ImageDescription',
400
+ Priority => 0,
401
+ },
402
+ 0x10f => {
403
+ Name => 'Make',
404
+ Groups => { 2 => 'Camera' },
405
+ DataMember => 'Make',
406
+ # remove trailing blanks and save as an ExifTool member variable
407
+ RawConv => '$val =~ s/\s+$//; $$self{Make} = $val',
408
+ # NOTE: trailing "blanks" (spaces) are removed from all EXIF tags which
409
+ # may be "unknown" (filled with spaces) according to the EXIF spec.
410
+ # This allows conditional replacement with "exiftool -TAG-= -TAG=VALUE".
411
+ # - also removed are any other trailing whitespace characters
412
+ },
413
+ 0x110 => {
414
+ Name => 'Model',
415
+ Description => 'Camera Model Name',
416
+ Groups => { 2 => 'Camera' },
417
+ DataMember => 'Model',
418
+ # remove trailing blanks and save as an ExifTool member variable
419
+ RawConv => '$val =~ s/\s+$//; $$self{Model} = $val',
420
+ },
421
+ 0x111 => [
422
+ {
423
+ Condition => q[
424
+ $$self{TIFF_TYPE} eq 'MRW' and $$self{DIR_NAME} eq 'IFD0' and
425
+ $$self{Model} =~ /^DiMAGE A200/
426
+ ],
427
+ Name => 'StripOffsets',
428
+ IsOffset => 1,
429
+ OffsetPair => 0x117, # point to associated byte counts
430
+ # A200 stores this information in the wrong byte order!!
431
+ ValueConv => '$val=join(" ",unpack("N*",pack("V*",split(" ",$val))));\$val',
432
+ ByteOrder => 'LittleEndian',
433
+ },
434
+ {
435
+ Condition => q[
436
+ ($$self{TIFF_TYPE} ne 'CR2' or $$self{DIR_NAME} ne 'IFD0') and
437
+ ($$self{TIFF_TYPE} ne 'DNG' or $$self{DIR_NAME} !~ /^SubIFD[12]$/)
438
+ ],
439
+ Name => 'StripOffsets',
440
+ IsOffset => 1,
441
+ OffsetPair => 0x117, # point to associated byte counts
442
+ ValueConv => 'length($val) > 32 ? \$val : $val',
443
+ },
444
+ {
445
+ Condition => '$$self{DIR_NAME} eq "IFD0"',
446
+ Name => 'PreviewImageStart',
447
+ IsOffset => 1,
448
+ OffsetPair => 0x117,
449
+ Notes => q{
450
+ PreviewImageStart in IFD0 of CR2 images and SubIFD1 of DNG images, and
451
+ JpgFromRawStart in SubIFD2 of DNG images
452
+ },
453
+ DataTag => 'PreviewImage',
454
+ Writable => 'int32u',
455
+ WriteGroup => 'IFD0',
456
+ WriteCondition => '$$self{TIFF_TYPE} eq "CR2"',
457
+ Protected => 2,
458
+ },
459
+ {
460
+ Condition => '$$self{DIR_NAME} eq "SubIFD1"',
461
+ Name => 'PreviewImageStart',
462
+ IsOffset => 1,
463
+ OffsetPair => 0x117,
464
+ DataTag => 'PreviewImage',
465
+ Writable => 'int32u',
466
+ WriteGroup => 'SubIFD1',
467
+ WriteCondition => '$$self{TIFF_TYPE} eq "DNG"',
468
+ Protected => 2,
469
+ },
470
+ {
471
+ Name => 'JpgFromRawStart',
472
+ IsOffset => 1,
473
+ OffsetPair => 0x117,
474
+ DataTag => 'JpgFromRaw',
475
+ Writable => 'int32u',
476
+ WriteGroup => 'SubIFD2',
477
+ WriteCondition => '$$self{TIFF_TYPE} eq "DNG"',
478
+ Protected => 2,
479
+ },
480
+ ],
481
+ 0x112 => {
482
+ Name => 'Orientation',
483
+ PrintConv => \%orientation,
484
+ Priority => 0, # so PRIORITY_DIR takes precedence
485
+ },
486
+ 0x115 => {
487
+ Name => 'SamplesPerPixel',
488
+ Priority => 0,
489
+ },
490
+ 0x116 => {
491
+ Name => 'RowsPerStrip',
492
+ Priority => 0,
493
+ },
494
+ 0x117 => [
495
+ {
496
+ Condition => q[
497
+ $$self{TIFF_TYPE} eq 'MRW' and $$self{DIR_NAME} eq 'IFD0' and
498
+ $$self{Model} =~ /^DiMAGE A200/
499
+ ],
500
+ Name => 'StripByteCounts',
501
+ OffsetPair => 0x111, # point to associated offset
502
+ # A200 stores this information in the wrong byte order!!
503
+ ValueConv => '$val=join(" ",unpack("N*",pack("V*",split(" ",$val))));\$val',
504
+ ByteOrder => 'LittleEndian',
505
+ },
506
+ {
507
+ Condition => q[
508
+ ($$self{TIFF_TYPE} ne 'CR2' or $$self{DIR_NAME} ne 'IFD0') and
509
+ ($$self{TIFF_TYPE} ne 'DNG' or $$self{DIR_NAME} !~ /^SubIFD[12]$/)
510
+ ],
511
+ Name => 'StripByteCounts',
512
+ OffsetPair => 0x111, # point to associated offset
513
+ ValueConv => 'length($val) > 32 ? \$val : $val',
514
+ },
515
+ {
516
+ Condition => '$$self{DIR_NAME} eq "IFD0"',
517
+ Name => 'PreviewImageLength',
518
+ OffsetPair => 0x111,
519
+ Notes => q{
520
+ PreviewImageLength in IFD0 of CR2 images and SubIFD1 of DNG images, and
521
+ JpgFromRawLength in SubIFD2 of DNG images
522
+ },
523
+ DataTag => 'PreviewImage',
524
+ Writable => 'int32u',
525
+ WriteGroup => 'IFD0',
526
+ WriteCondition => '$$self{TIFF_TYPE} eq "CR2"',
527
+ Protected => 2,
528
+ },
529
+ {
530
+ Condition => '$$self{DIR_NAME} eq "SubIFD1"',
531
+ Name => 'PreviewImageLength',
532
+ OffsetPair => 0x111,
533
+ DataTag => 'PreviewImage',
534
+ Writable => 'int32u',
535
+ WriteGroup => 'SubIFD1',
536
+ WriteCondition => '$$self{TIFF_TYPE} eq "DNG"',
537
+ Protected => 2,
538
+ },
539
+ {
540
+ Name => 'JpgFromRawLength',
541
+ OffsetPair => 0x111,
542
+ DataTag => 'JpgFromRaw',
543
+ Writable => 'int32u',
544
+ WriteGroup => 'SubIFD2',
545
+ WriteCondition => '$$self{TIFF_TYPE} eq "DNG"',
546
+ Protected => 2,
547
+ },
548
+ ],
549
+ 0x118 => 'MinSampleValue',
550
+ 0x119 => 'MaxSampleValue',
551
+ 0x11a => {
552
+ Name => 'XResolution',
553
+ Priority => 0, # so PRIORITY_DIR takes precedence
554
+ },
555
+ 0x11b => {
556
+ Name => 'YResolution',
557
+ Priority => 0,
558
+ },
559
+ 0x11c => {
560
+ Name => 'PlanarConfiguration',
561
+ PrintConv => {
562
+ 1 => 'Chunky',
563
+ 2 => 'Planar',
564
+ },
565
+ Priority => 0,
566
+ },
567
+ 0x11d => 'PageName',
568
+ 0x11e => 'XPosition',
569
+ 0x11f => 'YPosition',
570
+ 0x120 => {
571
+ Name => 'FreeOffsets',
572
+ IsOffset => 1,
573
+ OffsetPair => 0x121,
574
+ ValueConv => 'length($val) > 32 ? \$val : $val',
575
+ },
576
+ 0x121 => {
577
+ Name => 'FreeByteCounts',
578
+ OffsetPair => 0x120,
579
+ ValueConv => 'length($val) > 32 ? \$val : $val',
580
+ },
581
+ 0x122 => {
582
+ Name => 'GrayResponseUnit',
583
+ PrintConv => { #3
584
+ 1 => 0.1,
585
+ 2 => 0.001,
586
+ 3 => 0.0001,
587
+ 4 => 0.00001,
588
+ 5 => 0.000001,
589
+ },
590
+ },
591
+ 0x123 => {
592
+ Name => 'GrayResponseCurve',
593
+ Binary => 1,
594
+ },
595
+ 0x124 => {
596
+ Name => 'T4Options',
597
+ PrintConv => { BITMASK => {
598
+ 0 => '2-Dimensional encoding',
599
+ 1 => 'Uncompressed',
600
+ 2 => 'Fill bits added',
601
+ } }, #3
602
+ },
603
+ 0x125 => {
604
+ Name => 'T6Options',
605
+ PrintConv => { BITMASK => {
606
+ 1 => 'Uncompressed',
607
+ } }, #3
608
+ },
609
+ 0x128 => {
610
+ Name => 'ResolutionUnit',
611
+ Notes => 'the value 1 is not standard EXIF',
612
+ PrintConv => {
613
+ 1 => 'None',
614
+ 2 => 'inches',
615
+ 3 => 'cm',
616
+ },
617
+ Priority => 0,
618
+ },
619
+ 0x129 => 'PageNumber',
620
+ 0x12c => 'ColorResponseUnit', #9
621
+ 0x12d => {
622
+ Name => 'TransferFunction',
623
+ Binary => 1,
624
+ },
625
+ 0x131 => {
626
+ Name => 'Software',
627
+ RawConv => '$val =~ s/\s+$//; $val', # trim trailing blanks
628
+ },
629
+ 0x132 => {
630
+ Name => 'ModifyDate',
631
+ Groups => { 2 => 'Time' },
632
+ Notes => 'called DateTime by the EXIF spec.',
633
+ PrintConv => '$self->ConvertDateTime($val)',
634
+ },
635
+ 0x13b => {
636
+ Name => 'Artist',
637
+ Groups => { 2 => 'Author' },
638
+ Notes => 'becomes a list-type tag when the MWG module is loaded',
639
+ RawConv => '$val =~ s/\s+$//; $val', # trim trailing blanks
640
+ },
641
+ 0x13c => 'HostComputer',
642
+ 0x13d => {
643
+ Name => 'Predictor',
644
+ PrintConv => {
645
+ 1 => 'None',
646
+ 2 => 'Horizontal differencing',
647
+ },
648
+ },
649
+ 0x13e => {
650
+ Name => 'WhitePoint',
651
+ Groups => { 2 => 'Camera' },
652
+ },
653
+ 0x13f => {
654
+ Name => 'PrimaryChromaticities',
655
+ Priority => 0,
656
+ },
657
+ 0x140 => {
658
+ Name => 'ColorMap',
659
+ Format => 'binary',
660
+ Binary => 1,
661
+ },
662
+ 0x141 => 'HalftoneHints',
663
+ 0x142 => 'TileWidth',
664
+ 0x143 => 'TileLength',
665
+ 0x144 => {
666
+ Name => 'TileOffsets',
667
+ IsOffset => 1,
668
+ OffsetPair => 0x145,
669
+ ValueConv => 'length($val) > 32 ? \$val : $val',
670
+ },
671
+ 0x145 => {
672
+ Name => 'TileByteCounts',
673
+ OffsetPair => 0x144,
674
+ ValueConv => 'length($val) > 32 ? \$val : $val',
675
+ },
676
+ 0x146 => 'BadFaxLines', #3
677
+ 0x147 => { #3
678
+ Name => 'CleanFaxData',
679
+ PrintConv => {
680
+ 0 => 'Clean',
681
+ 1 => 'Regenerated',
682
+ 2 => 'Unclean',
683
+ },
684
+ },
685
+ 0x148 => 'ConsecutiveBadFaxLines', #3
686
+ 0x14a => [
687
+ {
688
+ Name => 'SubIFD',
689
+ # use this opportunity to identify an ARW image, and if so we
690
+ # must decide if this is a SubIFD or the A100 raw data
691
+ # (use SubfileType, Compression and FILE_TYPE to identify ARW/SR2,
692
+ # then call SetARW to finish the job)
693
+ Condition => q{
694
+ $$self{DIR_NAME} ne 'IFD0' or $$self{FILE_TYPE} ne 'TIFF' or
695
+ $$self{Make} !~ /^SONY/ or
696
+ not $$self{SubfileType} or $$self{SubfileType} != 1 or
697
+ not $$self{Compression} or $$self{Compression} != 6 or
698
+ not require Image::ExifTool::Sony or
699
+ Image::ExifTool::Sony::SetARW($self, $valPt)
700
+ },
701
+ Groups => { 1 => 'SubIFD' },
702
+ Flags => 'SubIFD',
703
+ SubDirectory => {
704
+ Start => '$val',
705
+ MaxSubdirs => 10, # (have seen 5 in a DNG 1.4 image)
706
+ },
707
+ },
708
+ { #16
709
+ Name => 'A100DataOffset',
710
+ Notes => 'the data offset in original Sony DSLR-A100 ARW images',
711
+ DataMember => 'A100DataOffset',
712
+ RawConv => '$$self{A100DataOffset} = $val',
713
+ IsOffset => 1,
714
+ Protected => 2,
715
+ },
716
+ ],
717
+ 0x14c => {
718
+ Name => 'InkSet',
719
+ PrintConv => { #3
720
+ 1 => 'CMYK',
721
+ 2 => 'Not CMYK',
722
+ },
723
+ },
724
+ 0x14d => 'InkNames', #3
725
+ 0x14e => 'NumberofInks', #3
726
+ 0x150 => 'DotRange',
727
+ 0x151 => 'TargetPrinter',
728
+ 0x152 => {
729
+ Name => 'ExtraSamples',
730
+ PrintConv => { #20
731
+ 0 => 'Unspecified',
732
+ 1 => 'Associated Alpha',
733
+ 2 => 'Unassociated Alpha',
734
+ },
735
+ },
736
+ 0x153 => {
737
+ Name => 'SampleFormat',
738
+ Notes => 'SamplesPerPixel values',
739
+ PrintConvColumns => 2,
740
+ PrintConv => [ \%sampleFormat, \%sampleFormat, \%sampleFormat, \%sampleFormat ],
741
+ },
742
+ 0x154 => 'SMinSampleValue',
743
+ 0x155 => 'SMaxSampleValue',
744
+ 0x156 => 'TransferRange',
745
+ 0x157 => 'ClipPath', #3
746
+ 0x158 => 'XClipPathUnits', #3
747
+ 0x159 => 'YClipPathUnits', #3
748
+ 0x15a => { #3
749
+ Name => 'Indexed',
750
+ PrintConv => { 0 => 'Not indexed', 1 => 'Indexed' },
751
+ },
752
+ 0x15b => {
753
+ Name => 'JPEGTables',
754
+ Binary => 1,
755
+ },
756
+ 0x15f => { #10
757
+ Name => 'OPIProxy',
758
+ PrintConv => {
759
+ 0 => 'Higher resolution image does not exist',
760
+ 1 => 'Higher resolution image exists',
761
+ },
762
+ },
763
+ # 0x181 => 'Decode', #20 (typo! - should be 0x1b1, ref 21)
764
+ # 0x182 => 'DefaultImageColor', #20 (typo! - should be 0x1b2, ref 21)
765
+ 0x190 => { #3
766
+ Name => 'GlobalParametersIFD',
767
+ Groups => { 1 => 'GlobParamIFD' },
768
+ Flags => 'SubIFD',
769
+ SubDirectory => {
770
+ DirName => 'GlobParamIFD',
771
+ Start => '$val',
772
+ },
773
+ },
774
+ 0x191 => { #3
775
+ Name => 'ProfileType',
776
+ PrintConv => { 0 => 'Unspecified', 1 => 'Group 3 FAX' },
777
+ },
778
+ 0x192 => { #3
779
+ Name => 'FaxProfile',
780
+ PrintConv => {
781
+ 0 => 'Unknown',
782
+ 1 => 'Minimal B&W lossless, S',
783
+ 2 => 'Extended B&W lossless, F',
784
+ 3 => 'Lossless JBIG B&W, J',
785
+ 4 => 'Lossy color and grayscale, C',
786
+ 5 => 'Lossless color and grayscale, L',
787
+ 6 => 'Mixed raster content, M',
788
+ 7 => 'Profile T', #20
789
+ 255 => 'Multi Profiles', #20
790
+ },
791
+ },
792
+ 0x193 => { #3
793
+ Name => 'CodingMethods',
794
+ PrintConv => { BITMASK => {
795
+ 0 => 'Unspecified compression',
796
+ 1 => 'Modified Huffman',
797
+ 2 => 'Modified Read',
798
+ 3 => 'Modified MR',
799
+ 4 => 'JBIG',
800
+ 5 => 'Baseline JPEG',
801
+ 6 => 'JBIG color',
802
+ } },
803
+ },
804
+ 0x194 => 'VersionYear', #3
805
+ 0x195 => 'ModeNumber', #3
806
+ 0x1b1 => 'Decode', #3
807
+ 0x1b2 => 'DefaultImageColor', #3 (changed to ImageBaseColor, ref 21)
808
+ 0x1b3 => 'T82Options', #20
809
+ 0x1b5 => { #19
810
+ Name => 'JPEGTables',
811
+ Binary => 1,
812
+ },
813
+ 0x200 => {
814
+ Name => 'JPEGProc',
815
+ PrintConv => {
816
+ 1 => 'Baseline',
817
+ 14 => 'Lossless',
818
+ },
819
+ },
820
+ 0x201 => [
821
+ {
822
+ Name => 'ThumbnailOffset',
823
+ Notes => q{
824
+ ThumbnailOffset in IFD1 of JPEG and some TIFF-based images, IFD0 of MRW
825
+ images and AVI and MOV videos, and the SubIFD in IFD1 of SRW images;
826
+ PreviewImageStart in MakerNotes and IFD0 of ARW and SR2 images;
827
+ JpgFromRawStart in SubIFD of NEF images and IFD2 of PEF images; and
828
+ OtherImageStart in everything else
829
+ },
830
+ # thumbnail is found in IFD1 of JPEG and TIFF images, and
831
+ # IFD0 of EXIF information in FujiFilm AVI (RIFF) and MOV videos
832
+ Condition => q{
833
+ $$self{DIR_NAME} eq 'IFD1' or
834
+ ($$self{DIR_NAME} eq 'IFD0' and $$self{FILE_TYPE} =~ /^(RIFF|MOV)$/)
835
+ },
836
+ IsOffset => 1,
837
+ OffsetPair => 0x202,
838
+ DataTag => 'ThumbnailImage',
839
+ Writable => 'int32u',
840
+ WriteGroup => 'IFD1',
841
+ # according to the EXIF spec. a JPEG-compressed thumbnail image may not
842
+ # be stored in a TIFF file, but these TIFF-based RAW image formats
843
+ # use IFD1 for a JPEG-compressed thumbnail: CR2, ARW, SR2 and PEF.
844
+ # (SRF also stores a JPEG image in IFD1, but it is actually a preview
845
+ # and we don't yet write SRF anyway)
846
+ WriteCondition => q{
847
+ $$self{FILE_TYPE} ne "TIFF" or
848
+ $$self{TIFF_TYPE} =~ /^(CR2|ARW|SR2|PEF)$/
849
+ },
850
+ Protected => 2,
851
+ },
852
+ {
853
+ Name => 'ThumbnailOffset',
854
+ # thumbnail in IFD0 of MRW images (Minolta A200)
855
+ # and IFD0 of NRW images (Nikon Coolpix P6000,P7000,P7100)
856
+ Condition => '$$self{DIR_NAME} eq "IFD0" and $$self{TIFF_TYPE} =~ /^(MRW|NRW)$/',
857
+ IsOffset => 1,
858
+ OffsetPair => 0x202,
859
+ # A200 uses the wrong base offset for this pointer!!
860
+ WrongBase => '$$self{Model} =~ /^DiMAGE A200/ ? $$self{MRW_WrongBase} : undef',
861
+ DataTag => 'ThumbnailImage',
862
+ Writable => 'int32u',
863
+ WriteGroup => 'IFD0',
864
+ WriteCondition => '$$self{FILE_TYPE} =~ /^(MRW|NRW)$/',
865
+ Protected => 2,
866
+ },
867
+ {
868
+ Name => 'ThumbnailOffset',
869
+ # in SubIFD of IFD1 in Samsung SRW images
870
+ Condition => q{
871
+ $$self{TIFF_TYPE} eq 'SRW' and $$self{DIR_NAME} eq 'SubIFD' and
872
+ $$self{PATH}[-2] eq 'IFD1'
873
+ },
874
+ IsOffset => 1,
875
+ OffsetPair => 0x202,
876
+ DataTag => 'ThumbnailImage',
877
+ Writable => 'int32u',
878
+ WriteGroup => 'SubIFD',
879
+ WriteCondition => '$$self{TIFF_TYPE} eq "SRW"',
880
+ Protected => 2,
881
+ },
882
+ {
883
+ Name => 'PreviewImageStart',
884
+ Condition => '$$self{DIR_NAME} eq "MakerNotes"',
885
+ IsOffset => 1,
886
+ OffsetPair => 0x202,
887
+ DataTag => 'PreviewImage',
888
+ Writable => 'int32u',
889
+ WriteGroup => 'MakerNotes',
890
+ # (no WriteCondition necessary because MakerNotes won't be created)
891
+ Protected => 2,
892
+ },
893
+ {
894
+ Name => 'PreviewImageStart',
895
+ # PreviewImage in IFD0 of ARW and SR2 files for all models
896
+ Condition => '$$self{DIR_NAME} eq "IFD0" and $$self{TIFF_TYPE} =~ /^(ARW|SR2)$/',
897
+ IsOffset => 1,
898
+ OffsetPair => 0x202,
899
+ DataTag => 'PreviewImage',
900
+ Writable => 'int32u',
901
+ WriteGroup => 'IFD0',
902
+ WriteCondition => '$$self{TIFF_TYPE} =~ /^(ARW|SR2)$/',
903
+ Protected => 2,
904
+ },
905
+ {
906
+ Name => 'JpgFromRawStart',
907
+ Condition => '$$self{DIR_NAME} eq "SubIFD"',
908
+ IsOffset => 1,
909
+ OffsetPair => 0x202,
910
+ DataTag => 'JpgFromRaw',
911
+ Writable => 'int32u',
912
+ WriteGroup => 'SubIFD',
913
+ # JpgFromRaw is in SubIFD of NEF, NRW and SRW files
914
+ WriteCondition => '$$self{TIFF_TYPE} =~ /^(NEF|NRW|SRW)$/',
915
+ Protected => 2,
916
+ },
917
+ {
918
+ Name => 'JpgFromRawStart',
919
+ Condition => '$$self{DIR_NAME} eq "IFD2"',
920
+ IsOffset => 1,
921
+ OffsetPair => 0x202,
922
+ DataTag => 'JpgFromRaw',
923
+ Writable => 'int32u',
924
+ WriteGroup => 'IFD2',
925
+ # JpgFromRaw is in IFD2 of PEF files
926
+ WriteCondition => '$$self{TIFF_TYPE} eq "PEF"',
927
+ Protected => 2,
928
+ },
929
+ {
930
+ Name => 'OtherImageStart',
931
+ Condition => '$$self{DIR_NAME} eq "SubIFD1"',
932
+ IsOffset => 1,
933
+ OffsetPair => 0x202,
934
+ DataTag => 'OtherImage',
935
+ Writable => 'int32u',
936
+ WriteGroup => 'SubIFD1',
937
+ Protected => 2,
938
+ Permanent => 1, # (don't add/delete this tag: makes WriteCondition unnecessary)
939
+ },
940
+ {
941
+ Name => 'OtherImageStart',
942
+ Condition => '$$self{DIR_NAME} eq "SubIFD2"',
943
+ IsOffset => 1,
944
+ OffsetPair => 0x202,
945
+ DataTag => 'OtherImage',
946
+ Writable => 'int32u',
947
+ WriteGroup => 'SubIFD2',
948
+ Protected => 2,
949
+ Permanent => 1, # (don't add/delete this tag: makes WriteCondition unnecessary)
950
+ },
951
+ {
952
+ Name => 'OtherImageStart',
953
+ IsOffset => 1,
954
+ OffsetPair => 0x202,
955
+ },
956
+ ],
957
+ 0x202 => [
958
+ {
959
+ Name => 'ThumbnailLength',
960
+ Notes => q{
961
+ ThumbnailLength in IFD1 of JPEG and some TIFF-based images, IFD0 of MRW
962
+ images and AVI and MOV videos, and the SubIFD in IFD1 of SRW images;
963
+ PreviewImageLength in MakerNotes and IFD0 of ARW and SR2 images;
964
+ JpgFromRawLength in SubIFD of NEF images, and IFD2 of PEF images; and
965
+ OtherImageLength in everything else
966
+ },
967
+ Condition => q{
968
+ $$self{DIR_NAME} eq 'IFD1' or
969
+ ($$self{DIR_NAME} eq 'IFD0' and $$self{FILE_TYPE} =~ /^(RIFF|MOV)$/)
970
+ },
971
+ OffsetPair => 0x201,
972
+ DataTag => 'ThumbnailImage',
973
+ Writable => 'int32u',
974
+ WriteGroup => 'IFD1',
975
+ WriteCondition => q{
976
+ $$self{FILE_TYPE} ne "TIFF" or
977
+ $$self{TIFF_TYPE} =~ /^(CR2|ARW|SR2|PEF)$/
978
+ },
979
+ Protected => 2,
980
+ },
981
+ {
982
+ Name => 'ThumbnailLength',
983
+ # thumbnail in IFD0 of MRW images (Minolta A200)
984
+ # and IFD0 of NRW images (Nikon Coolpix P6000,P7000,P7100)
985
+ Condition => '$$self{DIR_NAME} eq "IFD0" and $$self{TIFF_TYPE} =~ /^(MRW|NRW)$/',
986
+ OffsetPair => 0x201,
987
+ DataTag => 'ThumbnailImage',
988
+ Writable => 'int32u',
989
+ WriteGroup => 'IFD0',
990
+ WriteCondition => '$$self{FILE_TYPE} =~ /^(MRW|NRW)$/',
991
+ Protected => 2,
992
+ },
993
+ {
994
+ Name => 'ThumbnailLength',
995
+ # in SubIFD of IFD1 in Samsung SRW images
996
+ Condition => q{
997
+ $$self{TIFF_TYPE} eq 'SRW' and $$self{DIR_NAME} eq 'SubIFD' and
998
+ $$self{PATH}[-2] eq 'IFD1'
999
+ },
1000
+ OffsetPair => 0x201,
1001
+ DataTag => 'ThumbnailImage',
1002
+ Writable => 'int32u',
1003
+ WriteGroup => 'SubIFD',
1004
+ WriteCondition => '$$self{TIFF_TYPE} eq "SRW"',
1005
+ Protected => 2,
1006
+ },
1007
+ {
1008
+ Name => 'PreviewImageLength',
1009
+ Condition => '$$self{DIR_NAME} eq "MakerNotes"',
1010
+ OffsetPair => 0x201,
1011
+ DataTag => 'PreviewImage',
1012
+ Writable => 'int32u',
1013
+ WriteGroup => 'MakerNotes',
1014
+ # (no WriteCondition necessary because MakerNotes won't be created)
1015
+ Protected => 2,
1016
+ },
1017
+ {
1018
+ Name => 'PreviewImageLength',
1019
+ # PreviewImage in IFD0 of ARW and SR2 files for all models
1020
+ Condition => '$$self{DIR_NAME} eq "IFD0" and $$self{TIFF_TYPE} =~ /^(ARW|SR2)$/',
1021
+ OffsetPair => 0x201,
1022
+ DataTag => 'PreviewImage',
1023
+ Writable => 'int32u',
1024
+ WriteGroup => 'IFD0',
1025
+ WriteCondition => '$$self{TIFF_TYPE} =~ /^(ARW|SR2)$/',
1026
+ Protected => 2,
1027
+ },
1028
+ {
1029
+ Name => 'JpgFromRawLength',
1030
+ Condition => '$$self{DIR_NAME} eq "SubIFD"',
1031
+ OffsetPair => 0x201,
1032
+ DataTag => 'JpgFromRaw',
1033
+ Writable => 'int32u',
1034
+ WriteGroup => 'SubIFD',
1035
+ WriteCondition => '$$self{TIFF_TYPE} =~ /^(NEF|NRW|SRW)$/',
1036
+ Protected => 2,
1037
+ },
1038
+ {
1039
+ Name => 'JpgFromRawLength',
1040
+ Condition => '$$self{DIR_NAME} eq "IFD2"',
1041
+ OffsetPair => 0x201,
1042
+ DataTag => 'JpgFromRaw',
1043
+ Writable => 'int32u',
1044
+ WriteGroup => 'IFD2',
1045
+ WriteCondition => '$$self{TIFF_TYPE} eq "PEF"',
1046
+ Protected => 2,
1047
+ },
1048
+ {
1049
+ Name => 'OtherImageLength',
1050
+ Condition => '$$self{DIR_NAME} eq "SubIFD1"',
1051
+ OffsetPair => 0x201,
1052
+ DataTag => 'OtherImage',
1053
+ Writable => 'int32u',
1054
+ WriteGroup => 'SubIFD1',
1055
+ Protected => 2,
1056
+ Permanent => 1, # (don't add/delete this tag: makes WriteCondition unnecessary)
1057
+ },
1058
+ {
1059
+ Name => 'OtherImageLength',
1060
+ Condition => '$$self{DIR_NAME} eq "SubIFD2"',
1061
+ OffsetPair => 0x201,
1062
+ DataTag => 'OtherImage',
1063
+ Writable => 'int32u',
1064
+ WriteGroup => 'SubIFD2',
1065
+ Protected => 2,
1066
+ Permanent => 1, # (don't add/delete this tag: makes WriteCondition unnecessary)
1067
+ },
1068
+ {
1069
+ Name => 'OtherImageLength',
1070
+ OffsetPair => 0x201,
1071
+ },
1072
+ ],
1073
+ 0x203 => 'JPEGRestartInterval',
1074
+ 0x205 => 'JPEGLosslessPredictors',
1075
+ 0x206 => 'JPEGPointTransforms',
1076
+ 0x207 => {
1077
+ Name => 'JPEGQTables',
1078
+ IsOffset => 1,
1079
+ # this tag is not supported for writing, so define an
1080
+ # invalid offset pair to cause a "No size tag" error to be
1081
+ # generated if we try to write a file containing this tag
1082
+ OffsetPair => -1,
1083
+ },
1084
+ 0x208 => {
1085
+ Name => 'JPEGDCTables',
1086
+ IsOffset => 1,
1087
+ OffsetPair => -1, # (see comment for JPEGQTables)
1088
+ },
1089
+ 0x209 => {
1090
+ Name => 'JPEGACTables',
1091
+ IsOffset => 1,
1092
+ OffsetPair => -1, # (see comment for JPEGQTables)
1093
+ },
1094
+ 0x211 => {
1095
+ Name => 'YCbCrCoefficients',
1096
+ Priority => 0,
1097
+ },
1098
+ 0x212 => {
1099
+ Name => 'YCbCrSubSampling',
1100
+ PrintConvColumns => 2,
1101
+ PrintConv => \%Image::ExifTool::JPEG::yCbCrSubSampling,
1102
+ Priority => 0,
1103
+ },
1104
+ 0x213 => {
1105
+ Name => 'YCbCrPositioning',
1106
+ PrintConv => {
1107
+ 1 => 'Centered',
1108
+ 2 => 'Co-sited',
1109
+ },
1110
+ Priority => 0,
1111
+ },
1112
+ 0x214 => {
1113
+ Name => 'ReferenceBlackWhite',
1114
+ Priority => 0,
1115
+ },
1116
+ 0x22f => 'StripRowCounts',
1117
+ 0x2bc => {
1118
+ Name => 'ApplicationNotes', # (writable directory!)
1119
+ Writable => 'int8u',
1120
+ Format => 'undef',
1121
+ Flags => [ 'Binary', 'Protected' ],
1122
+ # this could be an XMP block
1123
+ SubDirectory => {
1124
+ DirName => 'XMP',
1125
+ TagTable => 'Image::ExifTool::XMP::Main',
1126
+ },
1127
+ },
1128
+ 0x3e7 => 'USPTOMiscellaneous', #20
1129
+ 0x1000 => 'RelatedImageFileFormat', #5
1130
+ 0x1001 => 'RelatedImageWidth', #5
1131
+ 0x1002 => { #5
1132
+ Name => 'RelatedImageHeight',
1133
+ Notes => 'called RelatedImageLength by the DCF spec.',
1134
+ },
1135
+ # (0x474x tags written by MicrosoftPhoto)
1136
+ 0x4746 => 'Rating', #PH
1137
+ 0x4747 => { # (written by Digital Image Pro)
1138
+ Name => 'XP_DIP_XML',
1139
+ Format => 'undef',
1140
+ # the following reference indicates this is Unicode:
1141
+ # http://social.msdn.microsoft.com/Forums/en-US/isvvba/thread/ce6edcbb-8fc2-40c6-ad98-85f5d835ddfb
1142
+ ValueConv => '$self->Decode($val,"UCS2","II")',
1143
+ },
1144
+ 0x4748 => {
1145
+ Name => 'StitchInfo',
1146
+ SubDirectory => {
1147
+ TagTable => 'Image::ExifTool::Microsoft::Stitch',
1148
+ ByteOrder => 'LittleEndian', #PH (NC)
1149
+ },
1150
+ },
1151
+ 0x4749 => 'RatingPercent', #PH
1152
+ 0x800d => 'ImageID', #10
1153
+ 0x80a3 => { Name => 'WangTag1', Binary => 1 }, #20
1154
+ 0x80a4 => { Name => 'WangAnnotation', Binary => 1 },
1155
+ 0x80a5 => { Name => 'WangTag3', Binary => 1 }, #20
1156
+ 0x80a6 => { #20
1157
+ Name => 'WangTag4',
1158
+ PrintConv => 'length($val) <= 64 ? $val : \$val',
1159
+ },
1160
+ 0x80e3 => 'Matteing', #9
1161
+ 0x80e4 => 'DataType', #9
1162
+ 0x80e5 => 'ImageDepth', #9
1163
+ 0x80e6 => 'TileDepth', #9
1164
+ 0x827d => 'Model2',
1165
+ 0x828d => 'CFARepeatPatternDim', #12
1166
+ 0x828e => {
1167
+ Name => 'CFAPattern2', #12
1168
+ Format => 'int8u', # (written incorrectly as 'undef' in Nikon NRW images)
1169
+ },
1170
+ 0x828f => { #12
1171
+ Name => 'BatteryLevel',
1172
+ Groups => { 2 => 'Camera' },
1173
+ },
1174
+ 0x8290 => {
1175
+ Name => 'KodakIFD',
1176
+ Groups => { 1 => 'KodakIFD' },
1177
+ Flags => 'SubIFD',
1178
+ Notes => 'used in various types of Kodak images',
1179
+ SubDirectory => {
1180
+ TagTable => 'Image::ExifTool::Kodak::IFD',
1181
+ DirName => 'KodakIFD',
1182
+ Start => '$val',
1183
+ },
1184
+ },
1185
+ 0x8298 => {
1186
+ Name => 'Copyright',
1187
+ Groups => { 2 => 'Author' },
1188
+ Format => 'undef',
1189
+ Notes => q{
1190
+ may contain copyright notices for photographer and editor, separated by a
1191
+ newline in ExifTool
1192
+ },
1193
+ # internally the strings are separated by a null character in this format:
1194
+ # Photographer only: photographer + NULL
1195
+ # Both: photographer + NULL + editor + NULL
1196
+ # Editor only: SPACE + NULL + editor + NULL
1197
+ # (this is done as a RawConv so conditional replaces will work properly)
1198
+ RawConv => sub {
1199
+ my ($val, $self) = @_;
1200
+ $val =~ s/ *\0/\n/; # translate first NULL to a newline, removing trailing blanks
1201
+ $val =~ s/ *\0.*//s; # truncate at second NULL and remove trailing blanks
1202
+ $val =~ s/\n$//; # remove trailing newline if it exists
1203
+ # decode if necessary (note: this is the only non-'string' EXIF value like this)
1204
+ my $enc = $self->Options('CharsetEXIF');
1205
+ $val = $self->Decode($val,$enc) if $enc;
1206
+ return $val;
1207
+ },
1208
+ },
1209
+ 0x829a => {
1210
+ Name => 'ExposureTime',
1211
+ PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
1212
+ },
1213
+ 0x829d => {
1214
+ Name => 'FNumber',
1215
+ PrintConv => 'Image::ExifTool::Exif::PrintFNumber($val)',
1216
+ },
1217
+ 0x82a5 => { #3
1218
+ Name => 'MDFileTag',
1219
+ Notes => 'tags 0x82a5-0x82ac are used in Molecular Dynamics GEL files',
1220
+ },
1221
+ 0x82a6 => 'MDScalePixel', #3
1222
+ 0x82a7 => 'MDColorTable', #3
1223
+ 0x82a8 => 'MDLabName', #3
1224
+ 0x82a9 => 'MDSampleInfo', #3
1225
+ 0x82aa => 'MDPrepDate', #3
1226
+ 0x82ab => 'MDPrepTime', #3
1227
+ 0x82ac => 'MDFileUnits', #3
1228
+ 0x830e => 'PixelScale',
1229
+ 0x8335 => 'AdventScale', #20
1230
+ 0x8336 => 'AdventRevision', #20
1231
+ 0x835c => 'UIC1Tag', #23
1232
+ 0x835d => 'UIC2Tag', #23
1233
+ 0x835e => 'UIC3Tag', #23
1234
+ 0x835f => 'UIC4Tag', #23
1235
+ 0x83bb => { #12
1236
+ Name => 'IPTC-NAA', # (writable directory! -- but see note below)
1237
+ # this should actually be written as 'undef' (see
1238
+ # http://www.awaresystems.be/imaging/tiff/tifftags/iptc.html),
1239
+ # but Photoshop writes it as int32u and Nikon Capture won't read
1240
+ # anything else, so we do the same thing here... Doh!
1241
+ Format => 'undef', # convert binary values as undef
1242
+ Writable => 'int32u', # but write int32u format code in IFD
1243
+ WriteGroup => 'IFD0',
1244
+ Flags => [ 'Binary', 'Protected' ],
1245
+ SubDirectory => {
1246
+ DirName => 'IPTC',
1247
+ TagTable => 'Image::ExifTool::IPTC::Main',
1248
+ },
1249
+ # Note: This directory may be written as a block via the IPTC-NAA tag,
1250
+ # but this technique is not recommended. Instead, it is better to
1251
+ # write the Extra IPTC tag and let ExifTool decide where it should go.
1252
+ },
1253
+ 0x847e => 'IntergraphPacketData', #3
1254
+ 0x847f => 'IntergraphFlagRegisters', #3
1255
+ 0x8480 => 'IntergraphMatrix',
1256
+ 0x8481 => 'INGRReserved', #20
1257
+ 0x8482 => {
1258
+ Name => 'ModelTiePoint',
1259
+ Groups => { 2 => 'Location' },
1260
+ },
1261
+ 0x84e0 => 'Site', #9
1262
+ 0x84e1 => 'ColorSequence', #9
1263
+ 0x84e2 => 'IT8Header', #9
1264
+ 0x84e3 => { #9
1265
+ Name => 'RasterPadding',
1266
+ PrintConv => { #20
1267
+ 0 => 'Byte',
1268
+ 1 => 'Word',
1269
+ 2 => 'Long Word',
1270
+ 9 => 'Sector',
1271
+ 10 => 'Long Sector',
1272
+ },
1273
+ },
1274
+ 0x84e4 => 'BitsPerRunLength', #9
1275
+ 0x84e5 => 'BitsPerExtendedRunLength', #9
1276
+ 0x84e6 => 'ColorTable', #9
1277
+ 0x84e7 => { #9
1278
+ Name => 'ImageColorIndicator',
1279
+ PrintConv => { #20
1280
+ 0 => 'Unspecified Image Color',
1281
+ 1 => 'Specified Image Color',
1282
+ },
1283
+ },
1284
+ 0x84e8 => { #9
1285
+ Name => 'BackgroundColorIndicator',
1286
+ PrintConv => { #20
1287
+ 0 => 'Unspecified Background Color',
1288
+ 1 => 'Specified Background Color',
1289
+ },
1290
+ },
1291
+ 0x84e9 => 'ImageColorValue', #9
1292
+ 0x84ea => 'BackgroundColorValue', #9
1293
+ 0x84eb => 'PixelIntensityRange', #9
1294
+ 0x84ec => 'TransparencyIndicator', #9
1295
+ 0x84ed => 'ColorCharacterization', #9
1296
+ 0x84ee => { #9
1297
+ Name => 'HCUsage',
1298
+ PrintConv => { #20
1299
+ 0 => 'CT',
1300
+ 1 => 'Line Art',
1301
+ 2 => 'Trap',
1302
+ },
1303
+ },
1304
+ 0x84ef => 'TrapIndicator', #17
1305
+ 0x84f0 => 'CMYKEquivalent', #17
1306
+ 0x8546 => { #11
1307
+ Name => 'SEMInfo',
1308
+ Notes => 'found in some scanning electron microscope images',
1309
+ },
1310
+ 0x8568 => {
1311
+ Name => 'AFCP_IPTC',
1312
+ SubDirectory => {
1313
+ # must change directory name so we don't create this directory
1314
+ DirName => 'AFCP_IPTC',
1315
+ TagTable => 'Image::ExifTool::IPTC::Main',
1316
+ },
1317
+ },
1318
+ 0x85b8 => 'PixelMagicJBIGOptions', #20
1319
+ 0x85d8 => {
1320
+ Name => 'ModelTransform',
1321
+ Groups => { 2 => 'Location' },
1322
+ },
1323
+ 0x8602 => { #16
1324
+ Name => 'WB_GRGBLevels',
1325
+ Notes => 'found in IFD0 of Leaf MOS images',
1326
+ },
1327
+ # 0x8603 - Leaf CatchLight color matrix (ref 16)
1328
+ 0x8606 => {
1329
+ Name => 'LeafData',
1330
+ Format => 'undef', # avoid converting huge block to string of int8u's!
1331
+ SubDirectory => {
1332
+ DirName => 'LeafIFD',
1333
+ TagTable => 'Image::ExifTool::Leaf::Main',
1334
+ },
1335
+ },
1336
+ 0x8649 => { #19
1337
+ Name => 'PhotoshopSettings',
1338
+ Format => 'binary',
1339
+ SubDirectory => {
1340
+ DirName => 'Photoshop',
1341
+ TagTable => 'Image::ExifTool::Photoshop::Main',
1342
+ },
1343
+ },
1344
+ 0x8769 => {
1345
+ Name => 'ExifOffset',
1346
+ Groups => { 1 => 'ExifIFD' },
1347
+ SubIFD => 2,
1348
+ SubDirectory => {
1349
+ DirName => 'ExifIFD',
1350
+ Start => '$val',
1351
+ },
1352
+ },
1353
+ 0x8773 => {
1354
+ Name => 'ICC_Profile',
1355
+ SubDirectory => {
1356
+ TagTable => 'Image::ExifTool::ICC_Profile::Main',
1357
+ },
1358
+ },
1359
+ 0x877f => { #20
1360
+ Name => 'TIFF_FXExtensions',
1361
+ PrintConv => { BITMASK => {
1362
+ 0 => 'Resolution/Image Width',
1363
+ 1 => 'N Layer Profile M',
1364
+ 2 => 'Shared Data',
1365
+ 3 => 'B&W JBIG2',
1366
+ 4 => 'JBIG2 Profile M',
1367
+ }},
1368
+ },
1369
+ 0x8780 => { #20
1370
+ Name => 'MultiProfiles',
1371
+ PrintConv => { BITMASK => {
1372
+ 0 => 'Profile S',
1373
+ 1 => 'Profile F',
1374
+ 2 => 'Profile J',
1375
+ 3 => 'Profile C',
1376
+ 4 => 'Profile L',
1377
+ 5 => 'Profile M',
1378
+ 6 => 'Profile T',
1379
+ 7 => 'Resolution/Image Width',
1380
+ 8 => 'N Layer Profile M',
1381
+ 9 => 'Shared Data',
1382
+ 10 => 'JBIG2 Profile M',
1383
+ }},
1384
+ },
1385
+ 0x8781 => { #22
1386
+ Name => 'SharedData',
1387
+ IsOffset => 1,
1388
+ # this tag is not supported for writing, so define an
1389
+ # invalid offset pair to cause a "No size tag" error to be
1390
+ # generated if we try to write a file containing this tag
1391
+ OffsetPair => -1,
1392
+ },
1393
+ 0x8782 => 'T88Options', #20
1394
+ 0x87ac => 'ImageLayer',
1395
+ 0x87af => {
1396
+ Name => 'GeoTiffDirectory',
1397
+ Format => 'binary',
1398
+ Binary => 1,
1399
+ },
1400
+ 0x87b0 => {
1401
+ Name => 'GeoTiffDoubleParams',
1402
+ Format => 'binary',
1403
+ Binary => 1,
1404
+ },
1405
+ 0x87b1 => {
1406
+ Name => 'GeoTiffAsciiParams',
1407
+ Binary => 1,
1408
+ },
1409
+ 0x8822 => {
1410
+ Name => 'ExposureProgram',
1411
+ Groups => { 2 => 'Camera' },
1412
+ Notes => 'the value of 9 is not standard EXIF, but is used by the Canon EOS 7D',
1413
+ PrintConv => {
1414
+ 0 => 'Not Defined',
1415
+ 1 => 'Manual',
1416
+ 2 => 'Program AE',
1417
+ 3 => 'Aperture-priority AE',
1418
+ 4 => 'Shutter speed priority AE',
1419
+ 5 => 'Creative (Slow speed)',
1420
+ 6 => 'Action (High speed)',
1421
+ 7 => 'Portrait',
1422
+ 8 => 'Landscape',
1423
+ 9 => 'Bulb', #25
1424
+ },
1425
+ },
1426
+ 0x8824 => {
1427
+ Name => 'SpectralSensitivity',
1428
+ Groups => { 2 => 'Camera' },
1429
+ },
1430
+ 0x8825 => {
1431
+ Name => 'GPSInfo',
1432
+ Groups => { 1 => 'GPS' },
1433
+ Flags => 'SubIFD',
1434
+ SubDirectory => {
1435
+ DirName => 'GPS',
1436
+ TagTable => 'Image::ExifTool::GPS::Main',
1437
+ Start => '$val',
1438
+ },
1439
+ },
1440
+ 0x8827 => {
1441
+ Name => 'ISO',
1442
+ Notes => q{
1443
+ called ISOSpeedRatings by EXIF 2.2, then PhotographicSensitivity by the EXIF
1444
+ 2.3 spec.
1445
+ },
1446
+ PrintConv => '$val=~s/\s+/, /g; $val',
1447
+ },
1448
+ 0x8828 => {
1449
+ Name => 'Opto-ElectricConvFactor',
1450
+ Notes => 'called OECF by the EXIF spec.',
1451
+ Binary => 1,
1452
+ },
1453
+ 0x8829 => 'Interlace', #12
1454
+ 0x882a => 'TimeZoneOffset', #12
1455
+ 0x882b => 'SelfTimerMode', #12
1456
+ 0x8830 => { #24
1457
+ Name => 'SensitivityType',
1458
+ Notes => 'applies to EXIF:ISO tag',
1459
+ PrintConv => {
1460
+ 0 => 'Unknown',
1461
+ 1 => 'Standard Output Sensitivity',
1462
+ 2 => 'Recommended Exposure Index',
1463
+ 3 => 'ISO Speed',
1464
+ 4 => 'Standard Output Sensitivity and Recommended Exposure Index',
1465
+ 5 => 'Standard Output Sensitivity and ISO Speed',
1466
+ 6 => 'Recommended Exposure Index and ISO Speed',
1467
+ 7 => 'Standard Output Sensitivity, Recommended Exposure Index and ISO Speed',
1468
+ },
1469
+ },
1470
+ 0x8831 => 'StandardOutputSensitivity', #24
1471
+ 0x8832 => 'RecommendedExposureIndex', #24
1472
+ 0x8833 => 'ISOSpeed', #24
1473
+ 0x8834 => { #24
1474
+ Name => 'ISOSpeedLatitudeyyy',
1475
+ Description => 'ISO Speed Latitude yyy',
1476
+ },
1477
+ 0x8835 => { #24
1478
+ Name => 'ISOSpeedLatitudezzz',
1479
+ Description => 'ISO Speed Latitude zzz',
1480
+ },
1481
+ 0x885c => 'FaxRecvParams', #9
1482
+ 0x885d => 'FaxSubAddress', #9
1483
+ 0x885e => 'FaxRecvTime', #9
1484
+ 0x888a => { #PH
1485
+ Name => 'LeafSubIFD',
1486
+ Format => 'int32u', # Leaf incorrectly uses 'undef' format!
1487
+ Groups => { 1 => 'LeafSubIFD' },
1488
+ Flags => 'SubIFD',
1489
+ SubDirectory => {
1490
+ TagTable => 'Image::ExifTool::Leaf::SubIFD',
1491
+ Start => '$val',
1492
+ },
1493
+ },
1494
+ 0x9000 => {
1495
+ Name => 'ExifVersion',
1496
+ RawConv => '$val=~s/\0+$//; $val', # (some idiots add null terminators)
1497
+ },
1498
+ 0x9003 => {
1499
+ Name => 'DateTimeOriginal',
1500
+ Description => 'Date/Time Original',
1501
+ Groups => { 2 => 'Time' },
1502
+ Notes => 'date/time when original image was taken',
1503
+ PrintConv => '$self->ConvertDateTime($val)',
1504
+ },
1505
+ 0x9004 => {
1506
+ Name => 'CreateDate',
1507
+ Groups => { 2 => 'Time' },
1508
+ Notes => 'called DateTimeDigitized by the EXIF spec.',
1509
+ PrintConv => '$self->ConvertDateTime($val)',
1510
+ },
1511
+ 0x9101 => {
1512
+ Name => 'ComponentsConfiguration',
1513
+ Format => 'int8u',
1514
+ PrintConvColumns => 2,
1515
+ PrintConv => {
1516
+ 0 => '-',
1517
+ 1 => 'Y',
1518
+ 2 => 'Cb',
1519
+ 3 => 'Cr',
1520
+ 4 => 'R',
1521
+ 5 => 'G',
1522
+ 6 => 'B',
1523
+ OTHER => sub {
1524
+ my ($val, $inv, $conv) = @_;
1525
+ my @a = split /,?\s+/, $val;
1526
+ if ($inv) {
1527
+ my %invConv;
1528
+ $invConv{lc $$conv{$_}} = $_ foreach keys %$conv;
1529
+ # strings like "YCbCr" and "RGB" still work for writing
1530
+ @a = $a[0] =~ /(Y|Cb|Cr|R|G|B)/g if @a == 1;
1531
+ foreach (@a) {
1532
+ $_ = $invConv{lc $_};
1533
+ return undef unless defined $_;
1534
+ }
1535
+ push @a, 0 while @a < 4;
1536
+ } else {
1537
+ foreach (@a) {
1538
+ $_ = $$conv{$_} || "Err ($_)";
1539
+ }
1540
+ }
1541
+ return join ', ', @a;
1542
+ },
1543
+ },
1544
+ },
1545
+ 0x9102 => 'CompressedBitsPerPixel',
1546
+ 0x9201 => {
1547
+ Name => 'ShutterSpeedValue',
1548
+ Notes => 'displayed in seconds, but stored as an APEX value',
1549
+ Format => 'rational64s', # Leica M8 patch (incorrectly written as rational64u)
1550
+ ValueConv => 'abs($val)<100 ? 2**(-$val) : 0',
1551
+ PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
1552
+ },
1553
+ 0x9202 => {
1554
+ Name => 'ApertureValue',
1555
+ Notes => 'displayed as an F number, but stored as an APEX value',
1556
+ ValueConv => '2 ** ($val / 2)',
1557
+ PrintConv => 'sprintf("%.1f",$val)',
1558
+ },
1559
+ # Wikipedia: BrightnessValue = Bv = Av + Tv - Sv
1560
+ # ExifTool: LightValue = LV = Av + Tv - Sv + 5 (5 is the Sv for ISO 100 in Exif usage)
1561
+ 0x9203 => 'BrightnessValue',
1562
+ 0x9204 => {
1563
+ Name => 'ExposureCompensation',
1564
+ Format => 'rational64s', # Leica M8 patch (incorrectly written as rational64u)
1565
+ Notes => 'called ExposureBiasValue by the EXIF spec.',
1566
+ PrintConv => 'Image::ExifTool::Exif::PrintFraction($val)',
1567
+ },
1568
+ 0x9205 => {
1569
+ Name => 'MaxApertureValue',
1570
+ Notes => 'displayed as an F number, but stored as an APEX value',
1571
+ Groups => { 2 => 'Camera' },
1572
+ ValueConv => '2 ** ($val / 2)',
1573
+ PrintConv => 'sprintf("%.1f",$val)',
1574
+ },
1575
+ 0x9206 => {
1576
+ Name => 'SubjectDistance',
1577
+ Groups => { 2 => 'Camera' },
1578
+ PrintConv => '$val =~ /^(inf|undef)$/ ? $val : "${val} m"',
1579
+ },
1580
+ 0x9207 => {
1581
+ Name => 'MeteringMode',
1582
+ Groups => { 2 => 'Camera' },
1583
+ PrintConv => {
1584
+ 0 => 'Unknown',
1585
+ 1 => 'Average',
1586
+ 2 => 'Center-weighted average',
1587
+ 3 => 'Spot',
1588
+ 4 => 'Multi-spot',
1589
+ 5 => 'Multi-segment',
1590
+ 6 => 'Partial',
1591
+ 255 => 'Other',
1592
+ },
1593
+ },
1594
+ 0x9208 => {
1595
+ Name => 'LightSource',
1596
+ Groups => { 2 => 'Camera' },
1597
+ SeparateTable => 'LightSource',
1598
+ PrintConv => \%lightSource,
1599
+ },
1600
+ 0x9209 => {
1601
+ Name => 'Flash',
1602
+ Groups => { 2 => 'Camera' },
1603
+ Flags => 'PrintHex',
1604
+ SeparateTable => 'Flash',
1605
+ PrintConv => \%flash,
1606
+ },
1607
+ 0x920a => {
1608
+ Name => 'FocalLength',
1609
+ Groups => { 2 => 'Camera' },
1610
+ PrintConv => 'sprintf("%.1f mm",$val)',
1611
+ },
1612
+ # Note: tags 0x920b-0x9217 are duplicates of 0xa20b-0xa217
1613
+ # (The TIFF standard uses 0xa2xx, but you'll find both in images)
1614
+ 0x920b => { #12
1615
+ Name => 'FlashEnergy',
1616
+ Groups => { 2 => 'Camera' },
1617
+ },
1618
+ 0x920c => 'SpatialFrequencyResponse', #12 (not in Fuji images - PH)
1619
+ 0x920d => 'Noise', #12
1620
+ 0x920e => 'FocalPlaneXResolution', #12
1621
+ 0x920f => 'FocalPlaneYResolution', #12
1622
+ 0x9210 => { #12
1623
+ Name => 'FocalPlaneResolutionUnit',
1624
+ Groups => { 2 => 'Camera' },
1625
+ PrintConv => {
1626
+ 1 => 'None',
1627
+ 2 => 'inches',
1628
+ 3 => 'cm',
1629
+ 4 => 'mm',
1630
+ 5 => 'um',
1631
+ },
1632
+ },
1633
+ 0x9211 => 'ImageNumber', #12
1634
+ 0x9212 => { #12
1635
+ Name => 'SecurityClassification',
1636
+ PrintConv => {
1637
+ T => 'Top Secret',
1638
+ S => 'Secret',
1639
+ C => 'Confidential',
1640
+ R => 'Restricted',
1641
+ U => 'Unclassified',
1642
+ },
1643
+ },
1644
+ 0x9213 => 'ImageHistory', #12
1645
+ 0x9214 => {
1646
+ Name => 'SubjectArea',
1647
+ Groups => { 2 => 'Camera' },
1648
+ },
1649
+ 0x9215 => 'ExposureIndex', #12
1650
+ 0x9216 => 'TIFF-EPStandardID', #12
1651
+ 0x9217 => { #12
1652
+ Name => 'SensingMethod',
1653
+ Groups => { 2 => 'Camera' },
1654
+ Notes => 'values 1 and 6 are not standard EXIF',
1655
+ PrintConv => {
1656
+ 1 => 'Monochrome area', #12 (not standard EXIF)
1657
+ 2 => 'One-chip color area',
1658
+ 3 => 'Two-chip color area',
1659
+ 4 => 'Three-chip color area',
1660
+ 5 => 'Color sequential area',
1661
+ 6 => 'Monochrome linear', #12 (not standard EXIF)
1662
+ 7 => 'Trilinear',
1663
+ 8 => 'Color sequential linear',
1664
+ },
1665
+ },
1666
+ 0x923a => 'CIP3DataFile', #20
1667
+ 0x923b => 'CIP3Sheet', #20
1668
+ 0x923c => 'CIP3Side', #20
1669
+ 0x923f => 'StoNits', #9
1670
+ # handle maker notes as a conditional list
1671
+ 0x927c => \@Image::ExifTool::MakerNotes::Main,
1672
+ 0x9286 => {
1673
+ Name => 'UserComment',
1674
+ # may consider forcing a Format of 'undef' for this tag because I have
1675
+ # seen other applications write it incorrectly as 'string' or 'int8u'
1676
+ RawConv => 'Image::ExifTool::Exif::ConvertExifText($self,$val,1)',
1677
+ },
1678
+ 0x9290 => {
1679
+ Name => 'SubSecTime',
1680
+ Groups => { 2 => 'Time' },
1681
+ ValueConv => '$val=~s/ +$//; $val', # trim trailing blanks
1682
+ },
1683
+ 0x9291 => {
1684
+ Name => 'SubSecTimeOriginal',
1685
+ Groups => { 2 => 'Time' },
1686
+ ValueConv => '$val=~s/ +$//; $val', # trim trailing blanks
1687
+ },
1688
+ 0x9292 => {
1689
+ Name => 'SubSecTimeDigitized',
1690
+ Groups => { 2 => 'Time' },
1691
+ ValueConv => '$val=~s/ +$//; $val', # trim trailing blanks
1692
+ },
1693
+ # The following 3 tags are found in MSOffice TIFF images
1694
+ # References:
1695
+ # http://social.msdn.microsoft.com/Forums/en-US/os_standocs/thread/03086d55-294a-49d5-967a-5303d34c40f8/
1696
+ # http://blogs.msdn.com/openspecification/archive/2009/12/08/details-of-three-tiff-tag-extensions-that-microsoft-office-document-imaging-modi-software-may-write-into-the-tiff-files-it-generates.aspx
1697
+ # http://www.microsoft.com/downloads/details.aspx?FamilyID=0dbc435d-3544-4f4b-9092-2f2643d64a39&displaylang=en#filelist
1698
+ 0x932f => 'MSDocumentText',
1699
+ 0x9330 => {
1700
+ Name => 'MSPropertySetStorage',
1701
+ Binary => 1,
1702
+ },
1703
+ 0x9331 => {
1704
+ Name => 'MSDocumentTextPosition',
1705
+ Binary => 1, # (just in case -- don't know what format this is)
1706
+ },
1707
+ 0x935c => { #3/19
1708
+ Name => 'ImageSourceData',
1709
+ Binary => 1,
1710
+ },
1711
+ 0x9c9b => {
1712
+ Name => 'XPTitle',
1713
+ Format => 'undef',
1714
+ ValueConv => '$self->Decode($val,"UCS2","II")',
1715
+ },
1716
+ 0x9c9c => {
1717
+ Name => 'XPComment',
1718
+ Format => 'undef',
1719
+ ValueConv => '$self->Decode($val,"UCS2","II")',
1720
+ },
1721
+ 0x9c9d => {
1722
+ Name => 'XPAuthor',
1723
+ Groups => { 2 => 'Author' },
1724
+ Format => 'undef',
1725
+ ValueConv => '$self->Decode($val,"UCS2","II")',
1726
+ },
1727
+ 0x9c9e => {
1728
+ Name => 'XPKeywords',
1729
+ Format => 'undef',
1730
+ ValueConv => '$self->Decode($val,"UCS2","II")',
1731
+ },
1732
+ 0x9c9f => {
1733
+ Name => 'XPSubject',
1734
+ Format => 'undef',
1735
+ ValueConv => '$self->Decode($val,"UCS2","II")',
1736
+ },
1737
+ 0xa000 => {
1738
+ Name => 'FlashpixVersion',
1739
+ RawConv => '$val=~s/\0+$//; $val', # (some idiots add null terminators)
1740
+ },
1741
+ 0xa001 => {
1742
+ Name => 'ColorSpace',
1743
+ Notes => q{
1744
+ the value of 0x2 is not standard EXIF. Instead, an Adobe RGB image is
1745
+ indicated by "Uncalibrated" with an InteropIndex of "R03". The values
1746
+ 0xfffd and 0xfffe are also non-standard, and are used by some Sony cameras
1747
+ },
1748
+ PrintHex => 1,
1749
+ PrintConv => {
1750
+ 1 => 'sRGB',
1751
+ 2 => 'Adobe RGB',
1752
+ 0xffff => 'Uncalibrated',
1753
+ # Sony uses these definitions: (ref JD)
1754
+ # 0xffff => 'Adobe RGB', (conflicts with Uncalibrated)
1755
+ 0xfffe => 'ICC Profile',
1756
+ 0xfffd => 'Wide Gamut RGB',
1757
+ },
1758
+ },
1759
+ 0xa002 => {
1760
+ Name => 'ExifImageWidth',
1761
+ Notes => 'called PixelXDimension by the EXIF spec.',
1762
+ },
1763
+ 0xa003 => {
1764
+ Name => 'ExifImageHeight',
1765
+ Notes => 'called PixelYDimension by the EXIF spec.',
1766
+ },
1767
+ 0xa004 => 'RelatedSoundFile',
1768
+ 0xa005 => {
1769
+ Name => 'InteropOffset',
1770
+ Groups => { 1 => 'InteropIFD' },
1771
+ Flags => 'SubIFD',
1772
+ Description => 'Interoperability Offset',
1773
+ SubDirectory => {
1774
+ DirName => 'InteropIFD',
1775
+ Start => '$val',
1776
+ },
1777
+ },
1778
+ 0xa20b => {
1779
+ Name => 'FlashEnergy',
1780
+ Groups => { 2 => 'Camera' },
1781
+ },
1782
+ 0xa20c => {
1783
+ Name => 'SpatialFrequencyResponse',
1784
+ PrintConv => 'Image::ExifTool::Exif::PrintSFR($val)',
1785
+ },
1786
+ 0xa20d => 'Noise',
1787
+ 0xa20e => { Name => 'FocalPlaneXResolution', Groups => { 2 => 'Camera' } },
1788
+ 0xa20f => { Name => 'FocalPlaneYResolution', Groups => { 2 => 'Camera' } },
1789
+ 0xa210 => {
1790
+ Name => 'FocalPlaneResolutionUnit',
1791
+ Groups => { 2 => 'Camera' },
1792
+ Notes => 'values 1, 4 and 5 are not standard EXIF',
1793
+ PrintConv => {
1794
+ 1 => 'None', # (not standard EXIF)
1795
+ 2 => 'inches',
1796
+ 3 => 'cm',
1797
+ 4 => 'mm', # (not standard EXIF)
1798
+ 5 => 'um', # (not standard EXIF)
1799
+ },
1800
+ },
1801
+ 0xa211 => 'ImageNumber',
1802
+ 0xa212 => 'SecurityClassification',
1803
+ 0xa213 => 'ImageHistory',
1804
+ 0xa214 => {
1805
+ Name => 'SubjectLocation',
1806
+ Groups => { 2 => 'Camera' },
1807
+ },
1808
+ 0xa215 => 'ExposureIndex',
1809
+ 0xa216 => 'TIFF-EPStandardID',
1810
+ 0xa217 => {
1811
+ Name => 'SensingMethod',
1812
+ Groups => { 2 => 'Camera' },
1813
+ PrintConv => {
1814
+ 1 => 'Not defined',
1815
+ 2 => 'One-chip color area',
1816
+ 3 => 'Two-chip color area',
1817
+ 4 => 'Three-chip color area',
1818
+ 5 => 'Color sequential area',
1819
+ 7 => 'Trilinear',
1820
+ 8 => 'Color sequential linear',
1821
+ },
1822
+ },
1823
+ 0xa300 => {
1824
+ Name => 'FileSource',
1825
+ PrintConv => {
1826
+ 1 => 'Film Scanner',
1827
+ 2 => 'Reflection Print Scanner',
1828
+ 3 => 'Digital Camera',
1829
+ # handle the case where Sigma incorrectly gives this tag a count of 4
1830
+ "\3\0\0\0" => 'Sigma Digital Camera',
1831
+ },
1832
+ },
1833
+ 0xa301 => {
1834
+ Name => 'SceneType',
1835
+ PrintConv => {
1836
+ 1 => 'Directly photographed',
1837
+ },
1838
+ },
1839
+ 0xa302 => {
1840
+ Name => 'CFAPattern',
1841
+ RawConv => 'Image::ExifTool::Exif::DecodeCFAPattern($self, $val)',
1842
+ PrintConv => 'Image::ExifTool::Exif::PrintCFAPattern($val)',
1843
+ },
1844
+ 0xa401 => {
1845
+ Name => 'CustomRendered',
1846
+ PrintConv => {
1847
+ 0 => 'Normal',
1848
+ 1 => 'Custom',
1849
+ },
1850
+ },
1851
+ 0xa402 => {
1852
+ Name => 'ExposureMode',
1853
+ Groups => { 2 => 'Camera' },
1854
+ PrintConv => {
1855
+ 0 => 'Auto',
1856
+ 1 => 'Manual',
1857
+ 2 => 'Auto bracket',
1858
+ # have seen 3 from Samsung EX1 and NX200 - PH
1859
+ },
1860
+ },
1861
+ 0xa403 => {
1862
+ Name => 'WhiteBalance',
1863
+ Groups => { 2 => 'Camera' },
1864
+ # set Priority to zero to keep this WhiteBalance from overriding the
1865
+ # MakerNotes WhiteBalance, since the MakerNotes WhiteBalance and is more
1866
+ # accurate and contains more information (if it exists)
1867
+ Priority => 0,
1868
+ PrintConv => {
1869
+ 0 => 'Auto',
1870
+ 1 => 'Manual',
1871
+ },
1872
+ },
1873
+ 0xa404 => {
1874
+ Name => 'DigitalZoomRatio',
1875
+ Groups => { 2 => 'Camera' },
1876
+ },
1877
+ 0xa405 => {
1878
+ Name => 'FocalLengthIn35mmFormat',
1879
+ Notes => 'called FocalLengthIn35mmFilm by the EXIF spec.',
1880
+ Groups => { 2 => 'Camera' },
1881
+ PrintConv => '"$val mm"',
1882
+ },
1883
+ 0xa406 => {
1884
+ Name => 'SceneCaptureType',
1885
+ Groups => { 2 => 'Camera' },
1886
+ PrintConv => {
1887
+ 0 => 'Standard',
1888
+ 1 => 'Landscape',
1889
+ 2 => 'Portrait',
1890
+ 3 => 'Night',
1891
+ },
1892
+ },
1893
+ 0xa407 => {
1894
+ Name => 'GainControl',
1895
+ Groups => { 2 => 'Camera' },
1896
+ PrintConv => {
1897
+ 0 => 'None',
1898
+ 1 => 'Low gain up',
1899
+ 2 => 'High gain up',
1900
+ 3 => 'Low gain down',
1901
+ 4 => 'High gain down',
1902
+ },
1903
+ },
1904
+ 0xa408 => {
1905
+ Name => 'Contrast',
1906
+ Groups => { 2 => 'Camera' },
1907
+ PrintConv => {
1908
+ 0 => 'Normal',
1909
+ 1 => 'Low',
1910
+ 2 => 'High',
1911
+ },
1912
+ },
1913
+ 0xa409 => {
1914
+ Name => 'Saturation',
1915
+ Groups => { 2 => 'Camera' },
1916
+ PrintConv => {
1917
+ 0 => 'Normal',
1918
+ 1 => 'Low',
1919
+ 2 => 'High',
1920
+ },
1921
+ },
1922
+ 0xa40a => {
1923
+ Name => 'Sharpness',
1924
+ Groups => { 2 => 'Camera' },
1925
+ PrintConv => {
1926
+ 0 => 'Normal',
1927
+ 1 => 'Soft',
1928
+ 2 => 'Hard',
1929
+ },
1930
+ },
1931
+ 0xa40b => {
1932
+ Name => 'DeviceSettingDescription',
1933
+ Groups => { 2 => 'Camera' },
1934
+ Binary => 1,
1935
+ },
1936
+ 0xa40c => {
1937
+ Name => 'SubjectDistanceRange',
1938
+ Groups => { 2 => 'Camera' },
1939
+ PrintConv => {
1940
+ 0 => 'Unknown',
1941
+ 1 => 'Macro',
1942
+ 2 => 'Close',
1943
+ 3 => 'Distant',
1944
+ },
1945
+ },
1946
+ # 0xa40d - int16u: 0 (GE E1486 TW)
1947
+ # 0xa40e - int16u: 1 (GE E1486 TW)
1948
+ 0xa420 => 'ImageUniqueID',
1949
+ 0xa430 => { #24
1950
+ Name => 'OwnerName',
1951
+ Notes => 'called CameraOwnerName by the EXIF spec.',
1952
+ },
1953
+ 0xa431 => { #24
1954
+ Name => 'SerialNumber',
1955
+ Notes => 'called BodySerialNumber by the EXIF spec.',
1956
+ },
1957
+ 0xa432 => { #24
1958
+ Name => 'LensInfo',
1959
+ Notes => q{
1960
+ 4 rational values giving focal and aperture ranges, called LensSpecification
1961
+ by the EXIF spec.
1962
+ },
1963
+ # convert to the form "12-20mm f/3.8-4.5" or "50mm f/1.4"
1964
+ PrintConv => \&Image::ExifTool::Exif::PrintLensInfo,
1965
+ },
1966
+ 0xa433 => 'LensMake', #24
1967
+ 0xa434 => 'LensModel', #24
1968
+ 0xa435 => 'LensSerialNumber', #24
1969
+ 0xa480 => 'GDALMetadata', #3
1970
+ 0xa481 => 'GDALNoData', #3
1971
+ 0xa500 => 'Gamma',
1972
+ 0xafc0 => 'ExpandSoftware', #JD (Opanda)
1973
+ 0xafc1 => 'ExpandLens', #JD (Opanda)
1974
+ 0xafc2 => 'ExpandFilm', #JD (Opanda)
1975
+ 0xafc3 => 'ExpandFilterLens', #JD (Opanda)
1976
+ 0xafc4 => 'ExpandScanner', #JD (Opanda)
1977
+ 0xafc5 => 'ExpandFlashLamp', #JD (Opanda)
1978
+ #
1979
+ # Windows Media Photo / HD Photo (WDP/HDP) tags
1980
+ #
1981
+ 0xbc01 => { #13
1982
+ Name => 'PixelFormat',
1983
+ PrintHex => 1,
1984
+ Format => 'undef',
1985
+ Notes => q{
1986
+ tags 0xbc** are used in Windows HD Photo (HDP and WDP) images. The actual
1987
+ PixelFormat values are 16-byte GUID's but the leading 15 bytes,
1988
+ '6fddc324-4e03-4bfe-b1853-d77768dc9', have been removed below to avoid
1989
+ unnecessary clutter
1990
+ },
1991
+ ValueConv => q{
1992
+ require Image::ExifTool::ASF;
1993
+ $val = Image::ExifTool::ASF::GetGUID($val);
1994
+ # GUID's are too long, so remove redundant information
1995
+ $val =~ s/^6fddc324-4e03-4bfe-b185-3d77768dc9//i and $val = hex($val);
1996
+ return $val;
1997
+ },
1998
+ PrintConv => {
1999
+ 0x0d => '24-bit RGB',
2000
+ 0x0c => '24-bit BGR',
2001
+ 0x0e => '32-bit BGR',
2002
+ 0x15 => '48-bit RGB',
2003
+ 0x12 => '48-bit RGB Fixed Point',
2004
+ 0x3b => '48-bit RGB Half',
2005
+ 0x18 => '96-bit RGB Fixed Point',
2006
+ 0x1b => '128-bit RGB Float',
2007
+ 0x0f => '32-bit BGRA',
2008
+ 0x16 => '64-bit RGBA',
2009
+ 0x1d => '64-bit RGBA Fixed Point',
2010
+ 0x3a => '64-bit RGBA Half',
2011
+ 0x1e => '128-bit RGBA Fixed Point',
2012
+ 0x19 => '128-bit RGBA Float',
2013
+ 0x10 => '32-bit PBGRA',
2014
+ 0x17 => '64-bit PRGBA',
2015
+ 0x1a => '128-bit PRGBA Float',
2016
+ 0x1c => '32-bit CMYK',
2017
+ 0x2c => '40-bit CMYK Alpha',
2018
+ 0x1f => '64-bit CMYK',
2019
+ 0x2d => '80-bit CMYK Alpha',
2020
+ 0x20 => '24-bit 3 Channels',
2021
+ 0x21 => '32-bit 4 Channels',
2022
+ 0x22 => '40-bit 5 Channels',
2023
+ 0x23 => '48-bit 6 Channels',
2024
+ 0x24 => '56-bit 7 Channels',
2025
+ 0x25 => '64-bit 8 Channels',
2026
+ 0x2e => '32-bit 3 Channels Alpha',
2027
+ 0x2f => '40-bit 4 Channels Alpha',
2028
+ 0x30 => '48-bit 5 Channels Alpha',
2029
+ 0x31 => '56-bit 6 Channels Alpha',
2030
+ 0x32 => '64-bit 7 Channels Alpha',
2031
+ 0x33 => '72-bit 8 Channels Alpha',
2032
+ 0x26 => '48-bit 3 Channels',
2033
+ 0x27 => '64-bit 4 Channels',
2034
+ 0x28 => '80-bit 5 Channels',
2035
+ 0x29 => '96-bit 6 Channels',
2036
+ 0x2a => '112-bit 7 Channels',
2037
+ 0x2b => '128-bit 8 Channels',
2038
+ 0x34 => '64-bit 3 Channels Alpha',
2039
+ 0x35 => '80-bit 4 Channels Alpha',
2040
+ 0x36 => '96-bit 5 Channels Alpha',
2041
+ 0x37 => '112-bit 6 Channels Alpha',
2042
+ 0x38 => '128-bit 7 Channels Alpha',
2043
+ 0x39 => '144-bit 8 Channels Alpha',
2044
+ 0x08 => '8-bit Gray',
2045
+ 0x0b => '16-bit Gray',
2046
+ 0x13 => '16-bit Gray Fixed Point',
2047
+ 0x3e => '16-bit Gray Half',
2048
+ 0x3f => '32-bit Gray Fixed Point',
2049
+ 0x11 => '32-bit Gray Float',
2050
+ 0x05 => 'Black & White',
2051
+ 0x09 => '16-bit BGR555',
2052
+ 0x0a => '16-bit BGR565',
2053
+ 0x13 => '32-bit BGR101010',
2054
+ 0x3d => '32-bit RGBE',
2055
+ },
2056
+ },
2057
+ 0xbc02 => { #13
2058
+ Name => 'Transformation',
2059
+ PrintConv => {
2060
+ 0 => 'Horizontal (normal)',
2061
+ 1 => 'Mirror vertical',
2062
+ 2 => 'Mirror horizontal',
2063
+ 3 => 'Rotate 180',
2064
+ 4 => 'Rotate 90 CW',
2065
+ 5 => 'Mirror horizontal and rotate 90 CW',
2066
+ 6 => 'Mirror horizontal and rotate 270 CW',
2067
+ 7 => 'Rotate 270 CW',
2068
+ },
2069
+ },
2070
+ 0xbc03 => { #13
2071
+ Name => 'Uncompressed',
2072
+ PrintConv => { 0 => 'No', 1 => 'Yes' },
2073
+ },
2074
+ 0xbc04 => { #13
2075
+ Name => 'ImageType',
2076
+ PrintConv => { BITMASK => {
2077
+ 0 => 'Preview',
2078
+ 1 => 'Page',
2079
+ } },
2080
+ },
2081
+ 0xbc80 => 'ImageWidth', #13
2082
+ 0xbc81 => 'ImageHeight', #13
2083
+ 0xbc82 => 'WidthResolution', #13
2084
+ 0xbc83 => 'HeightResolution', #13
2085
+ 0xbcc0 => { #13
2086
+ Name => 'ImageOffset',
2087
+ IsOffset => 1,
2088
+ OffsetPair => 0xbcc1, # point to associated byte count
2089
+ },
2090
+ 0xbcc1 => { #13
2091
+ Name => 'ImageByteCount',
2092
+ OffsetPair => 0xbcc0, # point to associated offset
2093
+ },
2094
+ 0xbcc2 => { #13
2095
+ Name => 'AlphaOffset',
2096
+ IsOffset => 1,
2097
+ OffsetPair => 0xbcc3, # point to associated byte count
2098
+ },
2099
+ 0xbcc3 => { #13
2100
+ Name => 'AlphaByteCount',
2101
+ OffsetPair => 0xbcc2, # point to associated offset
2102
+ },
2103
+ 0xbcc4 => { #13
2104
+ Name => 'ImageDataDiscard',
2105
+ PrintConv => {
2106
+ 0 => 'Full Resolution',
2107
+ 1 => 'Flexbits Discarded',
2108
+ 2 => 'HighPass Frequency Data Discarded',
2109
+ 3 => 'Highpass and LowPass Frequency Data Discarded',
2110
+ },
2111
+ },
2112
+ 0xbcc5 => { #13
2113
+ Name => 'AlphaDataDiscard',
2114
+ PrintConv => {
2115
+ 0 => 'Full Resolution',
2116
+ 1 => 'Flexbits Discarded',
2117
+ 2 => 'HighPass Frequency Data Discarded',
2118
+ 3 => 'Highpass and LowPass Frequency Data Discarded',
2119
+ },
2120
+ },
2121
+ #
2122
+ 0xc427 => 'OceScanjobDesc', #3
2123
+ 0xc428 => 'OceApplicationSelector', #3
2124
+ 0xc429 => 'OceIDNumber', #3
2125
+ 0xc42a => 'OceImageLogic', #3
2126
+ 0xc44f => { Name => 'Annotations', Binary => 1 }, #7/19
2127
+ 0xc4a5 => {
2128
+ Name => 'PrintIM', # (writable directory!)
2129
+ # must set Writable here so this tag will be saved with MakerNotes option
2130
+ Writable => 'undef',
2131
+ WriteGroup => 'IFD0',
2132
+ # (don't make Binary/Protected because we can't copy individual PrintIM tags anyway)
2133
+ Description => 'Print Image Matching',
2134
+ SubDirectory => {
2135
+ TagTable => 'Image::ExifTool::PrintIM::Main',
2136
+ },
2137
+ PrintConvInv => '$val =~ /^PrintIM/ ? $val : undef', # quick validation
2138
+ },
2139
+ 0xc580 => { #20
2140
+ Name => 'USPTOOriginalContentType',
2141
+ PrintConv => {
2142
+ 0 => 'Text or Drawing',
2143
+ 1 => 'Grayscale',
2144
+ 2 => 'Color',
2145
+ },
2146
+ },
2147
+ #
2148
+ # DNG tags 0xc6XX and 0xc7XX (ref 2 unless otherwise stated)
2149
+ #
2150
+ 0xc612 => {
2151
+ Name => 'DNGVersion',
2152
+ Notes => 'tags 0xc612-0xc7b5 are used in DNG images unless otherwise noted',
2153
+ DataMember => 'DNGVersion',
2154
+ RawConv => '$$self{DNGVersion} = $val',
2155
+ PrintConv => '$val =~ tr/ /./; $val',
2156
+ },
2157
+ 0xc613 => {
2158
+ Name => 'DNGBackwardVersion',
2159
+ PrintConv => '$val =~ tr/ /./; $val',
2160
+ },
2161
+ 0xc614 => 'UniqueCameraModel',
2162
+ 0xc615 => {
2163
+ Name => 'LocalizedCameraModel',
2164
+ Format => 'string',
2165
+ PrintConv => '$self->Printable($val, 0)',
2166
+ },
2167
+ 0xc616 => {
2168
+ Name => 'CFAPlaneColor',
2169
+ PrintConv => q{
2170
+ my @cols = qw(Red Green Blue Cyan Magenta Yellow White);
2171
+ my @vals = map { $cols[$_] || "Unknown($_)" } split(' ', $val);
2172
+ return join(',', @vals);
2173
+ },
2174
+ },
2175
+ 0xc617 => {
2176
+ Name => 'CFALayout',
2177
+ PrintConv => {
2178
+ 1 => 'Rectangular',
2179
+ 2 => 'Even columns offset down 1/2 row',
2180
+ 3 => 'Even columns offset up 1/2 row',
2181
+ 4 => 'Even rows offset right 1/2 column',
2182
+ 5 => 'Even rows offset left 1/2 column',
2183
+ # the following are new for DNG 1.3:
2184
+ 6 => 'Even rows offset up by 1/2 row, even columns offset left by 1/2 column',
2185
+ 7 => 'Even rows offset up by 1/2 row, even columns offset right by 1/2 column',
2186
+ 8 => 'Even rows offset down by 1/2 row, even columns offset left by 1/2 column',
2187
+ 9 => 'Even rows offset down by 1/2 row, even columns offset right by 1/2 column',
2188
+ },
2189
+ },
2190
+ 0xc618 => { Name => 'LinearizationTable', Binary => 1 },
2191
+ 0xc619 => 'BlackLevelRepeatDim',
2192
+ 0xc61a => 'BlackLevel',
2193
+ 0xc61b => { Name => 'BlackLevelDeltaH', %longBin },
2194
+ 0xc61c => { Name => 'BlackLevelDeltaV', %longBin },
2195
+ 0xc61d => 'WhiteLevel',
2196
+ 0xc61e => 'DefaultScale',
2197
+ 0xc61f => 'DefaultCropOrigin',
2198
+ 0xc620 => 'DefaultCropSize',
2199
+ 0xc621 => 'ColorMatrix1',
2200
+ 0xc622 => 'ColorMatrix2',
2201
+ 0xc623 => 'CameraCalibration1',
2202
+ 0xc624 => 'CameraCalibration2',
2203
+ 0xc625 => 'ReductionMatrix1',
2204
+ 0xc626 => 'ReductionMatrix2',
2205
+ 0xc627 => 'AnalogBalance',
2206
+ 0xc628 => 'AsShotNeutral',
2207
+ 0xc629 => 'AsShotWhiteXY',
2208
+ 0xc62a => 'BaselineExposure',
2209
+ 0xc62b => 'BaselineNoise',
2210
+ 0xc62c => 'BaselineSharpness',
2211
+ 0xc62d => 'BayerGreenSplit',
2212
+ 0xc62e => 'LinearResponseLimit',
2213
+ 0xc62f => {
2214
+ Name => 'CameraSerialNumber',
2215
+ Groups => { 2 => 'Camera' },
2216
+ },
2217
+ 0xc630 => {
2218
+ Name => 'DNGLensInfo',
2219
+ Groups => { 2 => 'Camera' },
2220
+ PrintConv =>\&PrintLensInfo,
2221
+ },
2222
+ 0xc631 => 'ChromaBlurRadius',
2223
+ 0xc632 => 'AntiAliasStrength',
2224
+ 0xc633 => 'ShadowScale',
2225
+ 0xc634 => [
2226
+ {
2227
+ Condition => '$$self{TIFF_TYPE} =~ /^(ARW|SR2)$/',
2228
+ Name => 'SR2Private',
2229
+ Groups => { 1 => 'SR2' },
2230
+ Flags => 'SubIFD',
2231
+ Format => 'int32u',
2232
+ # some utilites have problems unless this is int8u format:
2233
+ # - Adobe Camera Raw 5.3 gives an error
2234
+ # - Apple Preview 10.5.8 gets the wrong white balance
2235
+ FixFormat => 'int8u', # (stupid Sony)
2236
+ SubDirectory => {
2237
+ DirName => 'SR2Private',
2238
+ TagTable => 'Image::ExifTool::Sony::SR2Private',
2239
+ Start => '$val',
2240
+ },
2241
+ },
2242
+ {
2243
+ Condition => '$$valPt =~ /^Adobe\0/',
2244
+ Name => 'DNGAdobeData',
2245
+ NestedHtmlDump => 1,
2246
+ SubDirectory => { TagTable => 'Image::ExifTool::DNG::AdobeData' },
2247
+ Format => 'undef', # written incorrectly as int8u (change to undef for speed)
2248
+ },
2249
+ {
2250
+ Condition => '$$valPt =~ /^(PENTAX |SAMSUNG)\0/',
2251
+ Name => 'MakerNotePentax',
2252
+ MakerNotes => 1, # (causes "MakerNotes header" to be identified in HtmlDump output)
2253
+ Binary => 1,
2254
+ # Note: Don't make this block-writable for a few reasons:
2255
+ # 1) It would be dangerous (possibly confusing Pentax software)
2256
+ # 2) It is a different format from the JPEG version of MakerNotePentax
2257
+ # 3) It is converted to JPEG format by RebuildMakerNotes() when copying
2258
+ SubDirectory => {
2259
+ TagTable => 'Image::ExifTool::Pentax::Main',
2260
+ Start => '$valuePtr + 10',
2261
+ Base => '$start - 10',
2262
+ ByteOrder => 'Unknown', # easier to do this than read byteorder word
2263
+ },
2264
+ Format => 'undef', # written incorrectly as int8u (change to undef for speed)
2265
+ },
2266
+ {
2267
+ Name => 'DNGPrivateData',
2268
+ Binary => 1,
2269
+ Format => 'undef',
2270
+ },
2271
+ ],
2272
+ 0xc635 => {
2273
+ Name => 'MakerNoteSafety',
2274
+ PrintConv => {
2275
+ 0 => 'Unsafe',
2276
+ 1 => 'Safe',
2277
+ },
2278
+ },
2279
+ 0xc640 => { #15
2280
+ Name => 'RawImageSegmentation',
2281
+ # (int16u[3], not writable)
2282
+ Notes => q{
2283
+ used in segmented Canon CR2 images. 3 numbers: 1. Number of segments minus
2284
+ one; 2. Pixel width of segments except last; 3. Pixel width of last segment
2285
+ },
2286
+ },
2287
+ 0xc65a => {
2288
+ Name => 'CalibrationIlluminant1',
2289
+ SeparateTable => 'LightSource',
2290
+ PrintConv => \%lightSource,
2291
+ },
2292
+ 0xc65b => {
2293
+ Name => 'CalibrationIlluminant2',
2294
+ SeparateTable => 'LightSource',
2295
+ PrintConv => \%lightSource,
2296
+ },
2297
+ 0xc65c => 'BestQualityScale',
2298
+ 0xc65d => {
2299
+ Name => 'RawDataUniqueID',
2300
+ Format => 'undef',
2301
+ ValueConv => 'uc(unpack("H*",$val))',
2302
+ },
2303
+ 0xc660 => { #3
2304
+ Name => 'AliasLayerMetadata',
2305
+ Notes => 'used by Alias Sketchbook Pro',
2306
+ },
2307
+ 0xc68b => {
2308
+ Name => 'OriginalRawFileName',
2309
+ Format => 'string', # sometimes written as int8u
2310
+ },
2311
+ 0xc68c => {
2312
+ Name => 'OriginalRawFileData', # (writable directory!)
2313
+ Writable => 'undef', # must be defined here so tag will be extracted if specified
2314
+ WriteGroup => 'IFD0',
2315
+ Flags => [ 'Binary', 'Protected' ],
2316
+ SubDirectory => {
2317
+ TagTable => 'Image::ExifTool::DNG::OriginalRaw',
2318
+ },
2319
+ },
2320
+ 0xc68d => 'ActiveArea',
2321
+ 0xc68e => 'MaskedAreas',
2322
+ 0xc68f => {
2323
+ Name => 'AsShotICCProfile',
2324
+ Binary => 1,
2325
+ Writable => 'undef', # must be defined here so tag will be extracted if specified
2326
+ SubDirectory => {
2327
+ DirName => 'AsShotICCProfile',
2328
+ TagTable => 'Image::ExifTool::ICC_Profile::Main',
2329
+ },
2330
+ },
2331
+ 0xc690 => 'AsShotPreProfileMatrix',
2332
+ 0xc691 => {
2333
+ Name => 'CurrentICCProfile',
2334
+ Binary => 1,
2335
+ Writable => 'undef', # must be defined here so tag will be extracted if specified
2336
+ SubDirectory => {
2337
+ DirName => 'CurrentICCProfile',
2338
+ TagTable => 'Image::ExifTool::ICC_Profile::Main',
2339
+ },
2340
+ },
2341
+ 0xc692 => 'CurrentPreProfileMatrix',
2342
+ 0xc6bf => 'ColorimetricReference',
2343
+ 0xc6d2 => { #JD (Panasonic DMC-TZ5)
2344
+ # this text is UTF-8 encoded (hooray!) - PH (TZ5)
2345
+ Name => 'PanasonicTitle',
2346
+ Format => 'string', # written incorrectly as 'undef'
2347
+ Notes => 'proprietary Panasonic tag used for baby/pet name, etc',
2348
+ # panasonic always records this tag (64 zero bytes),
2349
+ # so ignore it unless it contains valid information
2350
+ RawConv => 'length($val) ? $val : undef',
2351
+ ValueConv => '$self->Decode($val, "UTF8")',
2352
+ },
2353
+ 0xc6d3 => { #PH (Panasonic DMC-FS7)
2354
+ Name => 'PanasonicTitle2',
2355
+ Format => 'string', # written incorrectly as 'undef'
2356
+ Notes => 'proprietary Panasonic tag used for baby/pet name with age',
2357
+ # panasonic always records this tag (128 zero bytes),
2358
+ # so ignore it unless it contains valid information
2359
+ RawConv => 'length($val) ? $val : undef',
2360
+ ValueConv => '$self->Decode($val, "UTF8")',
2361
+ },
2362
+ 0xc6f3 => 'CameraCalibrationSig',
2363
+ 0xc6f4 => 'ProfileCalibrationSig',
2364
+ 0xc6f5 => {
2365
+ Name => 'ProfileIFD', # (ExtraCameraProfiles)
2366
+ Groups => { 1 => 'ProfileIFD' },
2367
+ Flags => 'SubIFD',
2368
+ SubDirectory => {
2369
+ ProcessProc => \&ProcessTiffIFD,
2370
+ WriteProc => \&ProcessTiffIFD,
2371
+ DirName => 'ProfileIFD',
2372
+ Start => '$val',
2373
+ Base => '$start', # offsets relative to start of TIFF-like header
2374
+ MaxSubdirs => 10,
2375
+ Magic => 0x4352, # magic number for TIFF-like header
2376
+ },
2377
+ },
2378
+ 0xc6f6 => 'AsShotProfileName',
2379
+ 0xc6f7 => 'NoiseReductionApplied',
2380
+ 0xc6f8 => 'ProfileName',
2381
+ 0xc6f9 => 'ProfileHueSatMapDims',
2382
+ 0xc6fa => { Name => 'ProfileHueSatMapData1', %longBin },
2383
+ 0xc6fb => { Name => 'ProfileHueSatMapData2', %longBin },
2384
+ 0xc6fc => {
2385
+ Name => 'ProfileToneCurve',
2386
+ Binary => 1,
2387
+ },
2388
+ 0xc6fd => {
2389
+ Name => 'ProfileEmbedPolicy',
2390
+ PrintConv => {
2391
+ 0 => 'Allow Copying',
2392
+ 1 => 'Embed if Used',
2393
+ 2 => 'Never Embed',
2394
+ 3 => 'No Restrictions',
2395
+ },
2396
+ },
2397
+ 0xc6fe => 'ProfileCopyright',
2398
+ 0xc714 => 'ForwardMatrix1',
2399
+ 0xc715 => 'ForwardMatrix2',
2400
+ 0xc716 => 'PreviewApplicationName',
2401
+ 0xc717 => 'PreviewApplicationVersion',
2402
+ 0xc718 => 'PreviewSettingsName',
2403
+ 0xc719 => {
2404
+ Name => 'PreviewSettingsDigest',
2405
+ Format => 'undef',
2406
+ ValueConv => 'unpack("H*", $val)',
2407
+ },
2408
+ 0xc71a => 'PreviewColorSpace',
2409
+ 0xc71b => {
2410
+ Name => 'PreviewDateTime',
2411
+ Groups => { 2 => 'Time' },
2412
+ ValueConv => q{
2413
+ require Image::ExifTool::XMP;
2414
+ return Image::ExifTool::XMP::ConvertXMPDate($val);
2415
+ },
2416
+ },
2417
+ 0xc71c => {
2418
+ Name => 'RawImageDigest',
2419
+ Format => 'undef',
2420
+ ValueConv => 'unpack("H*", $val)',
2421
+ },
2422
+ 0xc71d => {
2423
+ Name => 'OriginalRawFileDigest',
2424
+ Format => 'undef',
2425
+ ValueConv => 'unpack("H*", $val)',
2426
+ },
2427
+ 0xc71e => 'SubTileBlockSize',
2428
+ 0xc71f => 'RowInterleaveFactor',
2429
+ 0xc725 => 'ProfileLookTableDims',
2430
+ 0xc726 => {
2431
+ Name => 'ProfileLookTableData',
2432
+ Binary => 1,
2433
+ },
2434
+ 0xc740 => { # DNG 1.3
2435
+ Name => 'OpcodeList1',
2436
+ Binary => 1,
2437
+ # opcodes:
2438
+ # 1 => 'WarpRectilinear',
2439
+ # 2 => 'WarpFisheye',
2440
+ # 3 => 'FixVignetteRadial',
2441
+ # 4 => 'FixBadPixelsConstant',
2442
+ # 5 => 'FixBadPixelsList',
2443
+ # 6 => 'TrimBounds',
2444
+ # 7 => 'MapTable',
2445
+ # 8 => 'MapPolynomial',
2446
+ # 9 => 'GainMap',
2447
+ # 10 => 'DeltaPerRow',
2448
+ # 11 => 'DeltaPerColumn',
2449
+ # 12 => 'ScalePerRow',
2450
+ # 13 => 'ScalePerColumn',
2451
+ },
2452
+ 0xc741 => { # DNG 1.3
2453
+ Name => 'OpcodeList2',
2454
+ Binary => 1,
2455
+ },
2456
+ 0xc74e => { # DNG 1.3
2457
+ Name => 'OpcodeList3',
2458
+ Binary => 1,
2459
+ },
2460
+ 0xc761 => 'NoiseProfile', # DNG 1.3
2461
+ 0xc763 => { #28
2462
+ Name => 'TimeCodes',
2463
+ ValueConv => q{
2464
+ my @a = split ' ', $val;
2465
+ my @v;
2466
+ push @v, join('.', map { sprintf('%.2x',$_) } splice(@a,0,8)) while @a >= 8;
2467
+ join ' ', @v;
2468
+ },
2469
+ # Note: Currently ignore the flags:
2470
+ # byte 0 0x80 - color frame
2471
+ # byte 0 0x40 - drop frame
2472
+ # byte 1 0x80 - field phase
2473
+ PrintConv => q{
2474
+ my @a = map hex, split /[. ]+/, $val;
2475
+ my @v;
2476
+ while (@a >= 8) {
2477
+ my $str = sprintf("%.2x:%.2x:%.2x.%.2x", $a[3]&0x3f,
2478
+ $a[2]&0x7f, $a[1]&0x7f, $a[0]&0x3f);
2479
+ if ($a[3] & 0x80) { # date+timezone exist if BGF2 is set
2480
+ my $tz = $a[7] & 0x3f;
2481
+ my $bz = sprintf('%.2x', $tz);
2482
+ $bz = 100 if $bz =~ /[a-f]/i; # not BCD
2483
+ if ($bz < 26) {
2484
+ $tz = ($bz < 13 ? 0 : 26) - $bz;
2485
+ } elsif ($bz == 32) {
2486
+ $tz = 12.75;
2487
+ } elsif ($bz >= 28 and $bz <= 31) {
2488
+ $tz = 0; # UTC
2489
+ } elsif ($bz < 100) {
2490
+ undef $tz; # undefined or user-defined
2491
+ } elsif ($tz < 0x20) {
2492
+ $tz = (($tz < 0x10 ? 10 : 20) - $tz) - 0.5;
2493
+ } else {
2494
+ $tz = (($tz < 0x30 ? 53 : 63) - $tz) + 0.5;
2495
+ }
2496
+ if ($a[7] & 0x80) { # MJD format (/w UTC time)
2497
+ my ($h,$m,$s,$f) = split /[:.]/, $str;
2498
+ my $jday = sprintf('%x%.2x%.2x', reverse @a[4..6]);
2499
+ $str = ConvertUnixTime(($jday - 40587) * 24 * 3600
2500
+ + ((($h+$tz) * 60) + $m) * 60 + $s) . ".$f";
2501
+ $str =~ s/^(\d+):(\d+):(\d+) /$1-$2-${3}T/;
2502
+ } else { # YYMMDD (Note: CinemaDNG 1.1 example seems wrong)
2503
+ my $yr = sprintf('%.2x',$a[6]) + 1900;
2504
+ $yr += 100 if $yr < 1970;
2505
+ $str = sprintf('%d-%.2x-%.2xT%s',$yr,$a[5],$a[4],$str);
2506
+ }
2507
+ $str .= TimeZoneString($tz*60) if defined $tz;
2508
+ }
2509
+ push @v, $str;
2510
+ splice @a, 0, 8;
2511
+ }
2512
+ join ' ', @v;
2513
+ },
2514
+ },
2515
+ 0xc764 => { #28
2516
+ Name => 'FrameRate',
2517
+ PrintConv => 'int($val * 1000 + 0.5) / 1000',
2518
+ },
2519
+ 0xc772 => { #28
2520
+ Name => 'TStop',
2521
+ PrintConv => 'join("-", map { sprintf("%.2f",$_) } split " ", $val)',
2522
+ },
2523
+ 0xc789 => 'ReelName', #28
2524
+ 0xc791 => 'OriginalDefaultFinalSize', # DNG 1.4
2525
+ 0xc792 => { # DNG 1.4
2526
+ Name => 'OriginalBestQualitySize',
2527
+ Notes => 'called OriginalBestQualityFinalSize by the DNG spec',
2528
+ },
2529
+ 0xc793 => 'OriginalDefaultCropSize', # DNG 1.4
2530
+ 0xc7a1 => 'CameraLabel', #28
2531
+ 0xc7a3 => { # DNG 1.4
2532
+ Name => 'ProfileHueSatMapEncoding',
2533
+ PrintConv => {
2534
+ 0 => 'Linear',
2535
+ 1 => 'sRGB',
2536
+ },
2537
+ },
2538
+ 0xc7a4 => { # DNG 1.4
2539
+ Name => 'ProfileLookTableEncoding',
2540
+ PrintConv => {
2541
+ 0 => 'Linear',
2542
+ 1 => 'sRGB',
2543
+ },
2544
+ },
2545
+ 0xc7a5 => 'BaselineExposureOffset', # DNG 1.4
2546
+ 0xc7a6 => { # DNG 1.4
2547
+ Name => 'DefaultBlackRender',
2548
+ PrintConv => {
2549
+ 0 => 'Auto',
2550
+ 1 => 'None',
2551
+ },
2552
+ },
2553
+ 0xc7a7 => { # DNG 1.4
2554
+ Name => 'NewRawImageDigest',
2555
+ Format => 'undef',
2556
+ ValueConv => 'unpack("H*", $val)',
2557
+ },
2558
+ 0xc7a8 => 'RawToPreviewGain', # DNG 1.4
2559
+ # 0xc7aa - undocumented DNG tag written by LR4 (int32u[1] - val=256, related to fast load data?)
2560
+ 0xc7b5 => 'DefaultUserCrop', # DNG 1.4
2561
+ 0xea1c => { #13
2562
+ Name => 'Padding',
2563
+ Binary => 1,
2564
+ Writable => 'undef',
2565
+ # must start with 0x1c 0xea by the WM Photo specification
2566
+ # (not sure what should happen if padding is only 1 byte)
2567
+ # (why does MicrosoftPhoto write "1c ea 00 00 00 08"?)
2568
+ RawConvInv => '$val=~s/^../\x1c\xea/s; $val',
2569
+ },
2570
+ 0xea1d => {
2571
+ Name => 'OffsetSchema',
2572
+ Notes => "Microsoft's ill-conceived maker note offset difference",
2573
+ # From the Microsoft documentation:
2574
+ #
2575
+ # Any time the "Maker Note" is relocated by Windows, the Exif MakerNote
2576
+ # tag (37500) is updated automatically to reference the new location. In
2577
+ # addition, Windows records the offset (or difference) between the old and
2578
+ # new locations in the Exif OffsetSchema tag (59933). If the "Maker Note"
2579
+ # contains relative references, the developer can add the value in
2580
+ # OffsetSchema to the original references to find the correct information.
2581
+ #
2582
+ # My recommendation is for other developers to ignore this tag because the
2583
+ # information it contains is unreliable. It will be wrong if the image has
2584
+ # been subsequently edited by another application that doesn't recognize the
2585
+ # new Microsoft tag.
2586
+ #
2587
+ # The new tag unfortunately only gives the difference between the new maker
2588
+ # note offset and the original offset. Instead, it should have been designed
2589
+ # to store the original offset. The new offset may change if the image is
2590
+ # edited, which will invalidate the tag as currently written. If instead the
2591
+ # original offset had been stored, the new difference could be easily
2592
+ # calculated because the new maker note offset is known.
2593
+ #
2594
+ # I exchanged emails with a Microsoft technical representative, pointing out
2595
+ # this problem shortly after they released the update (Feb 2007), but so far
2596
+ # they have taken no steps to address this.
2597
+ },
2598
+
2599
+ # tags in the range 0xfde8-0xfe58 have been observed in PS7 files
2600
+ # generated from RAW images. They are all strings with the
2601
+ # tag name at the start of the string. To accomodate these types
2602
+ # of tags, all tags with values above 0xf000 are handled specially
2603
+ # by ProcessExif().
2604
+
2605
+ 0xfe00 => {
2606
+ Name => 'KDC_IFD',
2607
+ Groups => { 1 => 'KDC_IFD' },
2608
+ Flags => 'SubIFD',
2609
+ Notes => 'used in some Kodak KDC images',
2610
+ SubDirectory => {
2611
+ TagTable => 'Image::ExifTool::Kodak::KDC_IFD',
2612
+ DirName => 'KDC_IFD',
2613
+ Start => '$val',
2614
+ },
2615
+ },
2616
+ );
2617
+
2618
+ # EXIF Composite tags (plus other more general Composite tags)
2619
+ %Image::ExifTool::Exif::Composite = (
2620
+ GROUPS => { 2 => 'Image' },
2621
+ ImageSize => {
2622
+ Require => {
2623
+ 0 => 'ImageWidth',
2624
+ 1 => 'ImageHeight',
2625
+ },
2626
+ Desire => {
2627
+ 2 => 'ExifImageWidth',
2628
+ 3 => 'ExifImageHeight',
2629
+ },
2630
+ # use ExifImageWidth/Height only for Canon and Phase One TIFF-base RAW images
2631
+ ValueConv => q{
2632
+ return "$val[2]x$val[3]" if $val[2] and $val[3] and
2633
+ $$self{TIFF_TYPE} =~ /^(CR2|Canon 1D RAW|IIQ|EIP)$/;
2634
+ return "$val[0]x$val[1]";
2635
+ },
2636
+ },
2637
+ # pick the best shutter speed value
2638
+ ShutterSpeed => {
2639
+ Desire => {
2640
+ 0 => 'ExposureTime',
2641
+ 1 => 'ShutterSpeedValue',
2642
+ 2 => 'BulbDuration',
2643
+ },
2644
+ ValueConv => '($val[2] and $val[2]>0) ? $val[2] : (defined($val[0]) ? $val[0] : $val[1])',
2645
+ PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
2646
+ },
2647
+ Aperture => {
2648
+ Desire => {
2649
+ 0 => 'FNumber',
2650
+ 1 => 'ApertureValue',
2651
+ },
2652
+ RawConv => '($val[0] || $val[1]) ? $val : undef',
2653
+ ValueConv => '$val[0] || $val[1]',
2654
+ PrintConv => 'Image::ExifTool::Exif::PrintFNumber($val)',
2655
+ },
2656
+ LightValue => {
2657
+ Notes => 'calculated LV -- similar to exposure value but normalized to ISO 100',
2658
+ Require => {
2659
+ 0 => 'Aperture',
2660
+ 1 => 'ShutterSpeed',
2661
+ 2 => 'ISO',
2662
+ },
2663
+ ValueConv => 'Image::ExifTool::Exif::CalculateLV($val[0],$val[1],$prt[2])',
2664
+ PrintConv => 'sprintf("%.1f",$val)',
2665
+ },
2666
+ FocalLength35efl => { #26/PH
2667
+ Description => 'Focal Length',
2668
+ Notes => 'this value may be incorrect if the image has been resized',
2669
+ Groups => { 2 => 'Camera' },
2670
+ Require => {
2671
+ 0 => 'FocalLength',
2672
+ },
2673
+ Desire => {
2674
+ 1 => 'ScaleFactor35efl',
2675
+ },
2676
+ ValueConv => 'ToFloat(@val); ($val[0] || 0) * ($val[1] || 1)',
2677
+ PrintConv => '$val[1] ? sprintf("%.1f mm (35 mm equivalent: %.1f mm)", $val[0], $val) : sprintf("%.1f mm", $val)',
2678
+ },
2679
+ ScaleFactor35efl => { #26/PH
2680
+ Description => 'Scale Factor To 35 mm Equivalent',
2681
+ Notes => q{
2682
+ this value and any derived values may be incorrect if the image has been
2683
+ resized
2684
+ },
2685
+ Groups => { 2 => 'Camera' },
2686
+ Desire => {
2687
+ 0 => 'FocalLength',
2688
+ 1 => 'FocalLengthIn35mmFormat',
2689
+ 2 => 'Composite:DigitalZoom',
2690
+ 3 => 'FocalPlaneDiagonal',
2691
+ 4 => 'SensorSize',
2692
+ 5 => 'FocalPlaneXSize',
2693
+ 6 => 'FocalPlaneYSize',
2694
+ 7 => 'FocalPlaneResolutionUnit',
2695
+ 8 => 'FocalPlaneXResolution',
2696
+ 9 => 'FocalPlaneYResolution',
2697
+ 10 => 'ExifImageWidth',
2698
+ 11 => 'ExifImageHeight',
2699
+ 12 => 'CanonImageWidth',
2700
+ 13 => 'CanonImageHeight',
2701
+ 14 => 'ImageWidth',
2702
+ 15 => 'ImageHeight',
2703
+ },
2704
+ ValueConv => 'Image::ExifTool::Exif::CalcScaleFactor35efl($self, @val)',
2705
+ PrintConv => 'sprintf("%.1f", $val)',
2706
+ },
2707
+ CircleOfConfusion => {
2708
+ Notes => q{
2709
+ calculated as D/1440, where D is the focal plane diagonal in mm. This value
2710
+ may be incorrect if the image has been resized
2711
+ },
2712
+ Groups => { 2 => 'Camera' },
2713
+ Require => 'ScaleFactor35efl',
2714
+ ValueConv => 'sqrt(24*24+36*36) / ($val * 1440)',
2715
+ PrintConv => 'sprintf("%.3f mm",$val)',
2716
+ },
2717
+ HyperfocalDistance => {
2718
+ Notes => 'this value may be incorrect if the image has been resized',
2719
+ Groups => { 2 => 'Camera' },
2720
+ Require => {
2721
+ 0 => 'FocalLength',
2722
+ 1 => 'Aperture',
2723
+ 2 => 'CircleOfConfusion',
2724
+ },
2725
+ ValueConv => q{
2726
+ ToFloat(@val);
2727
+ return 'inf' unless $val[1] and $val[2];
2728
+ return $val[0] * $val[0] / ($val[1] * $val[2] * 1000);
2729
+ },
2730
+ PrintConv => 'sprintf("%.2f m", $val)',
2731
+ },
2732
+ DOF => {
2733
+ Description => 'Depth Of Field',
2734
+ Notes => 'this value may be incorrect if the image has been resized',
2735
+ Require => {
2736
+ 0 => 'FocalLength',
2737
+ 1 => 'Aperture',
2738
+ 2 => 'CircleOfConfusion',
2739
+ },
2740
+ Desire => {
2741
+ 3 => 'FocusDistance', # focus distance in metres (0 is infinity)
2742
+ 4 => 'SubjectDistance',
2743
+ 5 => 'ObjectDistance',
2744
+ },
2745
+ ValueConv => q{
2746
+ ToFloat(@val);
2747
+ my ($d, $f) = ($val[3], $val[0]);
2748
+ if (defined $d) {
2749
+ $d or $d = 1e10; # (use large number for infinity)
2750
+ } else {
2751
+ $d = $val[4] || $val[5];
2752
+ return undef unless defined $d;
2753
+ }
2754
+ return 0 unless $f and $val[2];
2755
+ my $t = $val[1] * $val[2] * ($d * 1000 - $f) / ($f * $f);
2756
+ my @v = ($d / (1 + $t), $d / (1 - $t));
2757
+ $v[1] < 0 and $v[1] = 0; # 0 means 'inf'
2758
+ return join(' ',@v);
2759
+ },
2760
+ PrintConv => q{
2761
+ $val =~ tr/,/./; # in case locale is whacky
2762
+ my @v = split ' ', $val;
2763
+ $v[1] or return sprintf("inf (%.2f m - inf)", $v[0]);
2764
+ my $dof = $v[1] - $v[0];
2765
+ my $fmt = ($dof>0 and $dof<0.02) ? "%.3f" : "%.2f";
2766
+ return sprintf("$fmt m ($fmt - $fmt)",$dof,$v[0],$v[1]);
2767
+ },
2768
+ },
2769
+ FOV => {
2770
+ Description => 'Field Of View',
2771
+ Notes => q{
2772
+ calculated for the long image dimension. This value may be incorrect for
2773
+ fisheye lenses, or if the image has been resized
2774
+ },
2775
+ Require => {
2776
+ 0 => 'FocalLength',
2777
+ 1 => 'ScaleFactor35efl',
2778
+ },
2779
+ Desire => {
2780
+ 2 => 'FocusDistance', # (multiply by 1000 to convert to mm)
2781
+ },
2782
+ # ref http://www.bobatkins.com/photography/technical/field_of_view.html
2783
+ # (calculations below apply to rectilinear lenses only, not fisheye)
2784
+ ValueConv => q{
2785
+ ToFloat(@val);
2786
+ return undef unless $val[0] and $val[1];
2787
+ my $corr = 1;
2788
+ if ($val[2]) {
2789
+ my $d = 1000 * $val[2] - $val[0];
2790
+ $corr += $val[0]/$d if $d > 0;
2791
+ }
2792
+ my $fd2 = atan2(36, 2*$val[0]*$val[1]*$corr);
2793
+ my @fov = ( $fd2 * 360 / 3.14159 );
2794
+ if ($val[2] and $val[2] > 0 and $val[2] < 10000) {
2795
+ push @fov, 2 * $val[2] * sin($fd2) / cos($fd2);
2796
+ }
2797
+ return join(' ', @fov);
2798
+ },
2799
+ PrintConv => q{
2800
+ my @v = split(' ',$val);
2801
+ my $str = sprintf("%.1f deg", $v[0]);
2802
+ $str .= sprintf(" (%.2f m)", $v[1]) if $v[1];
2803
+ return $str;
2804
+ },
2805
+ },
2806
+ # generate DateTimeOriginal from Date and Time Created if not extracted already
2807
+ DateTimeOriginal => {
2808
+ Condition => 'not defined $$self{VALUE}{DateTimeOriginal}',
2809
+ Description => 'Date/Time Original',
2810
+ Groups => { 2 => 'Time' },
2811
+ Desire => {
2812
+ 0 => 'DateTimeCreated',
2813
+ 1 => 'DateCreated',
2814
+ 2 => 'TimeCreated',
2815
+ },
2816
+ RawConv => '($val[1] and $val[2]) ? $val : undef',
2817
+ ValueConv => q{
2818
+ return $val[0] if $val[0] and $val[0]=~/ /;
2819
+ return "$val[1] $val[2]";
2820
+ },
2821
+ PrintConv => '$self->ConvertDateTime($val)',
2822
+ },
2823
+ ThumbnailImage => {
2824
+ Writable => 1,
2825
+ WriteCheck => '$self->CheckImage(\$val)',
2826
+ WriteAlso => {
2827
+ # (the 0xfeedfeed values are translated in the Exif write routine)
2828
+ ThumbnailOffset => 'defined $val ? 0xfeedfeed : undef',
2829
+ ThumbnailLength => 'defined $val ? 0xfeedfeed : undef',
2830
+ },
2831
+ Require => {
2832
+ 0 => 'ThumbnailOffset',
2833
+ 1 => 'ThumbnailLength',
2834
+ },
2835
+ # retrieve the thumbnail from our EXIF data
2836
+ RawConv => 'Image::ExifTool::Exif::ExtractImage($self,$val[0],$val[1],"ThumbnailImage")',
2837
+ },
2838
+ PreviewImage => {
2839
+ Writable => 1,
2840
+ WriteCheck => '$self->CheckImage(\$val)',
2841
+ DelCheck => '$val = ""; return undef', # can't delete, so set to empty string
2842
+ WriteAlso => {
2843
+ PreviewImageStart => 'defined $val ? 0xfeedfeed : undef',
2844
+ PreviewImageLength => 'defined $val ? 0xfeedfeed : undef',
2845
+ PreviewImageValid => 'defined $val and length $val ? 1 : 0',
2846
+ },
2847
+ Require => {
2848
+ 0 => 'PreviewImageStart',
2849
+ 1 => 'PreviewImageLength',
2850
+ },
2851
+ Desire => {
2852
+ 2 => 'PreviewImageValid',
2853
+ # (DNG and A100 ARW may be have 2 preview images)
2854
+ 3 => 'PreviewImageStart (1)',
2855
+ 4 => 'PreviewImageLength (1)',
2856
+ },
2857
+ # note: extract 2nd preview, but ignore double-referenced preview
2858
+ # (in A100 ARW images, the 2nd PreviewImageLength from IFD0 may be wrong anyway)
2859
+ RawConv => q{
2860
+ if ($val[3] and $val[4] and $val[0] ne $val[3]) {
2861
+ my %val = (
2862
+ 0 => 'PreviewImageStart (1)',
2863
+ 1 => 'PreviewImageLength (1)',
2864
+ 2 => 'PreviewImageValid',
2865
+ );
2866
+ $self->FoundTag($tagInfo, \%val);
2867
+ }
2868
+ return undef if defined $val[2] and not $val[2];
2869
+ return Image::ExifTool::Exif::ExtractImage($self,$val[0],$val[1],'PreviewImage');
2870
+ },
2871
+ },
2872
+ JpgFromRaw => {
2873
+ Writable => 1,
2874
+ WriteCheck => '$self->CheckImage(\$val)',
2875
+ WriteAlso => {
2876
+ JpgFromRawStart => 'defined $val ? 0xfeedfeed : undef',
2877
+ JpgFromRawLength => 'defined $val ? 0xfeedfeed : undef',
2878
+ },
2879
+ Require => {
2880
+ 0 => 'JpgFromRawStart',
2881
+ 1 => 'JpgFromRawLength',
2882
+ },
2883
+ RawConv => 'Image::ExifTool::Exif::ExtractImage($self,$val[0],$val[1],"JpgFromRaw")',
2884
+ },
2885
+ OtherImage => {
2886
+ Writable => 1,
2887
+ WriteCheck => '$self->CheckImage(\$val)',
2888
+ DelCheck => '$val = ""; return undef', # can't delete, so set to empty string
2889
+ WriteAlso => {
2890
+ OtherImageStart => 'defined $val ? 0xfeedfeed : undef',
2891
+ OtherImageLength => 'defined $val ? 0xfeedfeed : undef',
2892
+ },
2893
+ Require => {
2894
+ 0 => 'OtherImageStart',
2895
+ 1 => 'OtherImageLength',
2896
+ },
2897
+ # retrieve the thumbnail from our EXIF data
2898
+ RawConv => 'Image::ExifTool::Exif::ExtractImage($self,$val[0],$val[1],"OtherImage")',
2899
+ },
2900
+ PreviewImageSize => {
2901
+ Require => {
2902
+ 0 => 'PreviewImageWidth',
2903
+ 1 => 'PreviewImageHeight',
2904
+ },
2905
+ ValueConv => '"$val[0]x$val[1]"',
2906
+ },
2907
+ SubSecDateTimeOriginal => {
2908
+ Description => 'Date/Time Original',
2909
+ Groups => { 2 => 'Time' },
2910
+ Require => {
2911
+ 0 => 'EXIF:DateTimeOriginal',
2912
+ 1 => 'SubSecTimeOriginal',
2913
+ },
2914
+ # be careful here just in case there is a timezone following the seconds
2915
+ RawConv => '$val[1]=~/\d/ ? $val : undef',
2916
+ ValueConv => q{
2917
+ $_ = $val[0]; s/( \d{2}:\d{2}:\d{2})/$1\.$val[1]/; $_;
2918
+ },
2919
+ PrintConv => '$self->ConvertDateTime($val)',
2920
+ },
2921
+ SubSecCreateDate => {
2922
+ Description => 'Create Date',
2923
+ Groups => { 2 => 'Time' },
2924
+ Require => {
2925
+ 0 => 'EXIF:CreateDate',
2926
+ 1 => 'SubSecTimeDigitized',
2927
+ },
2928
+ RawConv => '$val[1]=~/\d/ ? $val : undef',
2929
+ ValueConv => q{
2930
+ $_ = $val[0]; s/( \d{2}:\d{2}:\d{2})/$1\.$val[1]/; $_;
2931
+ },
2932
+ PrintConv => '$self->ConvertDateTime($val)',
2933
+ },
2934
+ SubSecModifyDate => {
2935
+ Description => 'Modify Date',
2936
+ Groups => { 2 => 'Time' },
2937
+ Require => {
2938
+ 0 => 'EXIF:ModifyDate',
2939
+ 1 => 'SubSecTime',
2940
+ },
2941
+ RawConv => '$val[1]=~/\d/ ? $val : undef',
2942
+ ValueConv => q{
2943
+ $_ = $val[0]; s/( \d{2}:\d{2}:\d{2})/$1\.$val[1]/; $_;
2944
+ },
2945
+ PrintConv => '$self->ConvertDateTime($val)',
2946
+ },
2947
+ CFAPattern => {
2948
+ Require => {
2949
+ 0 => 'CFARepeatPatternDim',
2950
+ 1 => 'CFAPattern2',
2951
+ },
2952
+ # generate CFAPattern
2953
+ ValueConv => q{
2954
+ my @a = split / /, $val[0];
2955
+ my @b = split / /, $val[1];
2956
+ return '?' unless @a==2 and @b==$a[0]*$a[1];
2957
+ return "$a[0] $a[1] @b";
2958
+ },
2959
+ PrintConv => 'Image::ExifTool::Exif::PrintCFAPattern($val)',
2960
+ },
2961
+ RedBalance => {
2962
+ Groups => { 2 => 'Camera' },
2963
+ Desire => {
2964
+ 0 => 'WB_RGGBLevels',
2965
+ 1 => 'WB_RGBGLevels',
2966
+ 2 => 'WB_RBGGLevels',
2967
+ 3 => 'WB_GRBGLevels',
2968
+ 4 => 'WB_GRGBLevels',
2969
+ 5 => 'WB_GBRGLevels',
2970
+ 6 => 'WB_RGBLevels',
2971
+ 7 => 'WB_GRBLevels',
2972
+ 8 => 'WB_RBLevels',
2973
+ 9 => 'WBRedLevel', # red
2974
+ 10 => 'WBGreenLevel',
2975
+ },
2976
+ ValueConv => 'Image::ExifTool::Exif::RedBlueBalance(0,@val)',
2977
+ PrintConv => 'int($val * 1e6 + 0.5) * 1e-6',
2978
+ },
2979
+ BlueBalance => {
2980
+ Groups => { 2 => 'Camera' },
2981
+ Desire => {
2982
+ 0 => 'WB_RGGBLevels',
2983
+ 1 => 'WB_RGBGLevels',
2984
+ 2 => 'WB_RBGGLevels',
2985
+ 3 => 'WB_GRBGLevels',
2986
+ 4 => 'WB_GRGBLevels',
2987
+ 5 => 'WB_GBRGLevels',
2988
+ 6 => 'WB_RGBLevels',
2989
+ 7 => 'WB_GRBLevels',
2990
+ 8 => 'WB_RBLevels',
2991
+ 9 => 'WBBlueLevel', # blue
2992
+ 10 => 'WBGreenLevel',
2993
+ },
2994
+ ValueConv => 'Image::ExifTool::Exif::RedBlueBalance(1,@val)',
2995
+ PrintConv => 'int($val * 1e6 + 0.5) * 1e-6',
2996
+ },
2997
+ GPSPosition => {
2998
+ Groups => { 2 => 'Location' },
2999
+ Require => {
3000
+ 0 => 'GPSLatitude',
3001
+ 1 => 'GPSLongitude',
3002
+ },
3003
+ ValueConv => '"$val[0] $val[1]"',
3004
+ PrintConv => '"$prt[0], $prt[1]"',
3005
+ },
3006
+ LensID => {
3007
+ Groups => { 2 => 'Camera' },
3008
+ Require => {
3009
+ 0 => 'LensType',
3010
+ },
3011
+ Desire => {
3012
+ 1 => 'FocalLength',
3013
+ 2 => 'MaxAperture',
3014
+ 3 => 'MaxApertureValue',
3015
+ 4 => 'MinFocalLength',
3016
+ 5 => 'MaxFocalLength',
3017
+ 6 => 'LensModel',
3018
+ 7 => 'LensFocalRange',
3019
+ 8 => 'LensSpec',
3020
+ 9 => 'LensType2',
3021
+ },
3022
+ Notes => q{
3023
+ attempt to identify the actual lens from all lenses with a given LensType.
3024
+ Applies only to LensType values with a lookup table. May be configured
3025
+ by adding user-defined lenses
3026
+ },
3027
+ # this LensID is only valid if the LensType has a PrintConv or is a model name
3028
+ RawConv => q{
3029
+ return $val if ref $$self{TAG_INFO}{LensType}{PrintConv} eq "HASH" or
3030
+ $val[0] =~ /(mm|\d\/F)/;
3031
+ return undef;
3032
+ },
3033
+ ValueConv => '$val',
3034
+ PrintConv => q{
3035
+ my $pcv;
3036
+ # use LensType2 instead of LensType if available and valid (Sony E-mount lenses)
3037
+ if ($val[9] and $val[9] & 0x8000) {
3038
+ $val[0] = $val[9];
3039
+ $prt[0] = $prt[9];
3040
+ $pcv = $$self{TAG_INFO}{LensType2}{PrintConv};
3041
+ }
3042
+ Image::ExifTool::Exif::PrintLensID($self, $prt[0], $pcv, $prt[8], @val);
3043
+ },
3044
+ },
3045
+ );
3046
+
3047
+ # table for unknown IFD entries
3048
+ %Image::ExifTool::Exif::Unknown = (
3049
+ GROUPS => { 0 => 'EXIF', 1 => 'UnknownIFD', 2 => 'Image'},
3050
+ WRITE_PROC => \&WriteExif,
3051
+ );
3052
+
3053
+ # add our composite tags
3054
+ Image::ExifTool::AddCompositeTags('Image::ExifTool::Exif');
3055
+
3056
+
3057
+ #------------------------------------------------------------------------------
3058
+ # AutoLoad our writer routines when necessary
3059
+ #
3060
+ sub AUTOLOAD
3061
+ {
3062
+ return Image::ExifTool::DoAutoLoad($AUTOLOAD, @_);
3063
+ }
3064
+
3065
+ #------------------------------------------------------------------------------
3066
+ # Identify RAW file type for some TIFF-based formats using Compression value
3067
+ # Inputs: 0) ExifTool object reference, 1) Compression value
3068
+ # - sets TIFF_TYPE and FileType if identified
3069
+ sub IdentifyRawFile($$)
3070
+ {
3071
+ my ($exifTool, $comp) = @_;
3072
+ if ($$exifTool{FILE_TYPE} eq 'TIFF' and not $$exifTool{IdentifiedRawFile}) {
3073
+ if ($compression{$comp} and $compression{$comp} =~ /^\w+ ([A-Z]{3}) Compressed$/) {
3074
+ $exifTool->OverrideFileType($$exifTool{TIFF_TYPE} = $1);
3075
+ $$exifTool{IdentifiedRawFile} = 1;
3076
+ }
3077
+ }
3078
+ }
3079
+
3080
+ #------------------------------------------------------------------------------
3081
+ # Calculate LV (Light Value)
3082
+ # Inputs: 0) Aperture, 1) ShutterSpeed, 2) ISO
3083
+ # Returns: LV value (and converts input values to floating point if necessary)
3084
+ sub CalculateLV($$$)
3085
+ {
3086
+ local $_;
3087
+ # do validity checks on arguments
3088
+ return undef unless @_ >= 3;
3089
+ foreach (@_) {
3090
+ return undef unless $_ and /([+-]?(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?)/ and $1 > 0;
3091
+ $_ = $1; # extract float from any other garbage
3092
+ }
3093
+ # (A light value of 0 is defined as f/1.0 at 1 second with ISO 100)
3094
+ return (2*log($_[0]) - log($_[1]) - log($_[2]/100)) / log(2);
3095
+ }
3096
+
3097
+ #------------------------------------------------------------------------------
3098
+ # Calculate scale factor for 35mm effective focal length (ref 26/PH)
3099
+ # Inputs: 0) ExifTool object ref
3100
+ # 1) Focal length
3101
+ # 2) Focal length in 35mm format
3102
+ # 3) Canon digital zoom factor
3103
+ # 4) Focal plane diagonal size (in mm)
3104
+ # 5) Sensor size (X and Y in mm)
3105
+ # 6/7) Focal plane X/Y size (in mm)
3106
+ # 8) focal plane resolution units (1=None,2=inches,3=cm,4=mm,5=um)
3107
+ # 9/10) Focal plane X/Y resolution
3108
+ # 11/12,13/14...) Image width/height in order of precedence (first valid pair is used)
3109
+ # Returns: 35mm conversion factor (or undefined if it can't be calculated)
3110
+ sub CalcScaleFactor35efl
3111
+ {
3112
+ my $exifTool = shift;
3113
+ my $res = $_[7]; # save resolution units (in case they have been converted to string)
3114
+ my $sensXY = $_[4];
3115
+ Image::ExifTool::ToFloat(@_);
3116
+ my $focal = shift;
3117
+ my $foc35 = shift;
3118
+
3119
+ return $foc35 / $focal if $focal and $foc35;
3120
+
3121
+ my $digz = shift || 1;
3122
+ my $diag = shift;
3123
+ my $sens = shift;
3124
+ # calculate Canon sensor size using a dedicated algorithm
3125
+ if ($$exifTool{Make} eq 'Canon') {
3126
+ require Image::ExifTool::Canon;
3127
+ my $canonDiag = Image::ExifTool::Canon::CalcSensorDiag(
3128
+ $exifTool->{RATIONAL}{FocalPlaneXResolution},
3129
+ $exifTool->{RATIONAL}{FocalPlaneYResolution},
3130
+ );
3131
+ $diag = $canonDiag if $canonDiag;
3132
+ }
3133
+ unless ($diag and Image::ExifTool::IsFloat($diag)) {
3134
+ if ($sens and $sensXY =~ / (\d+(\.?\d*)?)$/) {
3135
+ $diag = sqrt($sens * $sens + $1 * $1);
3136
+ } else {
3137
+ undef $diag;
3138
+ my $xsize = shift;
3139
+ my $ysize = shift;
3140
+ if ($xsize and $ysize) {
3141
+ # validate by checking aspect ratio because FocalPlaneX/YSize is not reliable
3142
+ my $a = $xsize / $ysize;
3143
+ if (abs($a-1.3333) < .1 or abs($a-1.5) < .1) {
3144
+ $diag = sqrt($xsize * $xsize + $ysize * $ysize);
3145
+ }
3146
+ }
3147
+ }
3148
+ unless ($diag) {
3149
+ # get number of mm in units (assume inches unless otherwise specified)
3150
+ my %lkup = ( 3=>10, 4=>1, 5=>0.001 , cm=>10, mm=>1, um=>0.001 );
3151
+ my $units = $lkup{ shift() || $res || '' } || 25.4;
3152
+ my $x_res = shift || return undef;
3153
+ my $y_res = shift || return undef;
3154
+ Image::ExifTool::IsFloat($x_res) and $x_res != 0 or return undef;
3155
+ Image::ExifTool::IsFloat($y_res) and $y_res != 0 or return undef;
3156
+ my ($w, $h);
3157
+ for (;;) {
3158
+ @_ < 2 and return undef;
3159
+ $w = shift;
3160
+ $h = shift;
3161
+ next unless $w and $h;
3162
+ my $a = $w / $h;
3163
+ last if $a > 0.5 and $a < 2; # stop if we get a reasonable value
3164
+ }
3165
+ # calculate focal plane size in mm
3166
+ $w *= $units / $x_res;
3167
+ $h *= $units / $y_res;
3168
+ $diag = sqrt($w*$w+$h*$h);
3169
+ # make sure size is reasonable
3170
+ return undef unless $diag > 1 and $diag < 100;
3171
+ }
3172
+ }
3173
+ return sqrt(36*36+24*24) * $digz / $diag;
3174
+ }
3175
+
3176
+ #------------------------------------------------------------------------------
3177
+ # Print exposure compensation fraction
3178
+ sub PrintFraction($)
3179
+ {
3180
+ my $val = shift;
3181
+ my $str;
3182
+ if (defined $val) {
3183
+ $val *= 1.00001; # avoid round-off errors
3184
+ if (not $val) {
3185
+ $str = '0';
3186
+ } elsif (int($val)/$val > 0.999) {
3187
+ $str = sprintf("%+d", int($val));
3188
+ } elsif ((int($val*2))/($val*2) > 0.999) {
3189
+ $str = sprintf("%+d/2", int($val * 2));
3190
+ } elsif ((int($val*3))/($val*3) > 0.999) {
3191
+ $str = sprintf("%+d/3", int($val * 3));
3192
+ } else {
3193
+ $str = sprintf("%+.3g", $val);
3194
+ }
3195
+ }
3196
+ return $str;
3197
+ }
3198
+
3199
+ #------------------------------------------------------------------------------
3200
+ # Convert fraction or number to floating point value (or 'undef' or 'inf')
3201
+ sub ConvertFraction($)
3202
+ {
3203
+ my $val = shift;
3204
+ if ($val =~ m{([-+]?\d+)/(\d+)}) {
3205
+ $val = $2 ? $1 / $2 : ($1 ? 'inf' : 'undef');
3206
+ }
3207
+ return $val;
3208
+ }
3209
+
3210
+ #------------------------------------------------------------------------------
3211
+ # Convert EXIF text to something readable
3212
+ # Inputs: 0) ExifTool object reference, 1) EXIF text,
3213
+ # 2) flag to apply CharsetEXIF to ASCII text
3214
+ # Returns: text encoded according to Charset option (with trailing spaces removed)
3215
+ sub ConvertExifText($$;$)
3216
+ {
3217
+ my ($exifTool, $val, $asciiFlex) = @_;
3218
+ return $val if length($val) < 8;
3219
+ my $id = substr($val, 0, 8);
3220
+ my $str = substr($val, 8);
3221
+ # Note: allow spaces instead of nulls in the ID codes because
3222
+ # it is fairly common for camera manufacturers to get this wrong
3223
+ if ($id =~ /^(ASCII)?[\0 ]+$/) {
3224
+ # truncate at null terminator (shouldn't have a null based on the
3225
+ # EXIF spec, but it seems that few people actually read the spec)
3226
+ $str =~ s/\0.*//s;
3227
+ # allow ASCII text to contain any other specified encoding
3228
+ if ($asciiFlex) {
3229
+ my $enc = $exifTool->Options('CharsetEXIF');
3230
+ $str = $exifTool->Decode($str, $enc) if $enc;
3231
+ }
3232
+ # by the EXIF spec, the following string should be "UNICODE\0", but
3233
+ # apparently Kodak sometimes uses "Unicode\0" in the APP3 "Meta" information.
3234
+ # However, unfortunately Ricoh uses "Unicode\0" in the RR30 EXIF UserComment
3235
+ # when the text is actually ASCII, so only recognize uppercase "UNICODE\0".
3236
+ } elsif ($id =~ /^UNICODE[\0 ]$/) {
3237
+ # MicrosoftPhoto writes as little-endian even in big-endian EXIF,
3238
+ # so we must guess at the true byte ordering
3239
+ $str = $exifTool->Decode($str, 'UTF16', 'Unknown');
3240
+ } elsif ($id =~ /^JIS[\0 ]{5}$/) {
3241
+ $str = $exifTool->Decode($str, 'JIS', 'Unknown');
3242
+ } else {
3243
+ $exifTool->Warn("Invalid EXIF text encoding");
3244
+ $str = $id . $str;
3245
+ }
3246
+ $str =~ s/ +$//; # trim trailing blanks
3247
+ return $str;
3248
+ }
3249
+
3250
+ #------------------------------------------------------------------------------
3251
+ # Print conversion for SpatialFrequencyResponse
3252
+ sub PrintSFR($)
3253
+ {
3254
+ my $val = shift;
3255
+ return $val unless length $val > 4;
3256
+ my ($n, $m) = (Get16u(\$val, 0), Get16u(\$val, 2));
3257
+ my @cols = split /\0/, substr($val, 4), $n+1;
3258
+ my $pos = length($val) - 8 * $n * $m;
3259
+ return $val unless @cols == $n+1 and $pos >= 4;
3260
+ pop @cols;
3261
+ my ($i, $j);
3262
+ for ($i=0; $i<$n; ++$i) {
3263
+ my @rows;
3264
+ for ($j=0; $j<$m; ++$j) {
3265
+ push @rows, Image::ExifTool::GetRational64u(\$val, $pos + 8*($i+$j*$n));
3266
+ }
3267
+ $cols[$i] .= '=' . join(',',@rows) . '';
3268
+ }
3269
+ return join '; ', @cols;
3270
+ }
3271
+
3272
+ #------------------------------------------------------------------------------
3273
+ # Print numerical parameter value (with sign, or 'Normal' for zero)
3274
+ # Inputs: 0) value, 1) flag for inverse conversion, 2) conversion hash reference
3275
+ sub PrintParameter($$$)
3276
+ {
3277
+ my ($val, $inv, $conv) = @_;
3278
+ return $val if $inv;
3279
+ if ($val > 0) {
3280
+ if ($val > 0xfff0) { # a negative value in disguise?
3281
+ $val = $val - 0x10000;
3282
+ } else {
3283
+ $val = "+$val";
3284
+ }
3285
+ }
3286
+ return $val;
3287
+ }
3288
+
3289
+ #------------------------------------------------------------------------------
3290
+ # Convert parameter back to standard EXIF value
3291
+ # 0,0.00,etc or "Normal" => 0
3292
+ # -1,-2,etc or "Soft" or "Low" => 1
3293
+ # +1,+2,1,2,etc or "Hard" or "High" => 2
3294
+ sub ConvertParameter($)
3295
+ {
3296
+ my $val = shift;
3297
+ my $isFloat = Image::ExifTool::IsFloat($val);
3298
+ # normal is a value of zero
3299
+ return 0 if $val =~ /\bn/i or ($isFloat and $val == 0);
3300
+ # "soft", "low" or any negative number is a value of 1
3301
+ return 1 if $val =~ /\b(s|l)/i or ($isFloat and $val < 0);
3302
+ # "hard", "high" or any positive number is a value of 2
3303
+ return 2 if $val =~ /\bh/i or $isFloat;
3304
+ return undef;
3305
+ }
3306
+
3307
+ #------------------------------------------------------------------------------
3308
+ # Calculate Red/BlueBalance
3309
+ # Inputs: 0) 0=red, 1=blue, 1-8) WB_RGGB/RGBG/RBGG/GRBG/GRGB/RGB/GRB/RBLevels,
3310
+ # 8) red or blue level, 9) green level
3311
+ my @rggbLookup = (
3312
+ # indices for R, G, G and B components in input value
3313
+ [ 0, 1, 2, 3 ], # 0 RGGB
3314
+ [ 0, 1, 3, 2 ], # 1 RGBG
3315
+ [ 0, 2, 3, 1 ], # 2 RBGG
3316
+ [ 1, 0, 3, 2 ], # 3 GRBG
3317
+ [ 1, 0, 2, 3 ], # 4 GRGB
3318
+ [ 2, 3, 0, 1 ], # 5 GBRG
3319
+ [ 0, 1, 1, 2 ], # 6 RGB
3320
+ [ 1, 0, 0, 2 ], # 7 GRB
3321
+ [ 0, 256, 256, 1 ], # 8 RB (green level is 256)
3322
+ );
3323
+ sub RedBlueBalance($@)
3324
+ {
3325
+ my $blue = shift;
3326
+ my ($i, $val, $levels);
3327
+ for ($i=0; $i<@rggbLookup; ++$i) {
3328
+ $levels = shift or next;
3329
+ my @levels = split ' ', $levels;
3330
+ next if @levels < 2;
3331
+ my $lookup = $rggbLookup[$i];
3332
+ my $g = $$lookup[1]; # get green level or index
3333
+ if ($g < 4) {
3334
+ next if @levels < 3;
3335
+ $g = ($levels[$g] + $levels[$$lookup[2]]) / 2 or next;
3336
+ } elsif ($levels[$$lookup[$blue * 3]] < 4) {
3337
+ $g = 1; # Some Nikon cameras use a scaling factor of 1 (E5700)
3338
+ }
3339
+ $val = $levels[$$lookup[$blue * 3]] / $g;
3340
+ last;
3341
+ }
3342
+ $val = $_[0] / $_[1] if not defined $val and ($_[0] and $_[1]);
3343
+ return $val;
3344
+ }
3345
+
3346
+ #------------------------------------------------------------------------------
3347
+ # Print exposure time as a fraction
3348
+ sub PrintExposureTime($)
3349
+ {
3350
+ my $secs = shift;
3351
+ if ($secs < 0.25001 and $secs > 0) {
3352
+ return sprintf("1/%d",int(0.5 + 1/$secs));
3353
+ }
3354
+ $_ = sprintf("%.1f",$secs);
3355
+ s/\.0$//;
3356
+ return $_;
3357
+ }
3358
+
3359
+ #------------------------------------------------------------------------------
3360
+ # Print FNumber
3361
+ sub PrintFNumber($)
3362
+ {
3363
+ my $val = shift;
3364
+ if (Image::ExifTool::IsFloat($val) and $val > 0) {
3365
+ # round to 1 decimal place, or 2 for values < 1.0
3366
+ $val = sprintf(($val<1 ? "%.2f" : "%.1f"), $val);
3367
+ }
3368
+ return $val;
3369
+ }
3370
+
3371
+ #------------------------------------------------------------------------------
3372
+ # Decode raw CFAPattern value
3373
+ # Inputs: 0) ExifTool ref, 1) binary value
3374
+ # Returns: string of numbers
3375
+ sub DecodeCFAPattern($$)
3376
+ {
3377
+ my ($self, $val) = @_;
3378
+ # some panasonic cameras (SV-AS3, SV-AS30) write this in ascii (very odd)
3379
+ if ($val =~ /^[0-6]+$/) {
3380
+ $self->Warn('Incorrectly formatted CFAPattern', 1);
3381
+ $val =~ tr/0-6/\x00-\x06/;
3382
+ }
3383
+ return $val unless length($val) >= 4;
3384
+ my @a = unpack(GetByteOrder() eq 'II' ? 'v2C*' : 'n2C*', $val);
3385
+ my $end = 2 + $a[0] * $a[1];
3386
+ if ($end > @a) {
3387
+ # try swapping byte order (I have seen this order different than in EXIF)
3388
+ my ($x, $y) = unpack('n2',pack('v2',$a[0],$a[1]));
3389
+ if (@a < 2 + $x * $y) {
3390
+ $self->Warn('Invalid CFAPattern', 1);
3391
+ } else {
3392
+ ($a[0], $a[1]) = ($x, $y);
3393
+ # (can't technically be wrong because the order isn't well defined by the EXIF spec)
3394
+ # $self->Warn('Wrong byte order for CFAPattern');
3395
+ }
3396
+ }
3397
+ return "@a";
3398
+ }
3399
+
3400
+ #------------------------------------------------------------------------------
3401
+ # Print CFA Pattern
3402
+ sub PrintCFAPattern($)
3403
+ {
3404
+ my $val = shift;
3405
+ my @a = split ' ', $val;
3406
+ return '<truncated data>' unless @a >= 2;
3407
+ return '<zero pattern size>' unless $a[0] and $a[1];
3408
+ my $end = 2 + $a[0] * $a[1];
3409
+ return '<invalid pattern size>' if $end > @a;
3410
+ my @cfaColor = qw(Red Green Blue Cyan Magenta Yellow White);
3411
+ my ($pos, $rtnVal) = (2, '[');
3412
+ for (;;) {
3413
+ $rtnVal .= $cfaColor[$a[$pos]] || 'Unknown';
3414
+ last if ++$pos >= $end;
3415
+ ($pos - 2) % $a[1] and $rtnVal .= ',', next;
3416
+ $rtnVal .= '][';
3417
+ }
3418
+ return $rtnVal . ']';
3419
+ }
3420
+
3421
+ #------------------------------------------------------------------------------
3422
+ # Print conversion for lens info
3423
+ # Inputs: 0) string of values (min focal, max focal, min F, max F)
3424
+ # Returns: string in the form "12-20mm f/3.8-4.5" or "50mm f/1.4"
3425
+ sub PrintLensInfo($)
3426
+ {
3427
+ my $val = shift;
3428
+ my @vals = split ' ', $val;
3429
+ return $val unless @vals == 4;
3430
+ my $c = 0;
3431
+ foreach (@vals) {
3432
+ Image::ExifTool::IsFloat($_) and ++$c, next;
3433
+ $_ eq 'inf' and $_ = '?', ++$c, next;
3434
+ $_ eq 'undef' and $_ = '?', ++$c, next;
3435
+ }
3436
+ return $val unless $c == 4;
3437
+ $val = $vals[0];
3438
+ # (the Pentax Q writes zero for upper value of fixed-focal-length lenses)
3439
+ $val .= "-$vals[1]" if $vals[1] and $vals[1] ne $vals[0];
3440
+ $val .= "mm f/$vals[2]";
3441
+ $val .= "-$vals[3]" if $vals[3] and $vals[3] ne $vals[2];
3442
+ return $val;
3443
+ }
3444
+
3445
+ #------------------------------------------------------------------------------
3446
+ # Get lens info from lens model string
3447
+ # Inputs: 0) lens string, 1) flag to allow unknown "?" values
3448
+ # Returns: 0) min focal, 1) max focal, 2) min aperture, 3) max aperture
3449
+ # Notes: returns empty list if lens string could not be parsed
3450
+ sub GetLensInfo($;$)
3451
+ {
3452
+ my ($lens, $unk) = @_;
3453
+ # extract focal length and aperture ranges for this lens
3454
+ my $pat = '\\d+(?:\\.\\d+)?';
3455
+ $pat .= '|\\?' if $unk;
3456
+ return () unless $lens =~ /($pat)(?:-($pat))?\s*mm.*?(?:[fF]\/?\s*)($pat)(?:-($pat))?/;
3457
+ # ($1=short focal, $2=long focal, $3=max aperture wide, $4=max aperture tele)
3458
+ my @a = ($1, $2, $3, $4);
3459
+ $a[1] or $a[1] = $a[0];
3460
+ $a[3] or $a[3] = $a[2];
3461
+ if ($unk) {
3462
+ local $_;
3463
+ $_ eq '?' and $_ = 'undef' foreach @a;
3464
+ }
3465
+ return @a;
3466
+ }
3467
+
3468
+ #------------------------------------------------------------------------------
3469
+ # Attempt to identify the specific lens if multiple lenses have the same LensType
3470
+ # Inputs: 0) ExifTool object ref, 1) LensType print value, 2) PrintConv hash ref,
3471
+ # 3) LensSpec print value, 4) LensType numerical value, 5) FocalLength,
3472
+ # 6) MaxAperture, 7) MaxApertureValue, 8) MinFocalLength, 9) MaxFocalLength,
3473
+ # 10) LensModel, 11) LensFocalRange, 12) LensSpec
3474
+ sub PrintLensID($$@)
3475
+ {
3476
+ my ($exifTool, $lensTypePrt, $printConv, $lensSpecPrt, $lensType, $focalLength,
3477
+ $maxAperture, $maxApertureValue, $shortFocal, $longFocal, $lensModel,
3478
+ $lensFocalRange, $lensSpec) = @_;
3479
+ # the rest of the logic relies on the LensType lookup:
3480
+ return undef unless defined $lensType;
3481
+ # get print conversion hash if necessary
3482
+ $printConv or $printConv = $exifTool->{TAG_INFO}{LensType}{PrintConv};
3483
+ # just copy LensType PrintConv value if it was a lens name
3484
+ # (Olympus or Panasonic -- just exclude things like Nikon and Leaf LensType)
3485
+ unless (ref $printConv eq 'HASH') {
3486
+ return $lensTypePrt if $lensTypePrt =~ /mm/;
3487
+ return $lensTypePrt if $lensTypePrt =~ s/(\d)\/F/$1mm F/;
3488
+ return undef;
3489
+ }
3490
+ # get LensSpec information if available (Sony)
3491
+ my ($sf0, $lf0, $sa0, $la0);
3492
+ if ($lensSpecPrt) {
3493
+ ($sf0, $lf0, $sa0, $la0) = GetLensInfo($lensSpecPrt);
3494
+ undef $sf0 unless $sa0; # (make sure aperture isn't zero)
3495
+ }
3496
+ # use MaxApertureValue if MaxAperture is not available
3497
+ $maxAperture = $maxApertureValue unless $maxAperture;
3498
+ if ($lensFocalRange and $lensFocalRange =~ /^(\d+)(?: (?:to )?(\d+))?$/) {
3499
+ ($shortFocal, $longFocal) = ($1, $2 || $1);
3500
+ }
3501
+ if ($shortFocal and $longFocal) {
3502
+ # Canon (and some other makes) include makernote information
3503
+ # which allows better lens identification
3504
+ require Image::ExifTool::Canon;
3505
+ return Image::ExifTool::Canon::PrintLensID($printConv, $lensType,
3506
+ $shortFocal, $longFocal, $maxAperture, $lensModel);
3507
+ }
3508
+ my $lens = $$printConv{$lensType};
3509
+ return ($lensModel || $lensTypePrt) unless $lens;
3510
+ return $lens unless $$printConv{"$lensType.1"};
3511
+ $lens =~ s/ or .*//s; # remove everything after "or"
3512
+ # make list of all possible matching lenses
3513
+ my @lenses = ( $lens );
3514
+ my $i;
3515
+ for ($i=1; $$printConv{"$lensType.$i"}; ++$i) {
3516
+ push @lenses, $$printConv{"$lensType.$i"};
3517
+ }
3518
+ # attempt to determine actual lens
3519
+ my (@matches, @best, @user, $diff);
3520
+ foreach $lens (@lenses) {
3521
+ push @user, $lens if $Image::ExifTool::userLens{$lens};
3522
+ # sf = short focal
3523
+ # lf = long focal
3524
+ # sa = max aperture at short focal
3525
+ # la = max aperture at long focal
3526
+ my ($sf, $lf, $sa, $la) = GetLensInfo($lens);
3527
+ next unless $sf;
3528
+ # check against LensSpec parameters if available
3529
+ if ($sf0) {
3530
+ next if abs($sf - $sf0) > 0.5 or abs($sa - $sa0) > 0.15 or
3531
+ abs($lf - $lf0) > 0.5 or abs($la - $la0) > 0.15;
3532
+ # the basic parameters match, but also check against additional lens features
3533
+ # for Sony E lenses -- the full LensSpec string should match with end of LensType
3534
+ $lensSpecPrt and $lens =~ /\Q$lensSpecPrt\E$/ and @best = ( $lens ), last;
3535
+ # exactly-matching Sony E lens should have been found above, so skip
3536
+ # any not-exactly-matching Sony E-lenses
3537
+ next if $lens =~ /^Sony E /;
3538
+ push @best, $lens;
3539
+ next;
3540
+ }
3541
+ # adjust focal length and aperture if teleconverter is attached (Minolta)
3542
+ if ($lens =~ / \+ .*? (\d+(\.\d+)?)x( |$)/) {
3543
+ $sf *= $1; $lf *= $1;
3544
+ $sa *= $1; $la *= $1;
3545
+ }
3546
+ # see if we can rule out this lens using FocalLength and MaxAperture
3547
+ if ($focalLength) {
3548
+ next if $focalLength < $sf - 0.5;
3549
+ next if $focalLength > $lf + 0.5;
3550
+ }
3551
+ if ($maxAperture) {
3552
+ # it seems that most manufacturers set MaxAperture and MaxApertureValue
3553
+ # to the maximum aperture (smallest F number) for the current focal length
3554
+ # of the lens, so assume that MaxAperture varies with focal length and find
3555
+ # the closest match (this is somewhat contrary to the EXIF specification which
3556
+ # states "The smallest F number of the lens", without mention of focal length)
3557
+ next if $maxAperture < $sa - 0.15; # (0.15 is arbitrary)
3558
+ next if $maxAperture > $la + 0.15;
3559
+ # now determine the best match for this aperture
3560
+ my $aa; # approximate maximum aperture at this focal length
3561
+ if ($sf == $lf or $sa == $la or $focalLength <= $sf) {
3562
+ # either 1) prime lens, 2) fixed-aperture zoom, or 3) zoom at min focal
3563
+ $aa = $sa;
3564
+ } elsif ($focalLength >= $lf) {
3565
+ $aa = $la;
3566
+ } else {
3567
+ # assume a log-log variation of max aperture with focal length
3568
+ # (see http://regex.info/blog/2006-10-05/263)
3569
+ $aa = exp(log($sa) + (log($la)-log($sa)) / (log($lf)-log($sf)) *
3570
+ (log($focalLength)-log($sf)));
3571
+ # a linear relationship between 1/FocalLength and 1/MaxAperture fits Sony better (ref 27)
3572
+ #$aa = 1 / (1/$sa + (1/$focalLength - 1/$sf) * (1/$la - 1/$sa) / (1/$lf - 1/$sf));
3573
+ }
3574
+ my $d = abs($maxAperture - $aa);
3575
+ if (defined $diff) {
3576
+ $d > $diff + 0.15 and next; # (0.15 is arbitrary)
3577
+ $d < $diff - 0.15 and undef @best;
3578
+ }
3579
+ $diff = $d;
3580
+ push @best, $lens;
3581
+ }
3582
+ push @matches, $lens;
3583
+ }
3584
+ if (@user) {
3585
+ # choose the best match if we have more than one
3586
+ if (@user > 1) {
3587
+ my ($try, @good);
3588
+ foreach $try (\@best, \@matches) {
3589
+ $Image::ExifTool::userLens{$_} and push @good, $_ foreach @$try;
3590
+ return join(' or ', @good) if @good;
3591
+ }
3592
+ }
3593
+ return join(' or ', @user);
3594
+ }
3595
+ return join(' or ', @best) if @best;
3596
+ return join(' or ', @matches) if @matches;
3597
+ $lens = $$printConv{$lensType};
3598
+ return $lensModel if $lensModel and $lens =~ / or /; # (ie. Sony NEX-5N)
3599
+ return $lens;
3600
+ }
3601
+
3602
+ #------------------------------------------------------------------------------
3603
+ # translate date into standard EXIF format
3604
+ # Inputs: 0) date
3605
+ # Returns: date in format '2003:10:22'
3606
+ # - bad formats recognized: '2003-10-22','2003/10/22','2003 10 22','20031022'
3607
+ # - removes null terminator if it exists
3608
+ sub ExifDate($)
3609
+ {
3610
+ my $date = shift;
3611
+ $date =~ s/\0$//; # remove any null terminator
3612
+ # separate year:month:day with colons
3613
+ # (have seen many other characters, including nulls, used erroneously)
3614
+ $date =~ s/(\d{4})[^\d]*(\d{2})[^\d]*(\d{2})$/$1:$2:$3/;
3615
+ return $date;
3616
+ }
3617
+
3618
+ #------------------------------------------------------------------------------
3619
+ # translate time into standard EXIF format
3620
+ # Inputs: 0) time
3621
+ # Returns: time in format '10:30:55'
3622
+ # - bad formats recognized: '10 30 55', '103055', '103055+0500'
3623
+ # - removes null terminator if it exists
3624
+ # - leaves time zone intact if specified (ie. '10:30:55+05:00')
3625
+ sub ExifTime($)
3626
+ {
3627
+ my $time = shift;
3628
+ $time =~ tr/ /:/; # use ':' (not ' ') as a separator
3629
+ $time =~ s/\0$//; # remove any null terminator
3630
+ # add separators if they don't exist
3631
+ $time =~ s/^(\d{2})(\d{2})(\d{2})/$1:$2:$3/;
3632
+ $time =~ s/([+-]\d{2})(\d{2})\s*$/$1:$2/; # to timezone too
3633
+ return $time;
3634
+ }
3635
+
3636
+ #------------------------------------------------------------------------------
3637
+ # extract image from file
3638
+ # Inputs: 0) ExifTool object reference, 1) data offset (in file), 2) data length
3639
+ # 3) [optional] tag name
3640
+ # Returns: Reference to Image if specifically requested or "Binary data" message
3641
+ # Returns undef if there was an error loading the image
3642
+ sub ExtractImage($$$$)
3643
+ {
3644
+ my ($exifTool, $offset, $len, $tag) = @_;
3645
+ my $dataPt = \$exifTool->{EXIF_DATA};
3646
+ my $dataPos = $exifTool->{EXIF_POS};
3647
+ my $image;
3648
+
3649
+ # no image if length is zero, and don't try to extract binary from XMP file
3650
+ return undef if not $len or $$exifTool{FILE_TYPE} eq 'XMP';
3651
+
3652
+ # take data from EXIF block if possible
3653
+ if (defined $dataPos and $offset>=$dataPos and $offset+$len<=$dataPos+length($$dataPt)) {
3654
+ $image = substr($$dataPt, $offset-$dataPos, $len);
3655
+ } else {
3656
+ $image = $exifTool->ExtractBinary($offset, $len, $tag);
3657
+ return undef unless defined $image;
3658
+ # patch for incorrect ThumbnailOffset in some Sony DSLR-A100 ARW images
3659
+ if ($tag and $tag eq 'ThumbnailImage' and $$exifTool{TIFF_TYPE} eq 'ARW' and
3660
+ $$exifTool{Model} eq 'DSLR-A100' and $offset < 0x10000 and
3661
+ $image !~ /^(Binary data|\xff\xd8\xff)/)
3662
+ {
3663
+ my $try = $exifTool->ExtractBinary($offset + 0x10000, $len, $tag);
3664
+ if (defined $try and $try =~ /^\xff\xd8\xff/) {
3665
+ $image = $try;
3666
+ $exifTool->{VALUE}->{ThumbnailOffset} += 0x10000;
3667
+ $exifTool->Warn('Adjusted incorrect A100 ThumbnailOffset', 1);
3668
+ }
3669
+ }
3670
+ }
3671
+ return $exifTool->ValidateImage(\$image, $tag);
3672
+ }
3673
+
3674
+ #------------------------------------------------------------------------------
3675
+ # Process EXIF directory
3676
+ # Inputs: 0) ExifTool object reference
3677
+ # 1) Reference to directory information hash
3678
+ # 2) Pointer to tag table for this directory
3679
+ # Returns: 1 on success, otherwise returns 0 and sets a Warning
3680
+ sub ProcessExif($$$)
3681
+ {
3682
+ my ($exifTool, $dirInfo, $tagTablePtr) = @_;
3683
+ my $dataPt = $$dirInfo{DataPt};
3684
+ my $dataPos = $$dirInfo{DataPos} || 0;
3685
+ my $dataLen = $$dirInfo{DataLen};
3686
+ my $dirStart = $$dirInfo{DirStart} || 0;
3687
+ my $dirLen = $$dirInfo{DirLen} || $dataLen - $dirStart;
3688
+ my $dirName = $$dirInfo{DirName};
3689
+ my $base = $$dirInfo{Base} || 0;
3690
+ my $firstBase = $base;
3691
+ my $raf = $$dirInfo{RAF};
3692
+ my $verbose = $exifTool->Options('Verbose');
3693
+ my $htmlDump = $exifTool->{HTML_DUMP};
3694
+ my $success = 1;
3695
+ my ($tagKey, $dirSize, $makerAddr, $strEnc);
3696
+ my $inMakerNotes = $tagTablePtr->{GROUPS}{0} eq 'MakerNotes';
3697
+
3698
+ # set encoding to assume for strings
3699
+ $strEnc = $exifTool->Options('CharsetEXIF') if $$tagTablePtr{GROUPS}{0} eq 'EXIF';
3700
+
3701
+ # ignore non-standard EXIF while in strict MWG compatibility mode
3702
+ if ($Image::ExifTool::MWG::strict and $dirName eq 'IFD0' and
3703
+ $tagTablePtr eq \%Image::ExifTool::Exif::Main and
3704
+ $$exifTool{FILE_TYPE} =~ /^(JPEG|TIFF|PSD)$/)
3705
+ {
3706
+ my $path = $exifTool->MetadataPath();
3707
+ unless ($path =~ /^(JPEG-APP1-IFD0|TIFF-IFD0|PSD-EXIFInfo-IFD0)$/) {
3708
+ $exifTool->Warn("Ignored non-standard EXIF at $path");
3709
+ return 1;
3710
+ }
3711
+ }
3712
+ $verbose = -1 if $htmlDump; # mix htmlDump into verbose so we can test for both at once
3713
+ $dirName eq 'EXIF' and $dirName = $$dirInfo{DirName} = 'IFD0';
3714
+ $$dirInfo{Multi} = 1 if $dirName =~ /^(IFD0|SubIFD)$/ and not defined $$dirInfo{Multi};
3715
+ # get a more descriptive name for MakerNote sub-directories
3716
+ my $name = $$dirInfo{Name};
3717
+ $name = $dirName unless $name and $inMakerNotes and $name !~ /^MakerNote/;
3718
+
3719
+ my ($numEntries, $dirEnd);
3720
+ if ($dirStart >= 0 and $dirStart <= $dataLen-2) {
3721
+ # make sure data is large enough (patches bug in Olympus subdirectory lengths)
3722
+ $numEntries = Get16u($dataPt, $dirStart);
3723
+ $dirSize = 2 + 12 * $numEntries;
3724
+ $dirEnd = $dirStart + $dirSize;
3725
+ if ($dirSize > $dirLen) {
3726
+ if ($verbose > 0 and not $$dirInfo{SubIFD}) {
3727
+ my $short = $dirSize - $dirLen;
3728
+ $exifTool->Warn("Short directory size (missing $short bytes)");
3729
+ }
3730
+ undef $dirSize if $dirEnd > $dataLen; # read from file if necessary
3731
+ }
3732
+ }
3733
+ # read IFD from file if necessary
3734
+ unless ($dirSize) {
3735
+ $success = 0;
3736
+ if ($raf) {
3737
+ # read the count of entries in this IFD
3738
+ my $offset = $dirStart + $dataPos;
3739
+ my ($buff, $buf2);
3740
+ if ($raf->Seek($offset + $base, 0) and $raf->Read($buff,2) == 2) {
3741
+ my $len = 12 * Get16u(\$buff,0);
3742
+ # also read next IFD pointer if available
3743
+ if ($raf->Read($buf2, $len+4) >= $len) {
3744
+ $buff .= $buf2;
3745
+ # make copy of dirInfo since we're going to modify it
3746
+ my %newDirInfo = %$dirInfo;
3747
+ $dirInfo = \%newDirInfo;
3748
+ # update directory parameters for the newly loaded IFD
3749
+ $dataPt = $$dirInfo{DataPt} = \$buff;
3750
+ $dataPos = $$dirInfo{DataPos} = $offset;
3751
+ $dataLen = $$dirInfo{DataLen} = length $buff;
3752
+ $dirStart = $$dirInfo{DirStart} = 0;
3753
+ $dirLen = $$dirInfo{DirLen} = length $buff;
3754
+ $success = 1;
3755
+ }
3756
+ }
3757
+ }
3758
+ unless ($success) {
3759
+ $exifTool->Warn("Bad $name directory");
3760
+ return 0;
3761
+ }
3762
+ $numEntries = Get16u($dataPt, $dirStart);
3763
+ $dirSize = 2 + 12 * $numEntries;
3764
+ $dirEnd = $dirStart + $dirSize;
3765
+ }
3766
+ $verbose > 0 and $exifTool->VerboseDir($dirName, $numEntries);
3767
+ my $bytesFromEnd = $dataLen - $dirEnd;
3768
+ if ($bytesFromEnd < 4) {
3769
+ unless ($bytesFromEnd==2 or $bytesFromEnd==0) {
3770
+ $exifTool->Warn("Illegal $name directory size ($numEntries entries)");
3771
+ return 0;
3772
+ }
3773
+ }
3774
+ # fix base offset for maker notes if necessary
3775
+ if (defined $$dirInfo{MakerNoteAddr}) {
3776
+ $makerAddr = $$dirInfo{MakerNoteAddr};
3777
+ delete $$dirInfo{MakerNoteAddr};
3778
+ if (Image::ExifTool::MakerNotes::FixBase($exifTool, $dirInfo)) {
3779
+ $base = $$dirInfo{Base};
3780
+ $dataPos = $$dirInfo{DataPos};
3781
+ }
3782
+ }
3783
+ if ($htmlDump) {
3784
+ my $longName = $name eq 'MakerNotes' ? ($$dirInfo{Name} || $name) : $name;
3785
+ if (defined $makerAddr) {
3786
+ my $hdrLen = $dirStart + $dataPos + $base - $makerAddr;
3787
+ $exifTool->HDump($makerAddr, $hdrLen, "MakerNotes header", $longName) if $hdrLen > 0;
3788
+ }
3789
+ unless ($$dirInfo{NoDumpEntryCount}) {
3790
+ $exifTool->HDump($dirStart + $dataPos + $base, 2, "$longName entries",
3791
+ "Entry count: $numEntries");
3792
+ }
3793
+ my $tip;
3794
+ if ($bytesFromEnd >= 4) {
3795
+ my $nxt = ($name =~ /^(.*?)(\d+)$/) ? $1 . ($2 + 1) : 'Next IFD';
3796
+ $tip = sprintf("$nxt offset: 0x%.4x", Get32u($dataPt, $dirEnd));
3797
+ }
3798
+ $exifTool->HDump($dirEnd + $dataPos + $base, 4, "Next IFD", $tip, 0);
3799
+ }
3800
+
3801
+ # patch for Canon EOS 40D firmware 1.0.4 bug (incorrect directory counts)
3802
+ # (must do this before parsing directory or CameraSettings offset will be suspicious)
3803
+ if ($inMakerNotes and $$exifTool{Model} eq 'Canon EOS 40D') {
3804
+ my $entry = $dirStart + 2 + 12 * ($numEntries - 1);
3805
+ my $fmt = Get16u($dataPt, $entry + 2);
3806
+ if ($fmt < 1 or $fmt > 13) {
3807
+ $exifTool->HDump($entry+$dataPos+$base,12,"[invalid IFD entry]",
3808
+ "Bad format type: $fmt", 1);
3809
+ # adjust the number of directory entries
3810
+ --$numEntries;
3811
+ $dirEnd -= 12;
3812
+ }
3813
+ }
3814
+
3815
+ # loop through all entries in an EXIF directory (IFD)
3816
+ my ($index, $valEnd, $offList, $offHash);
3817
+ my $warnCount = 0;
3818
+ for ($index=0; $index<$numEntries; ++$index) {
3819
+ if ($warnCount > 10) {
3820
+ $exifTool->Warn("Too many warnings -- $name parsing aborted", 2) and return 0;
3821
+ }
3822
+ my $entry = $dirStart + 2 + 12 * $index;
3823
+ my $tagID = Get16u($dataPt, $entry);
3824
+ my $format = Get16u($dataPt, $entry+2);
3825
+ my $count = Get32u($dataPt, $entry+4);
3826
+ if ($format < 1 or $format > 13) {
3827
+ $exifTool->HDump($entry+$dataPos+$base,12,"[invalid IFD entry]",
3828
+ "Bad format type: $format", 1);
3829
+ # warn unless the IFD was just padded with zeros
3830
+ if ($format) {
3831
+ $exifTool->Warn("Bad format ($format) for $name entry $index", $inMakerNotes);
3832
+ ++$warnCount;
3833
+ }
3834
+ return 0 unless $index; # assume corrupted IFD if this is our first entry
3835
+ next;
3836
+ }
3837
+ my $formatStr = $formatName[$format]; # get name of this format
3838
+ my $valueDataPt = $dataPt;
3839
+ my $valueDataPos = $dataPos;
3840
+ my $valueDataLen = $dataLen;
3841
+ my $valuePtr = $entry + 8; # pointer to value within $$dataPt
3842
+ my $tagInfo = $exifTool->GetTagInfo($tagTablePtr, $tagID);
3843
+ my ($origFormStr, $bad, $rational);
3844
+ # hack to patch incorrect count in Kodak SubIFD3 tags
3845
+ if ($count < 2 and ref $$tagTablePtr{$tagID} eq 'HASH' and $$tagTablePtr{$tagID}{FixCount}) {
3846
+ $offList or ($offList, $offHash) = GetOffList($dataPt, $dirStart, $dataPos,
3847
+ $numEntries, $tagTablePtr);
3848
+ my $i = $$offHash{Get32u($dataPt, $valuePtr)};
3849
+ if (defined $i and $i < $#$offList) {
3850
+ my $oldCount = $count;
3851
+ $count = int(($$offList[$i+1] - $$offList[$i]) / $formatSize[$format]);
3852
+ $origFormStr = $formatName[$format] . '[' . $oldCount . ']' if $oldCount != $count;
3853
+ }
3854
+ }
3855
+ my $size = $count * $formatSize[$format];
3856
+ my $readSize = $size;
3857
+ if ($size > 4) {
3858
+ if ($size > 0x7fffffff) {
3859
+ $exifTool->Warn(sprintf("Invalid size (%u) for %s tag 0x%.4x", $size, $name, $tagID));
3860
+ ++$warnCount;
3861
+ next;
3862
+ }
3863
+ $valuePtr = Get32u($dataPt, $valuePtr);
3864
+ # fix valuePtr if necessary
3865
+ if ($$dirInfo{FixOffsets}) {
3866
+ my $wFlag;
3867
+ $valEnd or $valEnd = $dataPos + $dirEnd + 4;
3868
+ #### eval FixOffsets ($valuePtr, $valEnd, $size, $tagID, $wFlag)
3869
+ eval $$dirInfo{FixOffsets};
3870
+ }
3871
+ my $suspect;
3872
+ # offset shouldn't point into TIFF header
3873
+ $valuePtr < 8 and not $$dirInfo{ZeroOffsetOK} and $suspect = $warnCount;
3874
+ # convert offset to pointer in $$dataPt
3875
+ if ($$dirInfo{EntryBased} or (ref $$tagTablePtr{$tagID} eq 'HASH' and
3876
+ $tagTablePtr->{$tagID}{EntryBased}))
3877
+ {
3878
+ $valuePtr += $entry;
3879
+ } else {
3880
+ $valuePtr -= $dataPos;
3881
+ }
3882
+ # value shouldn't overlap our directory
3883
+ $suspect = $warnCount if $valuePtr < $dirEnd and $valuePtr+$size > $dirStart;
3884
+ # load value from file if necessary
3885
+ if ($valuePtr < 0 or $valuePtr+$size > $dataLen) {
3886
+ # get value by seeking in file if we are allowed
3887
+ my $buff;
3888
+ if ($raf) {
3889
+ # avoid loading large binary data unless necessary
3890
+ # (ie. ImageSourceData -- layers in Photoshop TIFF image)
3891
+ while ($size > BINARY_DATA_LIMIT) {
3892
+ if ($tagInfo) {
3893
+ # make large unknown blocks binary data
3894
+ $$tagInfo{Binary} = 1 if $$tagInfo{Unknown};
3895
+ last unless $$tagInfo{Binary}; # must read non-binary data
3896
+ last if $$tagInfo{SubDirectory}; # must read SubDirectory data
3897
+ my $lcTag = lc($$tagInfo{Name});
3898
+ if ($exifTool->{OPTIONS}{Binary} and
3899
+ not $exifTool->{EXCL_TAG_LOOKUP}{$lcTag})
3900
+ {
3901
+ # read binary data if specified unless tagsFromFile won't use it
3902
+ last unless $$exifTool{TAGS_FROM_FILE} and $$tagInfo{Protected};
3903
+ }
3904
+ # must read if tag is specified by name
3905
+ last if $exifTool->{REQ_TAG_LOOKUP}{$lcTag};
3906
+ } else {
3907
+ # must read value if needed for a condition
3908
+ last if defined $tagInfo;
3909
+ }
3910
+ # (note: changing the value without changing $size will cause
3911
+ # a warning in the verbose output, but we need to maintain the
3912
+ # proper size for the htmlDump, so we can't change this)
3913
+ $buff = "Binary data $size bytes";
3914
+ $readSize = length $buff;
3915
+ last;
3916
+ }
3917
+ # read from file if necessary
3918
+ unless (defined $buff or
3919
+ ($raf->Seek($base + $valuePtr + $dataPos,0) and
3920
+ $raf->Read($buff,$size) == $size))
3921
+ {
3922
+ $exifTool->Warn("Error reading value for $name entry $index", $inMakerNotes);
3923
+ return 0 unless $inMakerNotes or $htmlDump;
3924
+ ++$warnCount;
3925
+ $buff = '' unless defined $buff;
3926
+ $readSize = length $buff;
3927
+ $bad = 1;
3928
+ }
3929
+ $valueDataLen = length $buff;
3930
+ $valueDataPt = \$buff;
3931
+ $valueDataPos = $valuePtr + $dataPos;
3932
+ $valuePtr = 0;
3933
+ } else {
3934
+ my ($tagStr, $tmpInfo);
3935
+ if ($tagInfo) {
3936
+ $tagStr = $$tagInfo{Name};
3937
+ } elsif (defined $tagInfo) {
3938
+ $tmpInfo = $exifTool->GetTagInfo($tagTablePtr, $tagID, \ '', $formatStr, $count);
3939
+ $tagStr = $$tmpInfo{Name} if $tmpInfo;
3940
+ }
3941
+ if ($tagInfo and $$tagInfo{ChangeBase}) {
3942
+ # adjust base offset for this tag only
3943
+ #### eval ChangeBase ($dirStart,$dataPos)
3944
+ my $newBase = eval $$tagInfo{ChangeBase};
3945
+ $valuePtr += $newBase;
3946
+ }
3947
+ $tagStr or $tagStr = sprintf("tag 0x%.4x",$tagID);
3948
+ # allow PreviewImage to run outside EXIF data
3949
+ if ($tagStr eq 'PreviewImage' and $exifTool->{RAF}) {
3950
+ my $pos = $exifTool->{RAF}->Tell();
3951
+ $buff = $exifTool->ExtractBinary($base + $valuePtr + $dataPos, $size, 'PreviewImage');
3952
+ $exifTool->{RAF}->Seek($pos, 0);
3953
+ $valueDataPt = \$buff;
3954
+ $valueDataPos = $valuePtr + $dataPos;
3955
+ $valueDataLen = $size;
3956
+ $valuePtr = 0;
3957
+ } elsif ($tagStr eq 'MakerNoteLeica6' and $exifTool->{RAF}) {
3958
+ if ($verbose > 0) {
3959
+ $exifTool->VPrint(0, "$$exifTool{INDENT}$index) $tagStr --> (outside APP1 segment)\n");
3960
+ }
3961
+ if ($exifTool->Options('FastScan')) {
3962
+ $exifTool->Warn('Ignored Leica MakerNote trailer');
3963
+ } else {
3964
+ require Image::ExifTool::Fixup;
3965
+ $$exifTool{LeicaTrailer} = {
3966
+ TagInfo => $tagInfo || $tmpInfo,
3967
+ Offset => $base + $valuePtr + $dataPos,
3968
+ Size => $size,
3969
+ Fixup => new Image::ExifTool::Fixup,
3970
+ };
3971
+ }
3972
+ } else {
3973
+ $exifTool->Warn("Bad $name offset for $tagStr");
3974
+ ++$warnCount;
3975
+ }
3976
+ unless (defined $buff) {
3977
+ $valueDataPt = '';
3978
+ $valueDataPos = $valuePtr + $dataPos;
3979
+ $valueDataLen = 0;
3980
+ $valuePtr = 0;
3981
+ $bad = 1;
3982
+ }
3983
+ }
3984
+ }
3985
+ # warn about suspect offsets if they didn't already cause another warning
3986
+ if (defined $suspect and $suspect == $warnCount) {
3987
+ my $tagStr = $tagInfo ? $$tagInfo{Name} : sprintf('tag 0x%.4x', $tagID);
3988
+ if ($exifTool->Warn("Suspicious $name offset for $tagStr", $inMakerNotes)) {
3989
+ ++$warnCount;
3990
+ next unless $verbose;
3991
+ }
3992
+ }
3993
+ }
3994
+ # treat single unknown byte as int8u
3995
+ $formatStr = 'int8u' if $format == 7 and $count == 1;
3996
+
3997
+ my ($val, $subdir, $wrongFormat);
3998
+ if ($tagID > 0xf000 and $tagTablePtr eq \%Image::ExifTool::Exif::Main) {
3999
+ my $oldInfo = $$tagTablePtr{$tagID};
4000
+ if ((not $oldInfo or (ref $oldInfo eq 'HASH' and $$oldInfo{Condition} and
4001
+ not $$oldInfo{PSRaw})) and not $bad)
4002
+ {
4003
+ # handle special case of Photoshop RAW tags (0xfde8-0xfe58)
4004
+ # --> generate tags from the value if possible
4005
+ $val = ReadValue($valueDataPt,$valuePtr,$formatStr,$count,$readSize);
4006
+ if (defined $val and $val =~ /(.*): (.*)/) {
4007
+ my $tag = $1;
4008
+ $val = $2;
4009
+ $tag =~ s/'s//; # remove 's (so "Owner's Name" becomes "OwnerName")
4010
+ $tag =~ tr/a-zA-Z0-9_//cd; # remove unknown characters
4011
+ if ($tag) {
4012
+ $tagInfo = {
4013
+ Name => $tag,
4014
+ Condition => '$$self{TIFF_TYPE} ne "DCR"',
4015
+ ValueConv => '$_=$val;s/^.*: //;$_', # remove descr
4016
+ PSRaw => 1, # (just as flag to avoid adding this again)
4017
+ };
4018
+ AddTagToTable($tagTablePtr, $tagID, $tagInfo);
4019
+ # generate conditional list if a conditional tag already existed
4020
+ $$tagTablePtr{$tagID} = [ $oldInfo, $tagInfo ] if $oldInfo;
4021
+ }
4022
+ }
4023
+ }
4024
+ }
4025
+ if (defined $tagInfo and not $tagInfo) {
4026
+ if ($bad) {
4027
+ undef $tagInfo;
4028
+ } else {
4029
+ # GetTagInfo() required the value for a Condition
4030
+ my $tmpVal = substr($$valueDataPt, $valuePtr, $readSize < 128 ? $readSize : 128);
4031
+ # (use original format name in this call -- $formatStr may have been changed to int8u)
4032
+ $tagInfo = $exifTool->GetTagInfo($tagTablePtr, $tagID, \$tmpVal,
4033
+ $formatName[$format], $count);
4034
+ }
4035
+ }
4036
+ # make sure we are handling the 'ifd' format properly
4037
+ if (($format == 13 or $format == 18) and (not $tagInfo or not $$tagInfo{SubIFD})) {
4038
+ my $str = sprintf('%s tag 0x%.4x IFD format not handled', $dirName, $tagID);
4039
+ $exifTool->Warn($str, $inMakerNotes);
4040
+ }
4041
+ if (defined $tagInfo) {
4042
+ my $readFormat = $$tagInfo{Format};
4043
+ $subdir = $$tagInfo{SubDirectory};
4044
+ # unless otherwise specified, all SubDirectory data except
4045
+ # EXIF SubIFD offsets should be unformatted
4046
+ $readFormat = 'undef' if $subdir and not $$tagInfo{SubIFD} and not $readFormat;
4047
+ # override EXIF format if specified
4048
+ if ($readFormat) {
4049
+ $formatStr = $readFormat;
4050
+ my $newNum = $formatNumber{$formatStr};
4051
+ if ($newNum and $newNum != $format) {
4052
+ $origFormStr = $formatName[$format] . '[' . $count . ']';
4053
+ $format = $newNum;
4054
+ # adjust number of items for new format size
4055
+ $count = int($size / $formatSize[$format]);
4056
+ }
4057
+ }
4058
+ # verify that offset-type values are integral
4059
+ if (($$tagInfo{IsOffset} or $$tagInfo{SubIFD}) and not $intFormat{$formatStr}) {
4060
+ $exifTool->Warn("Wrong format ($formatStr) for $name $$tagInfo{Name}");
4061
+ next unless $verbose;
4062
+ $wrongFormat = 1;
4063
+ }
4064
+ } else {
4065
+ next unless $verbose;
4066
+ }
4067
+ unless ($bad) {
4068
+ # limit maximum length of data to reformat
4069
+ # (avoids long delays when processing some corrupted files)
4070
+ if ($count > 100000 and $formatStr !~ /^(undef|string|binary)$/) {
4071
+ my $tagName = $tagInfo ? $$tagInfo{Name} : sprintf('tag 0x%.4x', $tagID);
4072
+ next if $exifTool->Warn("Ignoring $dirName $tagName with excessive count", 2);
4073
+ }
4074
+ # convert according to specified format
4075
+ $val = ReadValue($valueDataPt,$valuePtr,$formatStr,$count,$readSize,\$rational);
4076
+ # re-code if necessary
4077
+ if ($strEnc and $formatStr eq 'string' and defined $val) {
4078
+ $val = $exifTool->Decode($val, $strEnc);
4079
+ }
4080
+ }
4081
+
4082
+ if ($verbose) {
4083
+ my $tval = $val;
4084
+ # also show as a rational
4085
+ $tval .= " ($rational)" if defined $rational;
4086
+ if ($htmlDump) {
4087
+ my ($tagName, $colName);
4088
+ if ($tagID == 0x927c and $dirName eq 'ExifIFD') {
4089
+ $tagName = 'MakerNotes';
4090
+ } elsif ($tagInfo) {
4091
+ $tagName = $$tagInfo{Name};
4092
+ } else {
4093
+ $tagName = sprintf("Tag 0x%.4x",$tagID);
4094
+ }
4095
+ my $dname = sprintf("${name}-%.2d", $index);
4096
+ # build our tool tip
4097
+ $size < 0 and $size = $count * $formatSize[$format];
4098
+ my $fstr = "$formatName[$format]\[$count]";
4099
+ $fstr = "$origFormStr read as $fstr" if $origFormStr and $origFormStr ne $fstr;
4100
+ $fstr .= ' <-- WRONG' if $wrongFormat;
4101
+ my $tip = sprintf("Tag ID: 0x%.4x\n", $tagID) .
4102
+ "Format: $fstr\nSize: $size bytes\n";
4103
+ if ($size > 4) {
4104
+ my $offPt = Get32u($dataPt,$entry+8);
4105
+ my $actPt = $valuePtr + $valueDataPos + $base - ($$exifTool{EXIF_POS} || 0);
4106
+ $tip .= sprintf("Value offset: 0x%.4x\n", $offPt);
4107
+ # highlight tag name (red for bad size)
4108
+ my $style = ($bad or not defined $tval) ? 'V' : 'H';
4109
+ if ($actPt != $offPt) {
4110
+ $tip .= sprintf("Actual offset: 0x%.4x\n", $actPt);
4111
+ my $sign = $actPt < $offPt ? '-' : '';
4112
+ $tip .= sprintf("Offset base: ${sign}0x%.4x\n", abs($actPt - $offPt));
4113
+ $style = 'F' if $style eq 'H'; # purple for different offsets
4114
+ }
4115
+ $colName = "<span class=$style>$tagName</span>";
4116
+ $colName .= ' <span class=V>(odd)</span>' if $offPt & 0x01;
4117
+ } else {
4118
+ $colName = $tagName;
4119
+ }
4120
+ $colName .= ' <span class=V>(err)</span>' if $wrongFormat;
4121
+ if (not defined $tval) {
4122
+ $tval = '<bad size/offset>';
4123
+ } else {
4124
+ $tval = substr($tval,0,28) . '[...]' if length($tval) > 32;
4125
+ if ($formatStr =~ /^(string|undef|binary)/) {
4126
+ # translate non-printable characters
4127
+ $tval =~ tr/\x00-\x1f\x7f-\xff/./;
4128
+ } elsif ($tagInfo and Image::ExifTool::IsInt($tval)) {
4129
+ if ($$tagInfo{IsOffset} or $$tagInfo{SubIFD}) {
4130
+ $tval = sprintf('0x%.4x', $tval);
4131
+ my $actPt = $val + $base - ($$exifTool{EXIF_POS} || 0);
4132
+ if ($actPt != $val) {
4133
+ $tval .= sprintf("\nActual offset: 0x%.4x", $actPt);
4134
+ my $sign = $actPt < $val ? '-' : '';
4135
+ $tval .= sprintf("\nOffset base: ${sign}0x%.4x", abs($actPt - $val));
4136
+ }
4137
+ } elsif ($$tagInfo{PrintHex}) {
4138
+ $tval = sprintf('0x%x', $tval);
4139
+ }
4140
+ }
4141
+ }
4142
+ $tip .= "Value: $tval";
4143
+ $exifTool->HDump($entry+$dataPos+$base, 12, "$dname $colName", $tip, 1);
4144
+ next if $valueDataLen < 0; # don't process bad pointer entry
4145
+ if ($size > 4) {
4146
+ my $exifDumpPos = $valuePtr + $valueDataPos + $base;
4147
+ my $flag = 0;
4148
+ if ($subdir) {
4149
+ if ($$tagInfo{MakerNotes}) {
4150
+ $flag = 0x04;
4151
+ } elsif ($$tagInfo{NestedHtmlDump}) {
4152
+ $flag = $$tagInfo{NestedHtmlDump} == 2 ? 0x10 : 0x04;
4153
+ }
4154
+ }
4155
+ # add value data block (underlining maker notes data)
4156
+ $exifTool->HDump($exifDumpPos,$size,"$tagName value",'SAME', $flag);
4157
+ }
4158
+ } else {
4159
+ my $fstr = $formatName[$format];
4160
+ $fstr = "$origFormStr read as $fstr" if $origFormStr;
4161
+ $exifTool->VerboseInfo($tagID, $tagInfo,
4162
+ Table => $tagTablePtr,
4163
+ Index => $index,
4164
+ Value => $tval,
4165
+ DataPt => $valueDataPt,
4166
+ DataPos => $valueDataPos + $base,
4167
+ Size => $size,
4168
+ Start => $valuePtr,
4169
+ Format => $fstr,
4170
+ Count => $count,
4171
+ );
4172
+ }
4173
+ next if not $tagInfo or $wrongFormat;
4174
+ }
4175
+ next unless defined $val;
4176
+ #..............................................................................
4177
+ # Handle SubDirectory tag types
4178
+ #
4179
+ if ($subdir) {
4180
+ # don't process empty subdirectories
4181
+ unless ($size) {
4182
+ unless ($$tagInfo{MakerNotes} or $inMakerNotes) {
4183
+ $exifTool->Warn("Empty $$tagInfo{Name} data", 1);
4184
+ }
4185
+ next;
4186
+ }
4187
+ my (@values, $newTagTable, $dirNum, $newByteOrder, $invalid);
4188
+ my $tagStr = $$tagInfo{Name};
4189
+ if ($$subdir{MaxSubdirs}) {
4190
+ @values = split ' ', $val;
4191
+ # limit the number of subdirectories we parse
4192
+ my $over = @values - $$subdir{MaxSubdirs};
4193
+ if ($over > 0) {
4194
+ $exifTool->Warn("Ignoring $over $tagStr directories");
4195
+ pop @values while $over--;
4196
+ }
4197
+ $val = shift @values;
4198
+ }
4199
+ if ($$subdir{TagTable}) {
4200
+ $newTagTable = GetTagTable($$subdir{TagTable});
4201
+ $newTagTable or warn("Unknown tag table $$subdir{TagTable}"), next;
4202
+ } else {
4203
+ $newTagTable = $tagTablePtr; # use existing table
4204
+ }
4205
+ # loop through all sub-directories specified by this tag
4206
+ for ($dirNum=0; ; ++$dirNum) {
4207
+ my $subdirBase = $base;
4208
+ my $subdirDataPt = $valueDataPt;
4209
+ my $subdirDataPos = $valueDataPos;
4210
+ my $subdirDataLen = $valueDataLen;
4211
+ my $subdirStart = $valuePtr;
4212
+ if (defined $$subdir{Start}) {
4213
+ # set local $valuePtr relative to file $base for eval
4214
+ my $valuePtr = $subdirStart + $subdirDataPos;
4215
+ #### eval Start ($valuePtr, $val)
4216
+ my $newStart = eval($$subdir{Start});
4217
+ unless (Image::ExifTool::IsInt($newStart)) {
4218
+ $exifTool->Warn("Bad value for $tagStr");
4219
+ last;
4220
+ }
4221
+ # convert back to relative to $subdirDataPt
4222
+ $newStart -= $subdirDataPos;
4223
+ # adjust directory size if necessary
4224
+ unless ($$tagInfo{SubIFD} or $$subdir{BadOffset}) {
4225
+ $size -= $newStart - $subdirStart;
4226
+ }
4227
+ $subdirStart = $newStart;
4228
+ }
4229
+ # this is a pain, but some maker notes are always a specific
4230
+ # byte order, regardless of the byte order of the file
4231
+ my $oldByteOrder = GetByteOrder();
4232
+ $newByteOrder = $$subdir{ByteOrder};
4233
+ if ($newByteOrder) {
4234
+ if ($newByteOrder =~ /^Little/i) {
4235
+ $newByteOrder = 'II';
4236
+ } elsif ($newByteOrder =~ /^Big/i) {
4237
+ $newByteOrder = 'MM';
4238
+ } elsif ($$subdir{OffsetPt}) {
4239
+ undef $newByteOrder;
4240
+ warn "Can't have variable byte ordering for SubDirectories using OffsetPt";
4241
+ last;
4242
+ } elsif ($subdirStart + 2 <= $subdirDataLen) {
4243
+ # attempt to determine the byte ordering by checking
4244
+ # at the number of directory entries. This is an int16u
4245
+ # that should be a reasonable value.
4246
+ my $num = Get16u($subdirDataPt, $subdirStart);
4247
+ if ($num & 0xff00 and ($num>>8) > ($num&0xff)) {
4248
+ # This looks wrong, we shouldn't have this many entries
4249
+ my %otherOrder = ( II=>'MM', MM=>'II' );
4250
+ $newByteOrder = $otherOrder{$oldByteOrder};
4251
+ } else {
4252
+ $newByteOrder = $oldByteOrder;
4253
+ }
4254
+ }
4255
+ } else {
4256
+ $newByteOrder = $oldByteOrder;
4257
+ }
4258
+ # set base offset if necessary
4259
+ if ($$subdir{Base}) {
4260
+ # calculate subdirectory start relative to $base for eval
4261
+ my $start = $subdirStart + $subdirDataPos;
4262
+ #### eval Base ($start,$base)
4263
+ $subdirBase = eval($$subdir{Base}) + $base;
4264
+ }
4265
+ # add offset to the start of the directory if necessary
4266
+ if ($$subdir{OffsetPt}) {
4267
+ #### eval OffsetPt ($valuePtr)
4268
+ my $pos = eval $$subdir{OffsetPt};
4269
+ if ($pos + 4 > $subdirDataLen) {
4270
+ $exifTool->Warn("Bad $tagStr OffsetPt");
4271
+ last;
4272
+ }
4273
+ SetByteOrder($newByteOrder);
4274
+ $subdirStart += Get32u($subdirDataPt, $pos);
4275
+ SetByteOrder($oldByteOrder);
4276
+ }
4277
+ if ($subdirStart < 0 or $subdirStart + 2 > $subdirDataLen) {
4278
+ # convert $subdirStart back to a file offset
4279
+ if ($raf) {
4280
+ # reset SubDirectory buffer (we will load it later)
4281
+ my $buff = '';
4282
+ $subdirDataPt = \$buff;
4283
+ $subdirDataLen = $size = length $buff;
4284
+ } else {
4285
+ my $msg = "Bad $tagStr SubDirectory start";
4286
+ if ($verbose > 0) {
4287
+ if ($subdirStart < 0) {
4288
+ $msg .= " (directory start $subdirStart is before EXIF start)";
4289
+ } else {
4290
+ my $end = $subdirStart + $size;
4291
+ $msg .= " (directory end is $end but EXIF size is only $subdirDataLen)";
4292
+ }
4293
+ }
4294
+ $exifTool->Warn($msg);
4295
+ last;
4296
+ }
4297
+ }
4298
+
4299
+ # must update subdirDataPos if $base changes for this subdirectory
4300
+ $subdirDataPos += $base - $subdirBase;
4301
+
4302
+ # build information hash for new directory
4303
+ my %subdirInfo = (
4304
+ Name => $tagStr,
4305
+ Base => $subdirBase,
4306
+ DataPt => $subdirDataPt,
4307
+ DataPos => $subdirDataPos,
4308
+ DataLen => $subdirDataLen,
4309
+ DirStart => $subdirStart,
4310
+ DirLen => $size,
4311
+ RAF => $raf,
4312
+ Parent => $dirName,
4313
+ DirName => $$subdir{DirName},
4314
+ FixBase => $$subdir{FixBase},
4315
+ FixOffsets => $$subdir{FixOffsets},
4316
+ EntryBased => $$subdir{EntryBased},
4317
+ TagInfo => $tagInfo,
4318
+ SubIFD => $$tagInfo{SubIFD},
4319
+ Subdir => $subdir,
4320
+ );
4321
+ # (remember: some cameras incorrectly write maker notes in IFD0)
4322
+ if ($$tagInfo{MakerNotes}) {
4323
+ # don't parse makernotes if FastScan > 1
4324
+ my $fast = $exifTool->Options('FastScan');
4325
+ last if $fast and $fast > 1;
4326
+ $subdirInfo{MakerNoteAddr} = $valuePtr + $valueDataPos + $base;
4327
+ $subdirInfo{NoFixBase} = 1 if defined $$subdir{Base};
4328
+ }
4329
+ # set directory IFD name from group name of family 1 if it exists,
4330
+ # unless the tag is writable as a block in which case group 1 may
4331
+ # have been set automatically
4332
+ if ($$tagInfo{Groups} and not $$tagInfo{Writable}) {
4333
+ $subdirInfo{DirName} = $tagInfo->{Groups}{1};
4334
+ # number multiple subdirectories
4335
+ $subdirInfo{DirName} =~ s/\d*$/$dirNum/ if $dirNum;
4336
+ }
4337
+ SetByteOrder($newByteOrder); # set byte order for this subdir
4338
+ # validate the subdirectory if necessary
4339
+ my $dirData = $subdirDataPt; # set data pointer to be used in eval
4340
+ #### eval Validate ($val, $dirData, $subdirStart, $size)
4341
+ my $ok = 0;
4342
+ if (defined $$subdir{Validate} and not eval $$subdir{Validate}) {
4343
+ $exifTool->Warn("Invalid $tagStr data");
4344
+ $invalid = 1;
4345
+ } else {
4346
+ if (not $subdirInfo{DirName} and $inMakerNotes) {
4347
+ $subdirInfo{DirName} = $$tagInfo{Name};
4348
+ }
4349
+ # process the subdirectory
4350
+ $ok = $exifTool->ProcessDirectory(\%subdirInfo, $newTagTable, $$subdir{ProcessProc});
4351
+ }
4352
+ # print debugging information if there were errors
4353
+ if (not $ok and $verbose > 1 and $subdirStart != $valuePtr) {
4354
+ my $out = $exifTool->Options('TextOut');
4355
+ printf $out "%s (SubDirectory start = 0x%x)\n", $exifTool->{INDENT}, $subdirStart;
4356
+ }
4357
+ SetByteOrder($oldByteOrder); # restore original byte swapping
4358
+
4359
+ @values or last;
4360
+ $val = shift @values; # continue with next subdir
4361
+ }
4362
+ my $doMaker = $exifTool->Options('MakerNotes');
4363
+ next unless $doMaker or $exifTool->{REQ_TAG_LOOKUP}{lc($tagStr)} or
4364
+ $$tagInfo{BlockExtract};
4365
+ # extract as a block if specified
4366
+ if ($$tagInfo{MakerNotes}) {
4367
+ # save maker note byte order (if it was significant and valid)
4368
+ if ($$subdir{ByteOrder} and not $invalid) {
4369
+ $exifTool->{MAKER_NOTE_BYTE_ORDER} =
4370
+ defined ($exifTool->{UnknownByteOrder}) ?
4371
+ $exifTool->{UnknownByteOrder} : $newByteOrder;
4372
+ }
4373
+ if ($doMaker and $doMaker eq '2') {
4374
+ # extract maker notes without rebuilding (no fixup information)
4375
+ delete $exifTool->{MAKER_NOTE_FIXUP};
4376
+ } elsif (not $$tagInfo{NotIFD}) {
4377
+ # this is a pain, but we must rebuild EXIF-typemaker notes to
4378
+ # include all the value data if data was outside the maker notes
4379
+ my %makerDirInfo = (
4380
+ Name => $tagStr,
4381
+ Base => $base,
4382
+ DataPt => $valueDataPt,
4383
+ DataPos => $valueDataPos,
4384
+ DataLen => $valueDataLen,
4385
+ DirStart => $valuePtr,
4386
+ DirLen => $size,
4387
+ RAF => $raf,
4388
+ Parent => $dirName,
4389
+ DirName => 'MakerNotes',
4390
+ FixOffsets => $$subdir{FixOffsets},
4391
+ TagInfo => $tagInfo,
4392
+ );
4393
+ $makerDirInfo{FixBase} = 1 if $$subdir{FixBase};
4394
+ # rebuild maker notes (creates $exifTool->{MAKER_NOTE_FIXUP})
4395
+ my $val2 = RebuildMakerNotes($exifTool, $newTagTable, \%makerDirInfo);
4396
+ if (defined $val2) {
4397
+ $val = $val2;
4398
+ } elsif ($size > 4) {
4399
+ $exifTool->Warn('Error rebuilding maker notes (may be corrupt)');
4400
+ }
4401
+ }
4402
+ } else {
4403
+ # extract this directory as a block if specified
4404
+ next unless $$tagInfo{Writable};
4405
+ }
4406
+ }
4407
+ #..............................................................................
4408
+ # convert to absolute offsets if this tag is an offset
4409
+ #### eval IsOffset ($val, $exifTool)
4410
+ if ($$tagInfo{IsOffset} and eval $$tagInfo{IsOffset}) {
4411
+ my $offsetBase = $$tagInfo{IsOffset} eq '2' ? $firstBase : $base;
4412
+ $offsetBase += $$exifTool{BASE};
4413
+ # handle offsets which use a wrong base (Minolta A200)
4414
+ if ($$tagInfo{WrongBase}) {
4415
+ my $self = $exifTool;
4416
+ #### eval WrongBase ($self)
4417
+ $offsetBase += eval $$tagInfo{WrongBase} || 0;
4418
+ }
4419
+ my @vals = split(' ',$val);
4420
+ foreach $val (@vals) {
4421
+ $val += $offsetBase;
4422
+ }
4423
+ $val = join(' ', @vals);
4424
+ }
4425
+ # save the value of this tag
4426
+ $tagKey = $exifTool->FoundTag($tagInfo, $val);
4427
+ if (defined $tagKey) {
4428
+ # set the group 1 name for tags in specified tables
4429
+ $exifTool->SetGroup($tagKey, $dirName) if $$tagTablePtr{SET_GROUP1};
4430
+ # save original components of rational numbers (used when copying)
4431
+ $$exifTool{RATIONAL}{$tagKey} = $rational if defined $rational;
4432
+ }
4433
+ }
4434
+
4435
+ # scan for subsequent IFD's if specified
4436
+ if ($$dirInfo{Multi} and $bytesFromEnd >= 4) {
4437
+ my $offset = Get32u($dataPt, $dirEnd);
4438
+ if ($offset) {
4439
+ my $subdirStart = $offset - $dataPos;
4440
+ # use same directory information for trailing directory,
4441
+ # but change the start location (ProcessDirectory will
4442
+ # test to make sure we don't reprocess the same dir twice)
4443
+ my %newDirInfo = %$dirInfo;
4444
+ $newDirInfo{DirStart} = $subdirStart;
4445
+ # increment IFD number
4446
+ my $ifdNum = $newDirInfo{DirName} =~ s/(\d+)$// ? $1 : 0;
4447
+ $newDirInfo{DirName} .= $ifdNum + 1;
4448
+ # must validate SubIFD1 because the nextIFD pointer is invalid for some RAW formats
4449
+ if ($newDirInfo{DirName} ne 'SubIFD1' or ValidateIFD(\%newDirInfo)) {
4450
+ $exifTool->{INDENT} =~ s/..$//; # keep indent the same
4451
+ my $cur = pop @{$$exifTool{PATH}};
4452
+ $exifTool->ProcessDirectory(\%newDirInfo, $tagTablePtr) or $success = 0;
4453
+ push @{$$exifTool{PATH}}, $cur;
4454
+ } elsif ($verbose or $exifTool->{TIFF_TYPE} eq 'TIFF') {
4455
+ $exifTool->Warn('Ignored bad IFD linked from SubIFD');
4456
+ }
4457
+ }
4458
+ }
4459
+ return $success;
4460
+ }
4461
+
4462
+ 1; # end
4463
+
4464
+ __END__
4465
+
4466
+ =head1 NAME
4467
+
4468
+ Image::ExifTool::Exif - Read EXIF/TIFF meta information
4469
+
4470
+ =head1 SYNOPSIS
4471
+
4472
+ This module is required by Image::ExifTool.
4473
+
4474
+ =head1 DESCRIPTION
4475
+
4476
+ This module contains routines required by Image::ExifTool for processing
4477
+ EXIF and TIFF meta information.
4478
+
4479
+ =head1 AUTHOR
4480
+
4481
+ Copyright 2003-2013, Phil Harvey (phil at owl.phy.queensu.ca)
4482
+
4483
+ This library is free software; you can redistribute it and/or modify it
4484
+ under the same terms as Perl itself.
4485
+
4486
+ =head1 REFERENCES
4487
+
4488
+ =over 4
4489
+
4490
+ =item L<http://www.exif.org/Exif2-2.PDF>
4491
+
4492
+ =item L<http://www.cipa.jp/english/hyoujunka/kikaku/pdf/DC-008-2010_E.pdf>
4493
+
4494
+ =item L<http://partners.adobe.com/asn/developer/pdfs/tn/TIFF6.pdf>
4495
+
4496
+ =item L<http://partners.adobe.com/public/developer/en/tiff/TIFFPM6.pdf>
4497
+
4498
+ =item L<http://www.adobe.com/products/dng/pdfs/dng_spec.pdf>
4499
+
4500
+ =item L<http://www.awaresystems.be/imaging/tiff/tifftags.html>
4501
+
4502
+ =item L<http://www.remotesensing.org/libtiff/TIFFTechNote2.html>
4503
+
4504
+ =item L<http://www.exif.org/dcf.PDF>
4505
+
4506
+ =item L<http://park2.wakwak.com/~tsuruzoh/Computer/Digicams/exif-e.html>
4507
+
4508
+ =item L<http://www.fine-view.com/jp/lab/doc/ps6ffspecsv2.pdf>
4509
+
4510
+ =item L<http://www.ozhiker.com/electronics/pjmt/jpeg_info/meta.html>
4511
+
4512
+ =item L<http://hul.harvard.edu/jhove/tiff-tags.html>
4513
+
4514
+ =item L<http://www.microsoft.com/whdc/xps/wmphoto.mspx>
4515
+
4516
+ =item L<http://www.asmail.be/msg0054681802.html>
4517
+
4518
+ =item L<http://crousseau.free.fr/imgfmt_raw.htm>
4519
+
4520
+ =item L<http://www.cybercom.net/~dcoffin/dcraw/>
4521
+
4522
+ =item L<http://www.digitalpreservation.gov/formats/content/tiff_tags.shtml>
4523
+
4524
+ =item L<http://community.roxen.com/developers/idocs/rfc/rfc3949.html>
4525
+
4526
+ =item L<http://tools.ietf.org/html/draft-ietf-fax-tiff-fx-extension1-01>
4527
+
4528
+ =item L<http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/cinemadng/pdfs/CinemaDNG_Format_Specification_v1_1.pdf>
4529
+
4530
+ =back
4531
+
4532
+ =head1 ACKNOWLEDGEMENTS
4533
+
4534
+ Thanks to Jeremy Brown for the 35efl tags, and Matt Madrid for his help with
4535
+ the XP character code conversions.
4536
+
4537
+ =head1 SEE ALSO
4538
+
4539
+ L<Image::ExifTool::TagNames/EXIF Tags>,
4540
+ L<Image::ExifTool(3pm)|Image::ExifTool>
4541
+
4542
+ =cut