PageRenderTime 69ms CodeModel.GetById 27ms RepoModel.GetById 0ms app.codeStats 2ms

/Image-ExifTool-8.90/lib/Image/ExifTool/Canon.pm

#
Perl | 7148 lines | 6468 code | 115 blank | 565 comment | 145 complexity | 5bdb43d01f1630302f42e83d1fb1995e MD5 | raw file

Large files files are truncated, but you can click here to view the full file

  1. #------------------------------------------------------------------------------
  2. # File: Canon.pm
  3. #
  4. # Description: Canon EXIF maker notes tags
  5. #
  6. # Revisions: 11/25/2003 - P. Harvey Created
  7. # 12/03/2003 - P. Harvey Decode lots more tags and add CanonAFInfo
  8. # 02/17/2004 - Michael Rommel Added IxusAFPoint
  9. # 01/27/2005 - P. Harvey Disable validation of CanonAFInfo
  10. # 01/30/2005 - P. Harvey Added a few more tags (ref 4)
  11. # 02/10/2006 - P. Harvey Decode a lot of new tags (ref 12)
  12. # [ongoing] - P. Harvey Constantly decoding new information
  13. #
  14. # Notes: Must check FocalPlaneX/YResolution values for each new model!
  15. #
  16. # References: 1) http://park2.wakwak.com/~tsuruzoh/Computer/Digicams/exif-e.html
  17. # 2) Michael Rommel private communication (Digital Ixus)
  18. # 3) Daniel Pittman private communication (PowerShot S70)
  19. # 4) http://www.wonderland.org/crw/
  20. # 5) Juha Eskelinen private communication (20D)
  21. # 6) Richard S. Smith private communication (20D)
  22. # 7) Denny Priebe private communication (1DmkII)
  23. # 8) Irwin Poche private communication
  24. # 9) Michael Tiemann private communication (1DmkII)
  25. # 10) Volker Gering private communication (1DmkII)
  26. # 11) "cip" private communication
  27. # 12) Rainer Honle private communication (5D)
  28. # 13) http://www.cybercom.net/~dcoffin/dcraw/
  29. # 14) (bozi) http://www.cpanforum.com/threads/2476 and /2563
  30. # 15) http://homepage3.nifty.com/kamisaka/makernote/makernote_canon.htm (2007/11/19)
  31. # + http://homepage3.nifty.com/kamisaka/makernote/CanonLens.htm (2007/11/19)
  32. # 16) Emil Sit private communication (30D)
  33. # 17) http://www.asahi-net.or.jp/~xp8t-ymzk/s10exif.htm
  34. # 18) Samson Tai private communication (G7)
  35. # 19) Warren Stockton private communication
  36. # 20) Bogdan private communication
  37. # 21) Heiko Hinrichs private communication
  38. # 22) Dave Nicholson private communication (PowerShot S30)
  39. # 23) Magne Nilsen private communication (400D)
  40. # 24) Wolfgang Hoffmann private communication (40D)
  41. # 26) Steve Balcombe private communication
  42. # 27) Chris Huebsch private communication (40D)
  43. # 28) Hal Williamson private communication (XTi)
  44. # 29) Ger Vermeulen private communication
  45. # 30) David Pitcher private communication (1DmkIII)
  46. # 31) Darryl Zurn private communication (A590IS)
  47. # 32) Rich Taylor private communication (5D)
  48. # 33) D.J. Cristi private communication
  49. # 34) Andreas Huggel and Pascal de Bruijn private communication
  50. # 35) Jan Boelsma private communication
  51. # 36) Karl-Heinz Klotz private communication (http://www.dslr-forum.de/showthread.php?t=430900)
  52. # 37) Vesa Kivisto private communication (30D)
  53. # 38) Kurt Garloff private communication (5DmkII)
  54. # 39) Irwin Poche private communication (5DmkII)
  55. # 40) Jose Oliver-Didier private communication
  56. # 41) http://www.cpanforum.com/threads/10730
  57. # 42) Norbert Wasser private communication
  58. # 43) Karsten Sote private communication
  59. # 44) Hugh Griffiths private communication (5DmkII)
  60. # 45) Mark Berger private communication (5DmkII)
  61. # 46) Dieter Steiner private communication (7D)
  62. # 47) http://www.exiv2.org/
  63. # 48) Tomasz A. Kawecki private communication (550D, firmware 1.0.6, 1.0.8)
  64. # 49) http://www.listware.net/201101/digikam-users/49795-digikam-users-re-lens-recognition.html
  65. # 50) http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,3833.0.html
  66. # JD) Jens Duttke private communication
  67. #------------------------------------------------------------------------------
  68. package Image::ExifTool::Canon;
  69. use strict;
  70. use vars qw($VERSION %canonModelID %canonLensTypes);
  71. use Image::ExifTool qw(:DataAccess :Utils);
  72. use Image::ExifTool::Exif;
  73. sub WriteCanon($$$);
  74. sub ProcessSerialData($$$);
  75. sub ProcessFilters($$$);
  76. sub SwapWords($);
  77. $VERSION = '2.91';
  78. # Note: Removed 'USM' from 'L' lenses since it is redundant - PH
  79. # (or is it? Ref 32 shows 5 non-USM L-type lenses)
  80. # --> have relaxed this for new lenses because Canon has been
  81. # consistent about keeping "USM" in the model name
  82. %canonLensTypes = ( #4
  83. Notes => q{
  84. Decimal values differentiate lenses which would otherwise have the same
  85. LensType, and are used by the Composite LensID tag when attempting to
  86. identify the specific lens model.
  87. },
  88. 1 => 'Canon EF 50mm f/1.8',
  89. 2 => 'Canon EF 28mm f/2.8',
  90. # (3 removed in current Kamisaka list)
  91. 3 => 'Canon EF 135mm f/2.8 Soft', #15/32
  92. 4 => 'Canon EF 35-105mm f/3.5-4.5 or Sigma Lens', #28
  93. 4.1 => 'Sigma UC Zoom 35-135mm f/4-5.6',
  94. 5 => 'Canon EF 35-70mm f/3.5-4.5', #32
  95. 6 => 'Canon EF 28-70mm f/3.5-4.5 or Sigma or Tokina Lens', #32
  96. 6.1 => 'Sigma 18-50mm f/3.5-5.6 DC', #23
  97. 6.2 => 'Sigma 18-125mm f/3.5-5.6 DC IF ASP',
  98. 6.3 => 'Tokina AF193-2 19-35mm f/3.5-4.5',
  99. 6.4 => 'Sigma 28-80mm f/3.5-5.6 II Macro', #47
  100. 7 => 'Canon EF 100-300mm f/5.6L', #15
  101. 8 => 'Canon EF 100-300mm f/5.6 or Sigma or Tokina Lens', #32
  102. 8.1 => 'Sigma 70-300mm f/4-5.6 [APO] DG Macro', #15 (both APO and non-APO, ref http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,2947.0.html)
  103. 8.2 => 'Tokina AT-X242AF 24-200mm f/3.5-5.6', #15
  104. 9 => 'Canon EF 70-210mm f/4', #32
  105. 9.1 => 'Sigma 55-200mm f/4-5.6 DC', #34
  106. 10 => 'Canon EF 50mm f/2.5 Macro or Sigma Lens', #10 (+ LSC Life Size Converter --> 70mm - PH)
  107. 10.1 => 'Sigma 50mm f/2.8 EX', #4
  108. 10.2 => 'Sigma 28mm f/1.8',
  109. 10.3 => 'Sigma 105mm f/2.8 Macro EX', #15
  110. 10.4 => 'Sigma 70mm f/2.8 EX DG Macro EF', #Jean-Michel Dubois
  111. 11 => 'Canon EF 35mm f/2', #9
  112. 13 => 'Canon EF 15mm f/2.8 Fisheye', #9
  113. 14 => 'Canon EF 50-200mm f/3.5-4.5L', #32
  114. 15 => 'Canon EF 50-200mm f/3.5-4.5', #32
  115. 16 => 'Canon EF 35-135mm f/3.5-4.5', #32
  116. 17 => 'Canon EF 35-70mm f/3.5-4.5A', #32
  117. 18 => 'Canon EF 28-70mm f/3.5-4.5', #32
  118. 20 => 'Canon EF 100-200mm f/4.5A', #32
  119. 21 => 'Canon EF 80-200mm f/2.8L',
  120. 22 => 'Canon EF 20-35mm f/2.8L or Tokina Lens', #32
  121. 22.1 => 'Tokina AT-X280AF PRO 28-80mm f/2.8 Aspherical', #15
  122. 23 => 'Canon EF 35-105mm f/3.5-4.5', #32
  123. 24 => 'Canon EF 35-80mm f/4-5.6 Power Zoom', #32
  124. 25 => 'Canon EF 35-80mm f/4-5.6 Power Zoom', #32
  125. 26 => 'Canon EF 100mm f/2.8 Macro or Other Lens',
  126. 26.1 => 'Cosina 100mm f/3.5 Macro AF',
  127. 26.2 => 'Tamron SP AF 90mm f/2.8 Di Macro', #15
  128. 26.3 => 'Tamron SP AF 180mm f/3.5 Di Macro', #15
  129. 26.4 => 'Carl Zeiss Planar T* 50mm f/1.4', #PH
  130. 27 => 'Canon EF 35-80mm f/4-5.6', #32
  131. # 27 => 'Carl Zeiss Distagon T* 28mm f/2 ZF', #PH (must be with an adapter, because the ZF version is a Nikon mount)
  132. # 27 => 'EMF adapter for Canon EOS digital cameras', #50 (reports LongFocal of 65535)
  133. 28 => 'Canon EF 80-200mm f/4.5-5.6 or Tamron Lens', #32
  134. 28.1 => 'Tamron SP AF 28-105mm f/2.8 LD Aspherical IF', #15
  135. 28.2 => 'Tamron SP AF 28-75mm f/2.8 XR Di LD Aspherical [IF] Macro', #4
  136. 28.3 => 'Tamron AF 70-300mm f/4.5-5.6 Di LD 1:2 Macro Zoom', #11
  137. 28.4 => 'Tamron AF Aspherical 28-200mm f/3.8-5.6', #14
  138. 29 => 'Canon EF 50mm f/1.8 II',
  139. 30 => 'Canon EF 35-105mm f/4.5-5.6', #32
  140. 31 => 'Canon EF 75-300mm f/4-5.6 or Tamron Lens', #32
  141. 31.1 => 'Tamron SP AF 300mm f/2.8 LD IF', #15
  142. 32 => 'Canon EF 24mm f/2.8 or Sigma Lens', #10
  143. 32.1 => 'Sigma 15mm f/2.8 EX Fisheye', #11
  144. 33 => 'Voigtlander or Carl Zeiss Lens',
  145. 33.1 => 'Voigtlander Ultron 40mm f/2 SLII Aspherical', #45
  146. 33.2 => 'Carl Zeiss Distagon T* 15mm f/2.8 ZE', #PH
  147. 33.3 => 'Carl Zeiss Distagon T* 18mm f/3.5 ZE', #PH
  148. 33.4 => 'Carl Zeiss Distagon T* 21mm f/2.8 ZE', #PH
  149. 33.5 => 'Carl Zeiss Distagon T* 28mm f/2 ZE', #PH
  150. 33.6 => 'Carl Zeiss Distagon T* 35mm f/2 ZE', #PH
  151. 35 => 'Canon EF 35-80mm f/4-5.6', #32
  152. 36 => 'Canon EF 38-76mm f/4.5-5.6', #32
  153. 37 => 'Canon EF 35-80mm f/4-5.6 or Tamron Lens', #32
  154. 37.1 => 'Tamron 70-200mm f/2.8 Di LD IF Macro', #PH
  155. 37.2 => 'Tamron AF 28-300mm f/3.5-6.3 XR Di VC LD Aspherical [IF] Macro Model A20', #38
  156. 37.3 => 'Tamron SP AF 17-50mm f/2.8 XR Di II VC LD Aspherical [IF]', #34
  157. 37.4 => 'Tamron AF 18-270mm f/3.5-6.3 Di II VC LD Aspherical [IF] Macro', #http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,2937.0.html
  158. 38 => 'Canon EF 80-200mm f/4.5-5.6', #32
  159. 39 => 'Canon EF 75-300mm f/4-5.6',
  160. 40 => 'Canon EF 28-80mm f/3.5-5.6',
  161. 41 => 'Canon EF 28-90mm f/4-5.6', #32
  162. 42 => 'Canon EF 28-200mm f/3.5-5.6 or Tamron Lens', #32
  163. 42.1 => 'Tamron AF 28-300mm f/3.5-6.3 XR Di VC LD Aspherical [IF] Macro Model A20', #15
  164. 43 => 'Canon EF 28-105mm f/4-5.6', #10
  165. 44 => 'Canon EF 90-300mm f/4.5-5.6', #32
  166. 45 => 'Canon EF-S 18-55mm f/3.5-5.6 [II]', #PH (same ID for version II, ref 20)
  167. 46 => 'Canon EF 28-90mm f/4-5.6', #32
  168. 48 => 'Canon EF-S 18-55mm f/3.5-5.6 IS', #20
  169. 49 => 'Canon EF-S 55-250mm f/4-5.6 IS', #23
  170. 50 => 'Canon EF-S 18-200mm f/3.5-5.6 IS',
  171. 51 => 'Canon EF-S 18-135mm f/3.5-5.6 IS', #PH
  172. 52 => 'Canon EF-S 18-55mm f/3.5-5.6 IS II', #PH
  173. 53 => 'Canon EF-S 18-55mm f/3.5-5.6 III', #Jon Charnas
  174. 94 => 'Canon TS-E 17mm f/4L', #42
  175. 95 => 'Canon TS-E 24.0mm f/3.5 L II', #43
  176. 124 => 'Canon MP-E 65mm f/2.8 1-5x Macro Photo', #9
  177. 125 => 'Canon TS-E 24mm f/3.5L',
  178. 126 => 'Canon TS-E 45mm f/2.8', #15
  179. 127 => 'Canon TS-E 90mm f/2.8', #15
  180. 129 => 'Canon EF 300mm f/2.8L', #32
  181. 130 => 'Canon EF 50mm f/1.0L', #10/15
  182. 131 => 'Canon EF 28-80mm f/2.8-4L or Sigma Lens', #32
  183. 131.1 => 'Sigma 8mm f/3.5 EX DG Circular Fisheye', #15
  184. 131.2 => 'Sigma 17-35mm f/2.8-4 EX DG Aspherical HSM', #15
  185. 131.3 => 'Sigma 17-70mm f/2.8-4.5 DC Macro', #PH (NC)
  186. 131.4 => 'Sigma APO 50-150mm f/2.8 [II] EX DC HSM', #15 ([II] ref PH)
  187. 131.5 => 'Sigma APO 120-300mm f/2.8 EX DG HSM', #15
  188. # 'Sigma APO 120-300mm f/2.8 EX DG HSM + 1.4x', #15
  189. # 'Sigma APO 120-300mm f/2.8 EX DG HSM + 2x', #15
  190. 131.6 => 'Sigma 4.5mm F2.8 EX DC HSM Circular Fisheye', #PH
  191. 132 => 'Canon EF 1200mm f/5.6L', #32
  192. 134 => 'Canon EF 600mm f/4L IS', #15
  193. 135 => 'Canon EF 200mm f/1.8L',
  194. 136 => 'Canon EF 300mm f/2.8L',
  195. 137 => 'Canon EF 85mm f/1.2L or Sigma or Tamron Lens', #10
  196. 137.1 => 'Sigma 18-50mm f/2.8-4.5 DC OS HSM', #PH
  197. 137.2 => 'Sigma 50-200mm f/4-5.6 DC OS HSM', #PH
  198. 137.3 => 'Sigma 18-250mm f/3.5-6.3 DC OS HSM', #PH
  199. 137.4 => 'Sigma 24-70mm f/2.8 IF EX DG HSM', #PH
  200. 137.5 => 'Sigma 18-125mm f/3.8-5.6 DC OS HSM', #PH
  201. 137.6 => 'Sigma 17-70mm f/2.8-4 DC Macro OS HSM', #http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,2819.0.html
  202. 137.7 => 'Sigma 17-50mm f/2.8 OS HSM', #PH (from Exiv2)
  203. 137.8 => 'Sigma 18-200mm f/3.5-6.3 II DC OS HSM', #PH
  204. 137.9 => 'Tamron AF 18-270mm f/3.5-6.3 Di II VC PZD', #(model B008)http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,3090.0.html
  205. '137.10' => 'Sigma 8-16mm f/4.5-5.6 DC HSM', #50-Zwielicht
  206. '137.11' => 'Tamron SP 17-50mm f/2.8 XR Di II VC', #50 (model B005)
  207. '137.12' => 'Tamron SP 60mm f/2 Macro Di II', #50 (model G005)
  208. '137.13' => 'Sigma 10-20mm f/3.5 EX DC HSM', #Gerald Erdmann
  209. 138 => 'Canon EF 28-80mm f/2.8-4L', #32
  210. 139 => 'Canon EF 400mm f/2.8L',
  211. 140 => 'Canon EF 500mm f/4.5L', #32
  212. 141 => 'Canon EF 500mm f/4.5L',
  213. 142 => 'Canon EF 300mm f/2.8L IS', #15
  214. 143 => 'Canon EF 500mm f/4L IS', #15
  215. 144 => 'Canon EF 35-135mm f/4-5.6 USM', #26
  216. 145 => 'Canon EF 100-300mm f/4.5-5.6 USM', #32
  217. 146 => 'Canon EF 70-210mm f/3.5-4.5 USM', #32
  218. 147 => 'Canon EF 35-135mm f/4-5.6 USM', #32
  219. 148 => 'Canon EF 28-80mm f/3.5-5.6 USM', #32
  220. 149 => 'Canon EF 100mm f/2 USM', #9
  221. 150 => 'Canon EF 14mm f/2.8L or Sigma Lens', #10
  222. 150.1 => 'Sigma 20mm EX f/1.8', #4
  223. 150.2 => 'Sigma 30mm f/1.4 DC HSM', #15
  224. 150.3 => 'Sigma 24mm f/1.8 DG Macro EX', #15
  225. 151 => 'Canon EF 200mm f/2.8L',
  226. 152 => 'Canon EF 300mm f/4L IS or Sigma Lens', #15
  227. 152.1 => 'Sigma 12-24mm f/4.5-5.6 EX DG ASPHERICAL HSM', #15
  228. 152.2 => 'Sigma 14mm f/2.8 EX Aspherical HSM', #15
  229. 152.3 => 'Sigma 10-20mm f/4-5.6', #14
  230. 152.4 => 'Sigma 100-300mm f/4', # (ref Bozi)
  231. 153 => 'Canon EF 35-350mm f/3.5-5.6L or Sigma or Tamron Lens', #PH
  232. 153.1 => 'Sigma 50-500mm f/4-6.3 APO HSM EX', #15
  233. 153.2 => 'Tamron AF 28-300mm f/3.5-6.3 XR LD Aspherical [IF] Macro',
  234. 153.3 => 'Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical [IF] Macro Model A14', #15
  235. 153.4 => 'Tamron 18-250mm f/3.5-6.3 Di II LD Aspherical [IF] Macro', #PH
  236. 154 => 'Canon EF 20mm f/2.8 USM', #15
  237. 155 => 'Canon EF 85mm f/1.8 USM',
  238. 156 => 'Canon EF 28-105mm f/3.5-4.5 USM or Tamron Lens',
  239. 156.1 => 'Tamron SP 70-300mm f/4.0-5.6 Di VC USD', #PH (model A005)
  240. 160 => 'Canon EF 20-35mm f/3.5-4.5 USM or Tamron or Tokina Lens',
  241. 160.1 => 'Tamron AF 19-35mm f/3.5-4.5', #44
  242. 160.2 => 'Tokina AT-X 124 AF 12-24mm f/4 DX', #49 (not sure about specific model - PH)
  243. 160.3 => 'Tokina AT-X 107 AF DX 10-17mm f/3.5-4.5 Fisheye', #PH (http://osdir.com/ml/digikam-devel/2011-04/msg00275.html)
  244. 160.4 => 'Tokina AF 11-16mm f/2.8 AT-X Pro DX', #http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,3967.0.html
  245. 161 => 'Canon EF 28-70mm f/2.8L or Sigma or Tamron Lens',
  246. 161.1 => 'Sigma 24-70mm f/2.8 EX',
  247. 161.2 => 'Sigma 28-70mm f/2.8 EX', #PH (http://www.breezesys.com/forum/showthread.php?t=3718)
  248. 161.3 => 'Tamron AF 17-50mm f/2.8 Di-II LD Aspherical', #40
  249. 161.4 => 'Tamron 90mm f/2.8',
  250. 162 => 'Canon EF 200mm f/2.8L', #32
  251. 163 => 'Canon EF 300mm f/4L', #32
  252. 164 => 'Canon EF 400mm f/5.6L', #32
  253. 165 => 'Canon EF 70-200mm f/2.8 L',
  254. 166 => 'Canon EF 70-200mm f/2.8 L + 1.4x',
  255. 167 => 'Canon EF 70-200mm f/2.8 L + 2x',
  256. 168 => 'Canon EF 28mm f/1.8 USM', #15
  257. 169 => 'Canon EF 17-35mm f/2.8L or Sigma Lens', #15
  258. 169.1 => 'Sigma 18-200mm f/3.5-6.3 DC OS', #23
  259. 169.2 => 'Sigma 15-30mm f/3.5-4.5 EX DG Aspherical', #4
  260. 169.3 => 'Sigma 18-50mm f/2.8 Macro', #26
  261. 169.4 => 'Sigma 50mm f/1.4 EX DG HSM', #PH
  262. 169.5 => 'Sigma 85mm f/1.4 EX DG HSM', #Rolando Ruzic
  263. 169.6 => 'Sigma 30mm f/1.4 EX DC HSM', #Rodolfo Borges
  264. 170 => 'Canon EF 200mm f/2.8L II', #9
  265. 171 => 'Canon EF 300mm f/4L', #15
  266. 172 => 'Canon EF 400mm f/5.6L', #32
  267. 173 => 'Canon EF 180mm Macro f/3.5L or Sigma Lens', #9
  268. 173.1 => 'Sigma 180mm EX HSM Macro f/3.5', #14
  269. 173.2 => 'Sigma APO Macro 150mm f/2.8 EX DG HSM', #14
  270. 174 => 'Canon EF 135mm f/2L or Sigma Lens', #9
  271. 174.1 => 'Sigma 70-200mm f/2.8 EX DG APO OS HSM', #PH (probably version II of this lens)
  272. 174.2 => 'Sigma 50-500mm f/4.5-6.3 APO DG OS HSM', #http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,4031.0.html
  273. 175 => 'Canon EF 400mm f/2.8L', #32
  274. 176 => 'Canon EF 24-85mm f/3.5-4.5 USM',
  275. 177 => 'Canon EF 300mm f/4L IS', #9
  276. 178 => 'Canon EF 28-135mm f/3.5-5.6 IS',
  277. 179 => 'Canon EF 24mm f/1.4L', #20
  278. 180 => 'Canon EF 35mm f/1.4L', #9
  279. 181 => 'Canon EF 100-400mm f/4.5-5.6L IS + 1.4x', #15
  280. 182 => 'Canon EF 100-400mm f/4.5-5.6L IS + 2x',
  281. 183 => 'Canon EF 100-400mm f/4.5-5.6L IS or Sigma Lens',
  282. 183.1 => 'Sigma 150mm f/2.8 EX DG OS HSM APO Macro', #50
  283. 184 => 'Canon EF 400mm f/2.8L + 2x', #15
  284. 185 => 'Canon EF 600mm f/4L IS', #32
  285. 186 => 'Canon EF 70-200mm f/4L', #9
  286. 187 => 'Canon EF 70-200mm f/4L + 1.4x', #26
  287. 188 => 'Canon EF 70-200mm f/4L + 2x', #PH
  288. 189 => 'Canon EF 70-200mm f/4L + 2.8x', #32
  289. 190 => 'Canon EF 100mm f/2.8 Macro',
  290. 191 => 'Canon EF 400mm f/4 DO IS', #9
  291. 193 => 'Canon EF 35-80mm f/4-5.6 USM', #32
  292. 194 => 'Canon EF 80-200mm f/4.5-5.6 USM', #32
  293. 195 => 'Canon EF 35-105mm f/4.5-5.6 USM', #32
  294. 196 => 'Canon EF 75-300mm f/4-5.6 USM', #15/32
  295. 197 => 'Canon EF 75-300mm f/4-5.6 IS USM',
  296. 198 => 'Canon EF 50mm f/1.4 USM', #9
  297. 199 => 'Canon EF 28-80mm f/3.5-5.6 USM', #32
  298. 200 => 'Canon EF 75-300mm f/4-5.6 USM', #32
  299. 201 => 'Canon EF 28-80mm f/3.5-5.6 USM', #32
  300. 202 => 'Canon EF 28-80mm f/3.5-5.6 USM IV',
  301. 208 => 'Canon EF 22-55mm f/4-5.6 USM', #32
  302. 209 => 'Canon EF 55-200mm f/4.5-5.6', #32
  303. 210 => 'Canon EF 28-90mm f/4-5.6 USM', #32
  304. 211 => 'Canon EF 28-200mm f/3.5-5.6 USM', #15
  305. 212 => 'Canon EF 28-105mm f/4-5.6 USM', #15
  306. 213 => 'Canon EF 90-300mm f/4.5-5.6 USM',
  307. 214 => 'Canon EF-S 18-55mm f/3.5-5.6 USM', #PH/34
  308. 215 => 'Canon EF 55-200mm f/4.5-5.6 II USM',
  309. 224 => 'Canon EF 70-200mm f/2.8L IS', #11
  310. 225 => 'Canon EF 70-200mm f/2.8L IS + 1.4x', #11
  311. 226 => 'Canon EF 70-200mm f/2.8L IS + 2x', #14
  312. 227 => 'Canon EF 70-200mm f/2.8L IS + 2.8x', #32
  313. 228 => 'Canon EF 28-105mm f/3.5-4.5 USM', #32
  314. 229 => 'Canon EF 16-35mm f/2.8L', #PH
  315. 230 => 'Canon EF 24-70mm f/2.8L', #9
  316. 231 => 'Canon EF 17-40mm f/4L',
  317. 232 => 'Canon EF 70-300mm f/4.5-5.6 DO IS USM', #15
  318. 233 => 'Canon EF 28-300mm f/3.5-5.6L IS', #PH
  319. 234 => 'Canon EF-S 17-85mm f4-5.6 IS USM', #19
  320. 235 => 'Canon EF-S 10-22mm f/3.5-4.5 USM', #15
  321. 236 => 'Canon EF-S 60mm f/2.8 Macro USM', #15
  322. 237 => 'Canon EF 24-105mm f/4L IS', #15
  323. 238 => 'Canon EF 70-300mm f/4-5.6 IS USM', #15
  324. 239 => 'Canon EF 85mm f/1.2L II', #15
  325. 240 => 'Canon EF-S 17-55mm f/2.8 IS USM', #15
  326. 241 => 'Canon EF 50mm f/1.2L', #15
  327. 242 => 'Canon EF 70-200mm f/4L IS', #PH
  328. 243 => 'Canon EF 70-200mm f/4L IS + 1.4x', #15
  329. 244 => 'Canon EF 70-200mm f/4L IS + 2x', #PH
  330. 245 => 'Canon EF 70-200mm f/4L IS + 2.8x', #32
  331. 246 => 'Canon EF 16-35mm f/2.8L II', #PH
  332. 247 => 'Canon EF 14mm f/2.8L II USM', #32
  333. 248 => 'Canon EF 200mm f/2L IS', #42
  334. 249 => 'Canon EF 800mm f/5.6L IS', #35
  335. 250 => 'Canon EF 24 f/1.4L II', #41
  336. 251 => 'Canon EF 70-200mm f/2.8L IS II USM',
  337. 252 => 'Canon EF 70-200mm f/2.8L IS II USM + 1.4x', #50 (1.4x Mk II)
  338. 253 => 'Canon EF 70-200mm f/2.8L IS II USM + 2x', #PH (NC)
  339. 254 => 'Canon EF 100mm f/2.8L Macro IS USM', #42
  340. # Note: LensType 488 (0x1e8) is reported as 232 (0xe8) in 7D CameraSettings
  341. 488 => 'Canon EF-S 15-85mm f/3.5-5.6 IS USM', #PH
  342. 489 => 'Canon EF 70-300mm f/4-5.6L IS USM', #Gerald Kapounek
  343. 490 => 'Canon EF 8-15mm f/4L USM', #Klaus Reinfeld
  344. 491 => 'Canon EF 300mm f/2.8L IS II USM', #42
  345. );
  346. # Canon model ID numbers (PH)
  347. %canonModelID = (
  348. 0x1010000 => 'PowerShot A30',
  349. 0x1040000 => 'PowerShot S300 / Digital IXUS 300 / IXY Digital 300',
  350. 0x1060000 => 'PowerShot A20',
  351. 0x1080000 => 'PowerShot A10',
  352. 0x1090000 => 'PowerShot S110 / Digital IXUS v / IXY Digital 200',
  353. 0x1100000 => 'PowerShot G2',
  354. 0x1110000 => 'PowerShot S40',
  355. 0x1120000 => 'PowerShot S30',
  356. 0x1130000 => 'PowerShot A40',
  357. 0x1140000 => 'EOS D30',
  358. 0x1150000 => 'PowerShot A100',
  359. 0x1160000 => 'PowerShot S200 / Digital IXUS v2 / IXY Digital 200a',
  360. 0x1170000 => 'PowerShot A200',
  361. 0x1180000 => 'PowerShot S330 / Digital IXUS 330 / IXY Digital 300a',
  362. 0x1190000 => 'PowerShot G3',
  363. 0x1210000 => 'PowerShot S45',
  364. 0x1230000 => 'PowerShot SD100 / Digital IXUS II / IXY Digital 30',
  365. 0x1240000 => 'PowerShot S230 / Digital IXUS v3 / IXY Digital 320',
  366. 0x1250000 => 'PowerShot A70',
  367. 0x1260000 => 'PowerShot A60',
  368. 0x1270000 => 'PowerShot S400 / Digital IXUS 400 / IXY Digital 400',
  369. 0x1290000 => 'PowerShot G5',
  370. 0x1300000 => 'PowerShot A300',
  371. 0x1310000 => 'PowerShot S50',
  372. 0x1340000 => 'PowerShot A80',
  373. 0x1350000 => 'PowerShot SD10 / Digital IXUS i / IXY Digital L',
  374. 0x1360000 => 'PowerShot S1 IS',
  375. 0x1370000 => 'PowerShot Pro1',
  376. 0x1380000 => 'PowerShot S70',
  377. 0x1390000 => 'PowerShot S60',
  378. 0x1400000 => 'PowerShot G6',
  379. 0x1410000 => 'PowerShot S500 / Digital IXUS 500 / IXY Digital 500',
  380. 0x1420000 => 'PowerShot A75',
  381. 0x1440000 => 'PowerShot SD110 / Digital IXUS IIs / IXY Digital 30a',
  382. 0x1450000 => 'PowerShot A400',
  383. 0x1470000 => 'PowerShot A310',
  384. 0x1490000 => 'PowerShot A85',
  385. 0x1520000 => 'PowerShot S410 / Digital IXUS 430 / IXY Digital 450',
  386. 0x1530000 => 'PowerShot A95',
  387. 0x1540000 => 'PowerShot SD300 / Digital IXUS 40 / IXY Digital 50',
  388. 0x1550000 => 'PowerShot SD200 / Digital IXUS 30 / IXY Digital 40',
  389. 0x1560000 => 'PowerShot A520',
  390. 0x1570000 => 'PowerShot A510',
  391. 0x1590000 => 'PowerShot SD20 / Digital IXUS i5 / IXY Digital L2',
  392. 0x1640000 => 'PowerShot S2 IS',
  393. 0x1650000 => 'PowerShot SD430 / Digital IXUS Wireless / IXY Digital Wireless',
  394. 0x1660000 => 'PowerShot SD500 / Digital IXUS 700 / IXY Digital 600',
  395. 0x1668000 => 'EOS D60',
  396. 0x1700000 => 'PowerShot SD30 / Digital IXUS i Zoom / IXY Digital L3',
  397. 0x1740000 => 'PowerShot A430',
  398. 0x1750000 => 'PowerShot A410',
  399. 0x1760000 => 'PowerShot S80',
  400. 0x1780000 => 'PowerShot A620',
  401. 0x1790000 => 'PowerShot A610',
  402. 0x1800000 => 'PowerShot SD630 / Digital IXUS 65 / IXY Digital 80',
  403. 0x1810000 => 'PowerShot SD450 / Digital IXUS 55 / IXY Digital 60',
  404. 0x1820000 => 'PowerShot TX1',
  405. 0x1870000 => 'PowerShot SD400 / Digital IXUS 50 / IXY Digital 55',
  406. 0x1880000 => 'PowerShot A420',
  407. 0x1890000 => 'PowerShot SD900 / Digital IXUS 900 Ti / IXY Digital 1000',
  408. 0x1900000 => 'PowerShot SD550 / Digital IXUS 750 / IXY Digital 700',
  409. 0x1920000 => 'PowerShot A700',
  410. 0x1940000 => 'PowerShot SD700 IS / Digital IXUS 800 IS / IXY Digital 800 IS',
  411. 0x1950000 => 'PowerShot S3 IS',
  412. 0x1960000 => 'PowerShot A540',
  413. 0x1970000 => 'PowerShot SD600 / Digital IXUS 60 / IXY Digital 70',
  414. 0x1980000 => 'PowerShot G7',
  415. 0x1990000 => 'PowerShot A530',
  416. 0x2000000 => 'PowerShot SD800 IS / Digital IXUS 850 IS / IXY Digital 900 IS',
  417. 0x2010000 => 'PowerShot SD40 / Digital IXUS i7 / IXY Digital L4',
  418. 0x2020000 => 'PowerShot A710 IS',
  419. 0x2030000 => 'PowerShot A640',
  420. 0x2040000 => 'PowerShot A630',
  421. 0x2090000 => 'PowerShot S5 IS',
  422. 0x2100000 => 'PowerShot A460',
  423. 0x2120000 => 'PowerShot SD850 IS / Digital IXUS 950 IS / IXY Digital 810 IS',
  424. 0x2130000 => 'PowerShot A570 IS',
  425. 0x2140000 => 'PowerShot A560',
  426. 0x2150000 => 'PowerShot SD750 / Digital IXUS 75 / IXY Digital 90',
  427. 0x2160000 => 'PowerShot SD1000 / Digital IXUS 70 / IXY Digital 10',
  428. 0x2180000 => 'PowerShot A550',
  429. 0x2190000 => 'PowerShot A450',
  430. 0x2230000 => 'PowerShot G9',
  431. 0x2240000 => 'PowerShot A650 IS',
  432. 0x2260000 => 'PowerShot A720 IS',
  433. 0x2290000 => 'PowerShot SX100 IS',
  434. 0x2300000 => 'PowerShot SD950 IS / Digital IXUS 960 IS / IXY Digital 2000 IS',
  435. 0x2310000 => 'PowerShot SD870 IS / Digital IXUS 860 IS / IXY Digital 910 IS',
  436. 0x2320000 => 'PowerShot SD890 IS / Digital IXUS 970 IS / IXY Digital 820 IS',
  437. 0x2360000 => 'PowerShot SD790 IS / Digital IXUS 90 IS / IXY Digital 95 IS',
  438. 0x2370000 => 'PowerShot SD770 IS / Digital IXUS 85 IS / IXY Digital 25 IS',
  439. 0x2380000 => 'PowerShot A590 IS',
  440. 0x2390000 => 'PowerShot A580',
  441. 0x2420000 => 'PowerShot A470',
  442. 0x2430000 => 'PowerShot SD1100 IS / Digital IXUS 80 IS / IXY Digital 20 IS',
  443. 0x2460000 => 'PowerShot SX1 IS',
  444. 0x2470000 => 'PowerShot SX10 IS',
  445. 0x2480000 => 'PowerShot A1000 IS',
  446. 0x2490000 => 'PowerShot G10',
  447. 0x2510000 => 'PowerShot A2000 IS',
  448. 0x2520000 => 'PowerShot SX110 IS',
  449. 0x2530000 => 'PowerShot SD990 IS / Digital IXUS 980 IS / IXY Digital 3000 IS',
  450. 0x2540000 => 'PowerShot SD880 IS / Digital IXUS 870 IS / IXY Digital 920 IS',
  451. 0x2550000 => 'PowerShot E1',
  452. 0x2560000 => 'PowerShot D10',
  453. 0x2570000 => 'PowerShot SD960 IS / Digital IXUS 110 IS / IXY Digital 510 IS',
  454. 0x2580000 => 'PowerShot A2100 IS',
  455. 0x2590000 => 'PowerShot A480',
  456. 0x2600000 => 'PowerShot SX200 IS',
  457. 0x2610000 => 'PowerShot SD970 IS / Digital IXUS 990 IS / IXY Digital 830 IS',
  458. 0x2620000 => 'PowerShot SD780 IS / Digital IXUS 100 IS / IXY Digital 210 IS',
  459. 0x2630000 => 'PowerShot A1100 IS',
  460. 0x2640000 => 'PowerShot SD1200 IS / Digital IXUS 95 IS / IXY Digital 110 IS',
  461. 0x2700000 => 'PowerShot G11',
  462. 0x2710000 => 'PowerShot SX120 IS',
  463. 0x2720000 => 'PowerShot S90',
  464. 0x2750000 => 'PowerShot SX20 IS',
  465. 0x2760000 => 'PowerShot SD980 IS / Digital IXUS 200 IS / IXY Digital 930 IS',
  466. 0x2770000 => 'PowerShot SD940 IS / Digital IXUS 120 IS / IXY Digital 220 IS',
  467. 0x2800000 => 'PowerShot A495',
  468. 0x2810000 => 'PowerShot A490',
  469. 0x2820000 => 'PowerShot A3100 IS / A3150 IS', # (different cameras, same ID)
  470. 0x2830000 => 'PowerShot A3000 IS',
  471. 0x2840000 => 'PowerShot SD1400 IS / IXUS 130 / IXY 400F',
  472. 0x2850000 => 'PowerShot SD1300 IS / IXUS 105 / IXY 200F',
  473. 0x2860000 => 'PowerShot SD3500 IS / IXUS 210 / IXY 10S',
  474. 0x2870000 => 'PowerShot SX210 IS',
  475. 0x2880000 => 'PowerShot SD4000 IS / IXUS 300 HS / IXY 30S',
  476. 0x2890000 => 'PowerShot SD4500 IS / IXUS 1000 HS / IXY 50S',
  477. 0x2920000 => 'PowerShot G12',
  478. 0x2930000 => 'PowerShot SX30 IS',
  479. 0x2940000 => 'PowerShot SX130 IS',
  480. 0x2950000 => 'PowerShot S95',
  481. 0x2980000 => 'PowerShot A3300 IS',
  482. 0x2990000 => 'PowerShot A3200 IS',
  483. 0x3000000 => 'PowerShot ELPH 500 HS / IXUS 310 HS / IXY 31S',
  484. 0x3010000 => 'PowerShot Pro90 IS',
  485. 0x3010001 => 'PowerShot A800',
  486. 0x3020000 => 'PowerShot ELPH 100 HS / IXUS 115 HS / IXY 210F',
  487. 0x3030000 => 'PowerShot SX230 HS',
  488. 0x3040000 => 'PowerShot ELPH 300 HS / IXUS 220 HS / IXY 410F',
  489. 0x3050000 => 'PowerShot A2200',
  490. 0x3060000 => 'PowerShot A1200',
  491. 0x3070000 => 'PowerShot SX220 HS',
  492. 0x3080000 => 'PowerShot G1 X',
  493. 0x3090000 => 'PowerShot SX150 IS',
  494. 0x3100000 => 'PowerShot ELPH 510 HS / IXUS 1100 HS / IXY 51S',
  495. 0x3110000 => 'PowerShot S100 (new)',
  496. 0x3130000 => 'PowerShot SX40 HS',
  497. 0x3120000 => 'PowerShot ELPH 310 HS / IXUS 230 HS / IXY 600F',
  498. 0x3140000 => 'PowerShot ELPH 500 HS / IXUS 320 HS / IXY 32S', # (duplicate PowerShot model???)
  499. 0x3160000 => 'PowerShot A1300',
  500. 0x3180000 => 'PowerShot ELPH 320 HS / IXUS 240 HS / IXY 420F',
  501. 0x3190000 => 'PowerShot ELPH 110 HS / IXUS 125 HS / IXY 220F',
  502. 0x3200000 => 'PowerShot D20',
  503. 0x3210000 => 'PowerShot A4000 IS',
  504. 0x3220000 => 'PowerShot SX260 HS',
  505. 0x3240000 => 'PowerShot ELPH 530 HS / IXUS 510 HS / IXY 1',
  506. 0x3250000 => 'PowerShot ELPH 520 HS / IXUS 500 HS / IXY 3',
  507. 0x3260000 => 'PowerShot A3400 IS',
  508. 0x3270000 => 'PowerShot A2400 IS',
  509. 0x3280000 => 'PowerShot A2300',
  510. 0x4040000 => 'PowerShot G1',
  511. 0x6040000 => 'PowerShot S100 / Digital IXUS / IXY Digital',
  512. 0x4007d673 => 'DC19/DC21/DC22',
  513. 0x4007d674 => 'XH A1',
  514. 0x4007d675 => 'HV10',
  515. 0x4007d676 => 'MD130/MD140/MD150/MD160/ZR850',
  516. 0x4007d777 => 'DC50', # (iVIS)
  517. 0x4007d778 => 'HV20', # (iVIS)
  518. 0x4007d779 => 'DC211', #29
  519. 0x4007d77a => 'HG10',
  520. 0x4007d77b => 'HR10', #29 (iVIS)
  521. 0x4007d77d => 'MD255/ZR950',
  522. 0x4007d81c => 'HF11',
  523. 0x4007d878 => 'HV30',
  524. 0x4007d87c => 'XH A1S',
  525. 0x4007d87e => 'DC301/DC310/DC311/DC320/DC330',
  526. 0x4007d87f => 'FS100',
  527. 0x4007d880 => 'HF10', #29 (iVIS/VIXIA)
  528. 0x4007d882 => 'HG20/HG21', # (VIXIA)
  529. 0x4007d925 => 'HF21', # (LEGRIA)
  530. 0x4007d926 => 'HF S11', # (LEGRIA)
  531. 0x4007d978 => 'HV40', # (LEGRIA)
  532. 0x4007d987 => 'DC410/DC411/DC420',
  533. 0x4007d988 => 'FS19/FS20/FS21/FS22/FS200', # (LEGRIA)
  534. 0x4007d989 => 'HF20/HF200', # (LEGRIA)
  535. 0x4007d98a => 'HF S10/S100', # (LEGRIA/VIXIA)
  536. 0x4007da8e => 'HF R10/R16/R17/R18/R100/R106', # (LEGRIA/VIXIA)
  537. 0x4007da8f => 'HF M30/M31/M36/M300/M306', # (LEGRIA/VIXIA)
  538. 0x4007da90 => 'HF S20/S21/S200', # (LEGRIA/VIXIA)
  539. 0x4007da92 => 'FS31/FS36/FS37/FS300/FS305/FS306/FS307',
  540. # NOTE: some pre-production models may have a model name of
  541. # "Canon EOS Kxxx", where "xxx" is the last 3 digits of the model ID below.
  542. # This has been observed for the 1DSmkIII/K215 and 400D/K236.
  543. 0x80000001 => 'EOS-1D',
  544. 0x80000167 => 'EOS-1DS',
  545. 0x80000168 => 'EOS 10D',
  546. 0x80000169 => 'EOS-1D Mark III',
  547. 0x80000170 => 'EOS Digital Rebel / 300D / Kiss Digital',
  548. 0x80000174 => 'EOS-1D Mark II',
  549. 0x80000175 => 'EOS 20D',
  550. 0x80000176 => 'EOS Digital Rebel XSi / 450D / Kiss X2',
  551. 0x80000188 => 'EOS-1Ds Mark II',
  552. 0x80000189 => 'EOS Digital Rebel XT / 350D / Kiss Digital N',
  553. 0x80000190 => 'EOS 40D',
  554. 0x80000213 => 'EOS 5D',
  555. 0x80000215 => 'EOS-1Ds Mark III',
  556. 0x80000218 => 'EOS 5D Mark II',
  557. 0x80000219 => 'WFT-E1',
  558. 0x80000232 => 'EOS-1D Mark II N',
  559. 0x80000234 => 'EOS 30D',
  560. 0x80000236 => 'EOS Digital Rebel XTi / 400D / Kiss Digital X',
  561. 0x80000241 => 'WFT-E2',
  562. 0x80000246 => 'WFT-E3',
  563. 0x80000250 => 'EOS 7D',
  564. 0x80000252 => 'EOS Rebel T1i / 500D / Kiss X3',
  565. 0x80000254 => 'EOS Rebel XS / 1000D / Kiss F',
  566. 0x80000261 => 'EOS 50D',
  567. 0x80000269 => 'EOS-1D X',
  568. 0x80000270 => 'EOS Rebel T2i / 550D / Kiss X4',
  569. 0x80000271 => 'WFT-E4',
  570. 0x80000273 => 'WFT-E5',
  571. 0x80000281 => 'EOS-1D Mark IV',
  572. 0x80000285 => 'EOS 5D Mark III',
  573. 0x80000286 => 'EOS Rebel T3i / 600D / Kiss X5',
  574. 0x80000287 => 'EOS 60D',
  575. 0x80000288 => 'EOS Rebel T3 / 1100D / Kiss X50',
  576. 0x80000297 => 'WFT-E2 II',
  577. 0x80000298 => 'WFT-E4 II',
  578. );
  579. my %canonQuality = (
  580. 1 => 'Economy',
  581. 2 => 'Normal',
  582. 3 => 'Fine',
  583. 4 => 'RAW',
  584. 5 => 'Superfine',
  585. 130 => 'Normal Movie', #22
  586. );
  587. my %canonImageSize = (
  588. 0 => 'Large',
  589. 1 => 'Medium',
  590. 2 => 'Small',
  591. 5 => 'Medium 1', #PH
  592. 6 => 'Medium 2', #PH
  593. 7 => 'Medium 3', #PH
  594. 8 => 'Postcard', #PH (SD200 1600x1200 with DateStamp option)
  595. 9 => 'Widescreen', #PH (SD900 3648x2048), 22 (HFS200 3264x1840)
  596. 10 => 'Medium Widescreen', #22 (HFS200 1920x1080)
  597. 14 => 'Small 1', #PH
  598. 15 => 'Small 2', #PH
  599. 16 => 'Small 3', #PH
  600. 128 => '640x480 Movie', #PH (7D 60fps)
  601. 129 => 'Medium Movie', #22
  602. 130 => 'Small Movie', #22
  603. 137 => '1280x720 Movie', #PH (S95 24fps; D60 50fps)
  604. 142 => '1920x1080 Movie', #PH (D60 25fps)
  605. );
  606. my %canonWhiteBalance = (
  607. # -1='Click", -2='Pasted' ?? - PH
  608. 0 => 'Auto',
  609. 1 => 'Daylight',
  610. 2 => 'Cloudy',
  611. 3 => 'Tungsten',
  612. 4 => 'Fluorescent',
  613. 5 => 'Flash',
  614. 6 => 'Custom',
  615. 7 => 'Black & White',
  616. 8 => 'Shade',
  617. 9 => 'Manual Temperature (Kelvin)',
  618. 10 => 'PC Set1', #PH
  619. 11 => 'PC Set2', #PH
  620. 12 => 'PC Set3', #PH
  621. 14 => 'Daylight Fluorescent', #3
  622. 15 => 'Custom 1', #PH
  623. 16 => 'Custom 2', #PH
  624. 17 => 'Underwater', #3
  625. 18 => 'Custom 3', #PH
  626. 19 => 'Custom 4', #PH
  627. 20 => 'PC Set4', #PH
  628. 21 => 'PC Set5', #PH
  629. # 22 - Custom 2?
  630. # 23 - Custom 3?
  631. # 30 - Click White Balance?
  632. # 31 - Shot Settings?
  633. # 137 - Tungsten?
  634. # 138 - White Fluorescent?
  635. # 139 - Fluorescent H?
  636. # 140 - Manual?
  637. );
  638. # picture styles used by the 5D
  639. # (styles 0x4X may be downloaded from Canon)
  640. # (called "ColorMatrix" in 1D owner manual)
  641. my %pictureStyles = ( #12
  642. 0x00 => 'None', #PH
  643. 0x01 => 'Standard', #15
  644. 0x02 => 'Portrait', #15
  645. 0x03 => 'High Saturation', #15
  646. 0x04 => 'Adobe RGB', #15
  647. 0x05 => 'Low Saturation', #15
  648. 0x06 => 'CM Set 1', #PH
  649. 0x07 => 'CM Set 2', #PH
  650. # "ColorMatrix" values end here
  651. 0x21 => 'User Def. 1',
  652. 0x22 => 'User Def. 2',
  653. 0x23 => 'User Def. 3',
  654. # "External" styles currently available from Canon are Nostalgia, Clear,
  655. # Twilight and Emerald. The "User Def" styles change to these "External"
  656. # codes when these styles are installed in the camera
  657. 0x41 => 'PC 1', #PH
  658. 0x42 => 'PC 2', #PH
  659. 0x43 => 'PC 3', #PH
  660. 0x81 => 'Standard',
  661. 0x82 => 'Portrait',
  662. 0x83 => 'Landscape',
  663. 0x84 => 'Neutral',
  664. 0x85 => 'Faithful',
  665. 0x86 => 'Monochrome',
  666. 0x87 => 'Auto', #PH
  667. );
  668. my %userDefStyles = ( #12/48
  669. Notes => q{
  670. Base style for user-defined picture styles. PC values represent external
  671. picture styles which may be downloaded from Canon and installed in the
  672. camera.
  673. },
  674. 0x41 => 'PC 1',
  675. 0x42 => 'PC 2',
  676. 0x43 => 'PC 3',
  677. 0x81 => 'Standard',
  678. 0x82 => 'Portrait',
  679. 0x83 => 'Landscape',
  680. 0x84 => 'Neutral',
  681. 0x85 => 'Faithful',
  682. 0x86 => 'Monochrome',
  683. 0x87 => 'Auto', #PH
  684. );
  685. # picture style tag information for CameraInfo550D
  686. my %psConv = (
  687. -559038737 => 'n/a', # = 0xdeadbeef ! LOL
  688. OTHER => sub { return shift },
  689. );
  690. my %psInfo = (
  691. Format => 'int32s',
  692. PrintHex => 1,
  693. PrintConv => \%psConv,
  694. );
  695. # ValueConv that makes long values binary type
  696. my %longBin = (
  697. ValueConv => 'length($val) > 64 ? \$val : $val',
  698. ValueConvInv => '$val',
  699. );
  700. # conversions, etc for CameraColorCalibration tags
  701. my %cameraColorCalibration = (
  702. Format => 'int16s[4]',
  703. Unknown => 1,
  704. PrintConv => 'sprintf("%4d %4d %4d (%dK)", split(" ",$val))',
  705. PrintConvInv => '$val=~s/\s+/ /g; $val=~tr/()K//d; $val',
  706. );
  707. # conversions, etc for PowerShot CameraColorCalibration tags
  708. my %cameraColorCalibration2 = (
  709. Format => 'int16s[5]',
  710. Unknown => 1,
  711. PrintConv => 'sprintf("%4d %4d %4d %4d (%dK)", split(" ",$val))',
  712. PrintConvInv => '$val=~s/\s+/ /g; $val=~tr/()K//d; $val',
  713. );
  714. # conversions, etc for byte-swapped FocusDistance tags
  715. my %focusDistanceByteSwap = (
  716. # this is very odd (little-endian number on odd boundary),
  717. # but it does seem to work better with my sample images - PH
  718. Format => 'int16uRev',
  719. ValueConv => '$val / 100',
  720. ValueConvInv => '$val * 100',
  721. PrintConv => '$val > 655.345 ? "inf" : "$val m"',
  722. PrintConvInv => '$val =~ s/ ?m$//; IsFloat($val) ? $val : 655.35',
  723. );
  724. # common attributes for writable BinaryData directories
  725. my %binaryDataAttrs = (
  726. PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
  727. WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
  728. CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
  729. WRITABLE => 1,
  730. );
  731. #------------------------------------------------------------------------------
  732. # Canon EXIF Maker Notes
  733. %Image::ExifTool::Canon::Main = (
  734. WRITE_PROC => \&WriteCanon,
  735. CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
  736. GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
  737. 0x1 => {
  738. Name => 'CanonCameraSettings',
  739. SubDirectory => {
  740. Validate => 'Image::ExifTool::Canon::Validate($dirData,$subdirStart,$size)',
  741. TagTable => 'Image::ExifTool::Canon::CameraSettings',
  742. },
  743. },
  744. 0x2 => {
  745. Name => 'CanonFocalLength',
  746. SubDirectory => {
  747. TagTable => 'Image::ExifTool::Canon::FocalLength',
  748. },
  749. },
  750. 0x3 => {
  751. Name => 'CanonFlashInfo',
  752. Unknown => 1,
  753. },
  754. 0x4 => {
  755. Name => 'CanonShotInfo',
  756. SubDirectory => {
  757. Validate => 'Image::ExifTool::Canon::Validate($dirData,$subdirStart,$size)',
  758. TagTable => 'Image::ExifTool::Canon::ShotInfo',
  759. },
  760. },
  761. 0x5 => {
  762. Name => 'CanonPanorama',
  763. SubDirectory => {
  764. TagTable => 'Image::ExifTool::Canon::Panorama',
  765. },
  766. },
  767. 0x6 => {
  768. Name => 'CanonImageType',
  769. Writable => 'string',
  770. Groups => { 2 => 'Image' },
  771. },
  772. 0x7 => {
  773. Name => 'CanonFirmwareVersion',
  774. Writable => 'string',
  775. },
  776. 0x8 => {
  777. Name => 'FileNumber',
  778. Writable => 'int32u',
  779. Groups => { 2 => 'Image' },
  780. PrintConv => '$_=$val,s/(\d+)(\d{4})/$1-$2/,$_',
  781. PrintConvInv => '$val=~s/-//g;$val',
  782. },
  783. 0x9 => {
  784. Name => 'OwnerName',
  785. Writable => 'string',
  786. # pad to 32 bytes (including null terminator which will be added)
  787. # to avoid bug which crashes DPP if length is 4 bytes
  788. ValueConvInv => '$val .= "\0" x (31 - length $val) if length $val < 31; $val',
  789. },
  790. 0xa => {
  791. Name => 'UnknownD30',
  792. SubDirectory => {
  793. Validate => 'Image::ExifTool::Canon::Validate($dirData,$subdirStart,$size)',
  794. TagTable => 'Image::ExifTool::Canon::UnknownD30',
  795. },
  796. },
  797. 0xc => [ # square brackets for a conditional list
  798. {
  799. # D30
  800. Name => 'SerialNumber',
  801. Condition => '$$self{Model} =~ /EOS D30\b/',
  802. Writable => 'int32u',
  803. PrintConv => 'sprintf("%.4x%.5d",$val>>16,$val&0xffff)',
  804. PrintConvInv => '$val=~/(.*)-?(\d{5})$/ ? (hex($1)<<16)+$2 : undef',
  805. },
  806. {
  807. # serial number of 1D/1Ds/1D Mark II/1Ds Mark II is usually
  808. # displayed w/o leeding zeros (ref 7) (1D uses 6 digits - PH)
  809. Name => 'SerialNumber',
  810. Condition => '$$self{Model} =~ /EOS-1D/',
  811. Writable => 'int32u',
  812. PrintConv => 'sprintf("%.6u",$val)',
  813. PrintConvInv => '$val',
  814. },
  815. {
  816. # all other models (D60,300D,350D,REBEL,10D,20D,etc)
  817. Name => 'SerialNumber',
  818. Writable => 'int32u',
  819. PrintConv => 'sprintf("%.10u",$val)',
  820. PrintConvInv => '$val',
  821. },
  822. ],
  823. 0xd => [
  824. {
  825. Name => 'CanonCameraInfo1D',
  826. # (save size of this record as "CameraInfoCount" for later tests)
  827. Condition => '($$self{CameraInfoCount} = $count) and $$self{Model} =~ /\b1DS?$/',
  828. SubDirectory => {
  829. TagTable => 'Image::ExifTool::Canon::CameraInfo1D',
  830. },
  831. },
  832. {
  833. Name => 'CanonCameraInfo1DmkII',
  834. Condition => '$$self{Model} =~ /\b1Ds? Mark II$/',
  835. SubDirectory => {
  836. TagTable => 'Image::ExifTool::Canon::CameraInfo1DmkII',
  837. },
  838. },
  839. {
  840. Name => 'CanonCameraInfo1DmkIIN',
  841. Condition => '$$self{Model} =~ /\b1Ds? Mark II N$/',
  842. SubDirectory => {
  843. TagTable => 'Image::ExifTool::Canon::CameraInfo1DmkIIN',
  844. },
  845. },
  846. {
  847. Name => 'CanonCameraInfo1DmkIII',
  848. Condition => '$$self{Model} =~ /\b1Ds? Mark III$/',
  849. SubDirectory => {
  850. TagTable => 'Image::ExifTool::Canon::CameraInfo1DmkIII',
  851. },
  852. },
  853. {
  854. Name => 'CanonCameraInfo1DmkIV',
  855. Condition => '$$self{Model} =~ /\b1D Mark IV$/',
  856. SubDirectory => {
  857. TagTable => 'Image::ExifTool::Canon::CameraInfo1DmkIV',
  858. },
  859. },
  860. {
  861. Name => 'CanonCameraInfo5D',
  862. Condition => '$$self{Model} =~ /EOS 5D$/',
  863. SubDirectory => {
  864. TagTable => 'Image::ExifTool::Canon::CameraInfo5D',
  865. },
  866. },
  867. {
  868. Name => 'CanonCameraInfo5DmkII',
  869. Condition => '$$self{Model} =~ /EOS 5D Mark II$/',
  870. SubDirectory => {
  871. TagTable => 'Image::ExifTool::Canon::CameraInfo5DmkII',
  872. },
  873. },
  874. {
  875. Name => 'CanonCameraInfo7D',
  876. Condition => '$$self{Model} =~ /EOS 7D$/',
  877. SubDirectory => {
  878. TagTable => 'Image::ExifTool::Canon::CameraInfo7D',
  879. },
  880. },
  881. {
  882. Name => 'CanonCameraInfo40D',
  883. Condition => '$$self{Model} =~ /EOS 40D$/',
  884. SubDirectory => {
  885. TagTable => 'Image::ExifTool::Canon::CameraInfo40D',
  886. },
  887. },
  888. {
  889. Name => 'CanonCameraInfo50D',
  890. Condition => '$$self{Model} =~ /EOS 50D$/',
  891. SubDirectory => {
  892. TagTable => 'Image::ExifTool::Canon::CameraInfo50D',
  893. },
  894. },
  895. {
  896. Name => 'CanonCameraInfo60D',
  897. Condition => '$$self{Model} =~ /EOS 60D$/',
  898. SubDirectory => {
  899. TagTable => 'Image::ExifTool::Canon::CameraInfo60D',
  900. },
  901. },
  902. {
  903. Name => 'CanonCameraInfo450D',
  904. Condition => '$$self{Model} =~ /\b(450D|REBEL XSi|Kiss X2)\b/',
  905. SubDirectory => {
  906. TagTable => 'Image::ExifTool::Canon::CameraInfo450D',
  907. },
  908. },
  909. {
  910. Name => 'CanonCameraInfo500D',
  911. Condition => '$$self{Model} =~ /\b(500D|REBEL T1i|Kiss X3)\b/',
  912. SubDirectory => {
  913. TagTable => 'Image::ExifTool::Canon::CameraInfo500D',
  914. },
  915. },
  916. {
  917. Name => 'CanonCameraInfo550D',
  918. Condition => '$$self{Model} =~ /\b(550D|REBEL T2i|Kiss X4)\b/',
  919. SubDirectory => {
  920. TagTable => 'Image::ExifTool::Canon::CameraInfo550D',
  921. },
  922. },
  923. {
  924. Name => 'CanonCameraInfo600D',
  925. Condition => '$$self{Model} =~ /\b(600D|REBEL T3i|Kiss X5)\b/',
  926. SubDirectory => {
  927. TagTable => 'Image::ExifTool::Canon::CameraInfo600D',
  928. },
  929. },
  930. {
  931. Name => 'CanonCameraInfo1000D',
  932. Condition => '$$self{Model} =~ /\b(1000D|REBEL XS|Kiss F)\b/',
  933. SubDirectory => {
  934. TagTable => 'Image::ExifTool::Canon::CameraInfo1000D',
  935. },
  936. },
  937. {
  938. Name => 'CanonCameraInfo1100D',
  939. Condition => '$$self{Model} =~ /\b(1100D|REBEL T3|Kiss X50)\b/',
  940. SubDirectory => {
  941. TagTable => 'Image::ExifTool::Canon::CameraInfo600D',
  942. },
  943. },
  944. {
  945. Name => 'CanonCameraInfoPowerShot',
  946. # valid if format is int32u[138] or int32u[148]
  947. Condition => '$format eq "int32u" and ($count == 138 or $count == 148)',
  948. SubDirectory => {
  949. TagTable => 'Image::ExifTool::Canon::CameraInfoPowerShot',
  950. },
  951. },
  952. {
  953. Name => 'CanonCameraInfoPowerShot2',
  954. # valid if format is int32u[162], int32u[167], int32u[171] or int32u[264]
  955. Condition => q{
  956. $format eq "int32u" and ($count == 156 or $count == 162 or
  957. $count == 167 or $count == 171 or $count == 264)
  958. },
  959. SubDirectory => {
  960. TagTable => 'Image::ExifTool::Canon::CameraInfoPowerShot2',
  961. },
  962. },
  963. {
  964. Name => 'CanonCameraInfoUnknown32',
  965. Condition => '$format =~ /^int32/',
  966. # (counts of 72, 85, 86, 93, 94, 96, 104) - PH
  967. SubDirectory => {
  968. TagTable => 'Image::ExifTool::Canon::CameraInfoUnknown32',
  969. },
  970. },
  971. {
  972. Name => 'CanonCameraInfoUnknown16',
  973. Condition => '$format =~ /^int16/',
  974. SubDirectory => {
  975. TagTable => 'Image::ExifTool::Canon::CameraInfoUnknown16',
  976. },
  977. },
  978. {
  979. Name => 'CanonCameraInfoUnknown',
  980. SubDirectory => {
  981. TagTable => 'Image::ExifTool::Canon::CameraInfoUnknown',
  982. },
  983. },
  984. ],
  985. 0xe => {
  986. Name => 'CanonFileLength',
  987. Writable => 'int32u',
  988. Groups => { 2 => 'Image' },
  989. },
  990. 0xf => [
  991. { # used by 1DmkII, 1DSmkII and 1DmkIIN
  992. Name => 'CustomFunctions1D',
  993. Condition => '$$self{Model} =~ /EOS-1D/',
  994. SubDirectory => {
  995. Validate => 'Image::ExifTool::Canon::Validate($dirData,$subdirStart,$size)',
  996. TagTable => 'Image::ExifTool::CanonCustom::Functions1D',
  997. },
  998. },
  999. {
  1000. Name => 'CustomFunctions5D',
  1001. Condition => '$$self{Model} =~ /EOS 5D/',
  1002. SubDirectory => {
  1003. Validate => 'Image::ExifTool::Canon::Validate($dirData,$subdirStart,$size)',
  1004. TagTable => 'Image::ExifTool::CanonCustom::Functions5D',
  1005. },
  1006. },
  1007. {
  1008. Name => 'CustomFunctions10D',
  1009. Condition => '$$self{Model} =~ /EOS 10D/',
  1010. SubDirectory => {
  1011. Validate => 'Image::ExifTool::Canon::Validate($dirData,$subdirStart,$size)',
  1012. TagTable => 'Image::ExifTool::CanonCustom::Functions10D',
  1013. },
  1014. },
  1015. {
  1016. Name => 'CustomFunctions20D',
  1017. Condition => '$$self{Model} =~ /EOS 20D/',
  1018. SubDirectory => {
  1019. Validate => 'Image::ExifTool::Canon::Validate($dirData,$subdirStart,$size)',
  1020. TagTable => 'Image::ExifTool::CanonCustom::Functions20D',
  1021. },
  1022. },
  1023. {
  1024. Name => 'CustomFunctions30D',
  1025. Condition => '$$self{Model} =~ /EOS 30D/',
  1026. SubDirectory => {
  1027. Validate => 'Image::ExifTool::Canon::Validate($dirData,$subdirStart,$size)',
  1028. TagTable => 'Image::ExifTool::CanonCustom::Functions30D',
  1029. },
  1030. },
  1031. {
  1032. Name => 'CustomFunctions350D',
  1033. Condition => '$$self{Model} =~ /\b(350D|REBEL XT|Kiss Digital N)\b/',
  1034. SubDirectory => {
  1035. Validate => 'Image::ExifTool::Canon::Validate($dirData,$subdirStart,$size)',
  1036. TagTable => 'Image::ExifTool::CanonCustom::Functions350D',
  1037. },
  1038. },
  1039. {
  1040. Name => 'CustomFunctions400D',
  1041. Condition => '$$self{Model} =~ /\b(400D|REBEL XTi|Kiss Digital X|K236)\b/',
  1042. SubDirectory => {
  1043. Validate => 'Image::ExifTool::Canon::Validate($dirData,$subdirStart,$size)',
  1044. TagTable => 'Image::ExifTool::CanonCustom::Functions400D',
  1045. },
  1046. },
  1047. {
  1048. Name => 'CustomFunctionsD30',
  1049. Condition => '$$self{Model} =~ /EOS D30\b/',
  1050. SubDirectory => {
  1051. Validate => 'Image::ExifTool::Canon::Validate($dirData,$subdirStart,$size)',
  1052. TagTable => 'Image::ExifTool::CanonCustom::FunctionsD30',
  1053. },
  1054. },
  1055. {
  1056. Name => 'CustomFunctionsD60',
  1057. Condition => '$$self{Model} =~ /EOS D60\b/',
  1058. SubDirectory => {
  1059. # the stored size in the D60 apparently doesn't include the size word:
  1060. Validate => 'Image::ExifTool::Canon::Validate($dirData,$subdirStart,$size-2,$size)',
  1061. # (D60 custom functions are basically the same as D30)
  1062. TagTable => 'Image::ExifTool::CanonCustom::FunctionsD30',
  1063. },
  1064. },
  1065. {
  1066. Name => 'CustomFunctionsUnknown',
  1067. SubDirectory => {
  1068. Validate => 'Image::ExifTool::Canon::Validate($dirData,$subdirStart,$size)',
  1069. TagTable => 'Image::ExifTool::CanonCustom::FuncsUnknown',
  1070. },
  1071. },
  1072. ],
  1073. 0x10 => { #PH
  1074. Name => 'CanonModelID',
  1075. Writable => 'int32u',
  1076. PrintHex => 1,
  1077. SeparateTable => 1,
  1078. PrintConv => \%canonModelID,
  1079. },
  1080. 0x11 => { #PH
  1081. Name => 'MovieInfo',
  1082. SubDirectory => {
  1083. Validate => 'Image::ExifTool::Canon::Validate($dirData,$subdirStart,$size)',
  1084. TagTable => 'Image::ExifTool::Canon::MovieInfo',
  1085. },
  1086. },
  1087. 0x12 => {
  1088. Name => 'CanonAFInfo',
  1089. # not really a condition -- just need to store the count for later
  1090. Condition => '$$self{AFInfoCount} = $count',
  1091. SubDirectory => {
  1092. # this record does not begin with a length word, so it
  1093. # has to be validated differently
  1094. Validate => 'Image::ExifTool::Canon::ValidateAFInfo($dirData,$subdirStart,$size)',
  1095. TagTable => 'Image::ExifTool::Canon::AFInfo',
  1096. },
  1097. },
  1098. 0x13 => { #PH
  1099. Name => 'ThumbnailImageValidArea',
  1100. # left,right,top,bottom edges of image in thumbnail, or all zeros for full frame
  1101. Notes => 'all zeros for full frame',
  1102. Writable => 'int16u',
  1103. Count => 4,
  1104. },
  1105. 0x15 => { #PH
  1106. # display format for serial number
  1107. Name => 'SerialNumberFormat',
  1108. Writable => 'int32u',
  1109. PrintHex => 1,
  1110. PrintConv => {
  1111. 0x90000000 => 'Format 1',
  1112. 0xa0000000 => 'Format 2',
  1113. },
  1114. },
  1115. 0x1a => { #15
  1116. Name => 'SuperMacro',
  1117. Writable => 'int16u',
  1118. PrintConv => {
  1119. 0 => 'Off',
  1120. 1 => 'On (1)',
  1121. 2 => 'On (2)',
  1122. },
  1123. },
  1124. 0x1c => { #PH (A570IS)
  1125. Name => 'DateStampMode',
  1126. Writable => 'int16u',
  1127. Notes => 'used only in postcard mode',
  1128. PrintConv => {
  1129. 0 => 'Off',
  1130. 1 => 'Date',
  1131. 2 => 'Date & Time',
  1132. },
  1133. },
  1134. 0x1d => { #PH
  1135. Name => 'MyColors',
  1136. SubDirectory => {
  1137. Validate => 'Image::ExifTool::Canon::Validate($dirData,$subdirStart,$size)',
  1138. TagTable => 'Image::ExifTool::Canon::MyColors',
  1139. },
  1140. },
  1141. 0x1e => { #PH
  1142. Name => 'FirmwareRevision',
  1143. Writable => 'int32u',
  1144. # as a hex number: 0xAVVVRR00, where (a bit of guessing here...)
  1145. # A = 'a' for alpha, 'b' for beta?
  1146. # V = version? (100,101 for normal releases, 100,110,120,130,170 for alpha/beta)
  1147. # R = revision? (01-07, except 00 for alpha/beta releases)
  1148. PrintConv => q{
  1149. my $rev = sprintf("%.8x", $val);
  1150. my ($rel, $v1, $v2, $r1, $r2) = ($rev =~ /^(.)(.)(..)0?(.+)(..)$/);
  1151. my %r = ( a => 'Alpha ', b => 'Beta ', '0' => '' );
  1152. $rel = defined $r{$rel} ? $r{$rel} : "Unknown($rel) ";
  1153. return "$rel$v1.$v2 rev $r1.$r2",
  1154. },
  1155. PrintConvInv => q{
  1156. $_=$val; s/Alpha ?/a/i; s/Beta ?/b/i;
  1157. s/Unknown ?\((.)\)/$1/i; s/ ?rev ?(.)\./0$1/; s/ ?rev ?//;
  1158. tr/a-fA-F0-9//dc; return hex $_;
  1159. },
  1160. },
  1161. # 0x1f - used for red-eye-corrected images - PH (A570IS)
  1162. # 0x22 - values 1 and 2 are 2 and 1 for flash pics, 0 otherwise - PH (A570IS)
  1163. 0x23 => { #31
  1164. Name => 'Categories',
  1165. Writab

Large files files are truncated, but you can click here to view the full file