canon_raw.html 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  2. "http://www.w3.org/TR/html4/loose.dtd">
  3. <html>
  4. <head>
  5. <title>The Canon RAW (CRW) File Format</title>
  6. <link rel=stylesheet type='text/css' href='style.css' title='Style'>
  7. <style type="text/css">
  8. <!--
  9. table.norm th.lt { background: #eee }
  10. -->
  11. </style>
  12. </head>
  13. <body>
  14. <h1 class='up'>The Canon RAW (CRW) File Format</h1>
  15. <p>This is a description of the Canon CRW file format. CRW files are written in
  16. Camera Image File Format (CIFF). The original Canon CIFF specification can be
  17. downloaded from <a href="http://xyrion.org/ciff/">http://xyrion.org/ciff/</a>
  18. (which I finally discovered after writing this document!). Note that Canon uses
  19. two different RAW formats, and newer models produce CR2 instead of CRW files.
  20. The CR2 files use a TIFF-based format, which is different than the CRW CIFF
  21. format documented here. (See <a href="http://lclevy.free.fr/cr2/">this page</a>
  22. for details about the CR2 format.)</p>
  23. <h3>Comments about the CRW Format</h3>
  24. <p>The Canon CRW file format is a joy to work with. It has a structure that is
  25. fundamentally similar to TIFF, with directories that point to data within the
  26. file. But a major improvement over TIFF is that the offsets are not absolute,
  27. they are relative to the start of the data block for each directory. This
  28. allows subdirectories within a file to be moved or copied to another file
  29. without having to adjust the offsets, which is fantastic because it means that
  30. rewriter software doesn't have to understand the complete format in order to be
  31. able to successfully rewrite the file.</p>
  32. <p>Also, the data comes before the directories in the file, which is the natural
  33. way to write information and minimizes the amount memory needed to buffer the
  34. data (unlike EXIF, which is typically the reverse).</p>
  35. <blockquote class='aside'>
  36. <b>A short rant about TIFF inadequacies:</b>
  37. <br>TIFF format on the other hand, really sucks in comparison (this includes
  38. JPEG too, since JPEG uses TIFF format to store the EXIF information). The main
  39. problems are the use of absolute offsets and the ambiguity between integers and
  40. pointers (such as those used for custom IFD's). Because absolute offsets
  41. require adjusting whenever anything is moved in the file, the format of ALL
  42. contained data structures must be understood to properly edit the file. This
  43. results in an impossible situation when presented with undocumented custom
  44. structures like those used in the maker notes written by modern digital cameras.
  45. This is why it is so common for image editors to either scramble the maker notes
  46. or discard them completely. The official TIFF recommendation is to discard
  47. unknown information when rewriting the image (as Photoshop does), but for many,
  48. including myself, this option is simply unacceptable.
  49. </blockquote>
  50. <p>The bottom line is that rewriting a Canon CRW file is about 20 times easier,
  51. and much less prone to errors than rewriting a TIFF or JPEG.</p>
  52. <h2>CRW (CIFF) Format Specification</h2>
  53. <h3>File Header</h3>
  54. <p>A Canon CRW file starts with the following byte sequence:</p>
  55. <blockquote>
  56. <table class='norm'><tr><th>Offset</th>
  57. <th>Number<br>of&nbsp;bytes</th><th>Value</th><th>Name</th><th>Description</th></tr>
  58. <tr align='center'><td>0</td><td>2</td><td>"II"</td><td>ByteOrder</td>
  59. <td align='left'>"II" means Intel (little-endian) order, which is the only order I've
  60. seen since Canon is using x86 processors in its current cameras, but
  61. presumably this could be "MM" for future models.
  62. </td></tr>
  63. <tr align='center'><td>2</td><td>4</td><td>0x0000001a</td><td>HeaderLength</td>
  64. <td align='left'>32-bit integer giving the length of the CRW file header. For
  65. current camera models the header is 26 bytes long.</td></tr>
  66. <tr align='center'><td>6</td><td>8</td><td>"HEAPCCDR"</td><td>Signature</td>
  67. <td align='left'>This series of characters identifies the file as a Canon CRW
  68. file. The signature is "HEAPJPGM" for CIFF information in APP0 of JPEG images.</td></tr>
  69. <tr align='center'><td>14</td><td>4</td><td>0x00010002</td><td>CRWVersion</td>
  70. <td align='left'>32-bit integer giving the major (high 16 bits) and minor
  71. (low 16 bits) CRW file version numbers. The version is 1.2 for current cameras.</td></tr>
  72. <tr align='center'><td>18</td><td>8</td><td>0</td><td>Reserved</td>
  73. <td align='left'>Two 32-bit integers, currently set to zero.</td></tr>
  74. </table></blockquote>
  75. <h3>Directory Block Structure</h3>
  76. <p>The root directory block begins immediately after the file header (at the position
  77. specified by <b>HeaderLength</b>), and ends at the end of the file. The structure
  78. of this block is as follows:</p>
  79. <blockquote><table class='norm'>
  80. <tr><th>Offset<br>within block</th><th>Number<br>of bytes</th><th>Value</th>
  81. <th>Name</th><th>Description</th></tr>
  82. <tr align='center'><td>0</td><td>S</td><td>-<br>-<br>-<br>-<br>-</td><td>ValueData</td>
  83. <td align='left'>The value data referenced by offsets in the directory</td></tr>
  84. <tr align='center'><td>S</td><td>2</td><td>N</td><td>DirCount</td>
  85. <td align='left'>16-bit integer giving the number of directory entries</td></tr>
  86. <tr align='center'><td>S + 2</td><td>N * 10</td><td>-<br>-<br>-</td><td>DirEntries</td>
  87. <td align='left'>The CRW directory entries</td></tr>
  88. <tr align='center'><td>S + 2 + N*10</td><td><i>any</i></td><td>-</td><td>OtherData</td>
  89. <td align='left'><i>(be aware there may be other data hiding here)</i></td></tr>
  90. <tr align='center'><td>BlockSize - 4</td><td>4</td><td>S</td><td>DirStart</td>
  91. <td align='left'>32-bit integer giving the size of the <b>ValueData</b></td></tr>
  92. </table></blockquote>
  93. <p>To parse a CRW directory block, first read the 4 bytes at the end of the
  94. block to get the location (S) of <b>DirCount</b>. Next read <b>DirCount</b> to
  95. determine the number of entries (N) in the directory, then read the directory
  96. entries.</p>
  97. <p>The <b>ValueData</b> may contain complete subdirectory blocks, each of which
  98. has the same format as specified above (and these subdirectories may themselves
  99. contain sub-subdirectories...). For these subdirectories, <b>BlockSize</b> is
  100. given by the <b>Size</b> specified in the corresponding directory entry. For
  101. the root directory, <b>BlockSize</b> is the length of the file.</p>
  102. <p>The <b>OtherData</b> normally does not exist (eg. the <b>DirEntries</b>
  103. usually end at the <b>DirStart</b> pointer), but this is not always the case:
  104. Canon Digital Photo Professional uses this area in the root directory block to
  105. store VRD data in edited CRW images. (Note that VRD supports embedded XMP,
  106. which provides a technique to store modern metadata in CRW images!)</p>
  107. <h3>CRW Directory Entry Format</h3>
  108. <p>The CRW directory consists of N 10-byte entries. The format of each entry is
  109. as follows:</p>
  110. <blockquote><table class='norm'>
  111. <tr><th>Offset<br>within entry</th><th>Number<br>of bytes</th>
  112. <th>Name</th><th>Description</th></tr>
  113. <tr align='center'><td>0</td><td>2</td><td>Tag</td>
  114. <td align='left'>16-bit integer identifying the type of data</td></tr>
  115. <tr align='center'><td>2</td><td>4</td><td>Size</td>
  116. <td align='left'>32-bit integer giving the number of bytes in the value data</td></tr>
  117. <tr align='center'><td>6</td><td>4</td><td>Offset</td>
  118. <td align='left'>32-bit integer offset that gives the number of bytes from the start of the
  119. <b>ValueData</b> block to the start of the value data for this directory entry</td></tr>
  120. </table></blockquote>
  121. <p>Data values with lengths shorter than 8 bytes may be stored in the directory
  122. <b>Size</b> and <b>Offset</b> fields. For these values the <b>DataLocation</b>
  123. bits in the <b>Tag</b> are set to 0x4000 (see <b>DataLocation</b> table
  124. below).</p>
  125. <p>Data stored in the <b>ValueData</b> block must be aligned on even 2-byte
  126. boundaries, yielding <b>Offset</b>s which are divisible by 2. To achieve this,
  127. records with an odd number of bytes must be padded with a zero byte.</p>
  128. <h3>Tag Bits</h3>
  129. <p>The 16-bit <b>Tag</b> value is composed of 3 bit fields, as follows:</p>
  130. <blockquote><table class='norm'>
  131. <tr><th>Bits</th><th>Mask</th><th>Name</th><th>Description</th></tr>
  132. <tr align='center'><td>14-15</td><td>0xc000</td><td>DataLocation</td>
  133. <td align='left'>Specifies the location of the data</td></tr>
  134. <tr align='center'><td>11-13</td><td>0x3800</td><td>DataFormat</td>
  135. <td align='left'>Identifies the information format</td></tr>
  136. <tr align='center'><td>0-10</td><td>0x07ff</td><td>TagIndex</td>
  137. <td align='left'>Index to identify the specific type of information</td></tr>
  138. </table></blockquote>
  139. <h4>DataLocation</h4>
  140. <p>Value data may either be stored in the <b>ValueData</b> block, or within the
  141. <b>Size</b> and <b>Offset</b> fields of the directory entry if it is less than 8
  142. bytes long. The <b>DataLocation</b> bits specify where the value is stored:</p>
  143. <blockquote><table class='norm'>
  144. <tr><th>DataLocation</th><th>Where</th><th>Description</th></tr>
  145. <tr align='center'><td>0x0000</td><td>ValueData</td>
  146. <td align='left'>Values are stored in the <b>ValueData</b> block, at the specified <b>Offset</b>
  147. and <b>Size</b></td></tr>
  148. <tr align='center'><td>0x4000</td><td>Directory</td>
  149. <td align='left'>Values are stored in the <b>Size</b> and <b>Offset</b> fields
  150. of the directory entry. Values stored here are limited to a maximum size of 8 bytes.</td></tr>
  151. <tr align='center'><td>0x8000<br>0xc000</td><td>?</td><td align='left'>-</td></tr>
  152. </table></blockquote>
  153. <h4>DataFormat</h4>
  154. <p>Three <b>Tag</b> bits are used to specify the data format:</p>
  155. <blockquote><table class='norm'>
  156. <tr><th>DataFormat</th><th>Alignment</th><th>Description</th></tr>
  157. <tr align='center'><td>0x0000</td><td>1-Byte</td>
  158. <td align='left'>A series of bytes</td></tr>
  159. <tr align='center'><td>0x0800</td><td>1-Byte</td>
  160. <td align='left'>A null-terminated ASCII string</td></tr>
  161. <tr align='center'><td>0x1000</td><td>2-Byte</td>
  162. <td align='left'>A series of 16-bit integers</td></tr>
  163. <tr align='center'><td>0x1800</td><td>4-Byte</td>
  164. <td align='left'>A series of 32-bit integers or floats</td></tr>
  165. <tr align='center'><td>0x2000</td><td>1-Byte</td>
  166. <td align='left'>A structure which is a mixture of formats</td></tr>
  167. <tr align='center'><td>0x2800<br>0x3000</td><td>1-Byte</td>
  168. <td align='left'>A subdirectory block</td></tr>
  169. <tr align='center'><td>0x3800</td><td>?</td>
  170. <td align='left'>-</td></tr>
  171. </table></blockquote>
  172. <h4>TagID = DataFormat + TagIndex</h4>
  173. <p>Together, the <b>DataFormat</b> and <b>TagIndex</b> fields form a <b>TagID</b>
  174. which can be used to identify tags within the CRW file. The following is a list
  175. of known <b>TagID</b> values and their corresponding tag numbers in the <b>EXIF</b>
  176. maker notes when found in a JPEG or TIFF image. Also listed is the TagID of the
  177. <b>SubDir</b>ectory where the information is found. The <b>Size</b> listed
  178. below is an observed size of the value data, and is not necessarily expected to
  179. remain constant for all camera models.</p>
  180. <blockquote><table class='norm'>
  181. <tr><th>TagID</th><th>EXIF</th><th>SubDir</th><th>Name</th><th>Size</th><th>Description</th></tr>
  182. <tr><th class='lt' colspan=6>1-Byte Alignment</th></tr>
  183. <tr align='center'><td>0x0000</td><td>-</td><td><i>any</i></td><td>NullRecord</td><td>0</td>
  184. <td align='left'>This is a null directory entry</td></tr>
  185. <tr align='center'><td>0x0001</td><td>-</td><td><i>any</i></td><td>FreeBytes</td><td><i>varies</i></td>
  186. <td align='left'>Unused bytes in the <b>ValueData</b></td></tr>
  187. <tr align='center'><td>0x0006</td><td>-</td><td>0x300b</td><td>-</td><td>8</td><td align='left'>-</td></tr>
  188. <tr align='center'><td>0x0032</td><td>-</td><td>0x300b</td><td>CanonColorInfo1</td><td>768 or 2048</td>
  189. <td align='left'>Block of color information (format unknown)</td></tr>
  190. <tr align='center'><td>0x0036</td><td>-</td><td>0x300b</td><td>?</td><td><i>varies</i></td><td align='left'>-</td></tr>
  191. <tr align='center'><td>0x003f</td><td>-</td><td>0x300b</td><td>?</td><td>5120</td><td align='left'>-</td></tr>
  192. <tr align='center'><td>0x0040</td><td>-</td><td>0x300b</td><td>?</td><td>256</td><td align='left'>-</td></tr>
  193. <tr align='center'><td>0x0041</td><td>-</td><td>0x300b</td><td>?</td><td>256</td><td align='left'>-</td></tr>
  194. <tr><th class='lt' colspan=6>ASCII Strings</th></tr>
  195. <tr align='center'><td>0x0805</td><td>-</td><td>0x2804</td><td>CanonFileDescription</td><td>32</td>
  196. <td align='left'>Description of the file format.
  197. eg) "EOS DIGITAL REBEL CMOS RAW"</td></tr>
  198. <tr align='center'><td>0x0805</td><td>-</td><td>0x300a</td><td>UserComment</td><td>256</td>
  199. <td align='left'>User comment (usually blank)</td></tr>
  200. <tr align='center'><td>0x080a</td><td>-</td><td>0x2807</td><td>CanonRawMakeModel</td><td>32</td>
  201. <td align='left'>Two end-to-end null-terminated ASCII strings giving the camera make and model.
  202. eg) "Canon","Canon EOS DIGITAL REBEL"</td></tr>
  203. <tr align='center'><td>0x080b</td><td>0x07</td><td>0x3004</td><td>CanonFirmwareVersion</td><td>32</td>
  204. <td align='left'>Firmware version. eg) "Firmware Version 1.1.1"</td></tr>
  205. <tr align='center'><td>0x080c</td><td>-</td><td>?</td><td>ComponentVersion</td><td>?</td><td align='left'>-</td></tr>
  206. <tr align='center'><td>0x080d</td><td>-</td><td>0x3004</td><td>ROMOperationMode</td><td>4</td>
  207. <td align='left'>eg) The string "USA" for 300D's sold in North America</td></tr>
  208. <tr align='center'><td>0x0810</td><td>0x09</td><td>0x2807</td><td>OwnerName</td><td>32</td>
  209. <td align='left'>Owner's name. eg) "Phil Harvey"</td></tr>
  210. <tr align='center'><td>0x0815</td><td>0x06</td><td>0x2804</td><td>CanonImageType</td><td>32</td>
  211. <td align='left'>Type of file. eg) "CRW:EOS DIGITAL REBEL CMOS RAW"</td></tr>
  212. <tr align='center'><td>0x0816</td><td>-</td><td>0x300a</td><td>OriginalFileName</td><td>32</td>
  213. <td align='left'>Original file name. eg) "CRW_1834.CRW"</td></tr>
  214. <tr align='center'><td>0x0817</td><td>-</td><td>0x300a</td><td>ThumbnailFileName</td><td>32</td>
  215. <td align='left'>Thumbnail file name. eg) "CRW_1834.THM"</td></tr>
  216. <tr><th class='lt' colspan=6>2-Byte Alignment</th></tr>
  217. <tr align='center'><td>0x100a</td><td>-</td><td>0x300a</td><td>TargetImageType</td><td>2</td>
  218. <td align='left'>0=real-world subject, 1=written document</td></tr>
  219. <tr align='center'><td>0x1010</td><td>-</td><td>0x3002</td><td>ShutterReleaseMethod</td><td>2</td>
  220. <td align='left'>0=single shot, 1=continuous shooting</td></tr>
  221. <tr align='center'><td>0x1011</td><td>-</td><td>0x3002</td><td>ShutterReleaseTiming</td><td>2</td>
  222. <td align='left'>0=priority on shutter, 1=priority on focus</td></tr>
  223. <tr align='center'><td>0x1014</td><td>-</td><td>0x3002</td><td>-</td><td>8</td><td align='left'>-</td></tr>
  224. <tr align='center'><td>0x1016</td><td>-</td><td>0x3002</td><td>ReleaseSetting</td><td>2</td><td align='left'>-</td></tr>
  225. <tr align='center'><td>0x101c</td><td>-</td><td>0x3004</td><td>BaseISO</td><td>2</td>
  226. <td align='left'>The camera body's base ISO sensitivity</td></tr>
  227. <tr align='center'><td>0x1026</td><td>-</td><td>0x300a</td><td>-</td><td>6</td><td align='left'>-</td></tr>
  228. <tr align='center'><td>0x1028</td><td>0x03</td><td>0x300b</td><td>CanonFlashInfo?</td><td>8</td><td align='left'>Unknown information, flash related</td></tr>
  229. <tr align='center'><td>0x1029</td><td>0x02</td><td>0x300b</td><td>FocalLength</td><td>8</td>
  230. <td align='left'>Four 16 bit integers: 0) unknown, 1) focal length in mm, 2-3) sensor width
  231. and height in units of 1/1000 inch</td></tr>
  232. <tr align='center'><td>0x102a</td><td>0x04</td><td>0x300b</td><td>CanonShotInfo</td><td><i>varies</i></td>
  233. <td align='left'>Data block giving <a href="TagNames/Canon.html#ShotInfo">shot information</a></td></tr>
  234. <tr align='center'><td>0x102c</td><td>-</td><td>0x300b</td><td>CanonColorInfo2</td><td>256</td>
  235. <td align='left'>Data block of color information (format unknown)</td></tr>
  236. <tr align='center'><td>0x102d</td><td>0x01</td><td>0x300b</td><td>CanonCameraSettings</td><td><i>varies</i></td>
  237. <td align='left'>Data block giving <a href="TagNames/Canon.html#CameraSettings">camera settings</a></td></tr>
  238. <tr align='center'><td>0x1030</td><td>-</td><td>0x300b</td><td>WhiteSample</td><td>102 or 118</td>
  239. <td align='left'><a href="TagNames/CanonRaw.html#WhiteSample">White sample information</a> with encrypted 8x8 sample data</td></tr>
  240. <tr align='center'><td>0x1031</td><td>-</td><td>0x300b</td><td>SensorInfo</td><td>34</td>
  241. <td align='left'><a href="TagNames/Canon.html#SensorInfo">Sensor size and resolution information</a></td></tr>
  242. <tr align='center'><td>0x1033</td><td>0x0f</td><td>0x300b</td><td>CanonCustomFunctions</td><td><i>varies</i></td>
  243. <td align='left'>Data block giving <a href="TagNames/CanonCustom.html#Functions10D">Canon custom settings</a></td></tr>
  244. <tr align='center'><td>0x1038</td><td>0x12</td><td>0x300b</td><td>CanonAFInfo</td><td><i>varies</i></td>
  245. <td align='left'>Data block giving <a href="TagNames/Canon.html#AFInfo">AF-specific information</a></td></tr>
  246. <tr align='center'><td>0x1039</td><td>0x13</td><td>0x300b</td><td>?</td><td>8</td><td align='left'>-</td></tr>
  247. <tr align='center'><td>0x103c</td><td>-</td><td>0x300b</td><td>?</td><td>156</td><td align='left'>-</td></tr>
  248. <tr align='center'><td>0x107f</td><td>-</td><td>0x300b</td><td>-</td><td><i>varies</i></td><td align='left'>-</td></tr>
  249. <tr align='center'><td>0x1093</td><td>0x93</td><td>0x300b</td><td>CanonFileInfo</td><td>18</td>
  250. <td align='left'>Data block giving <a href="TagNames/Canon.html#FileInfo">file-specific information</a></td></tr>
  251. <tr align='center'><td>0x10a8</td><td>0xa8</td><td>0x300b</td><td>?</td><td>20</td><td align='left'>-</td></tr>
  252. <tr align='center'><td>0x10a9</td><td>0xa9</td><td>0x300b</td><td>ColorBalance</td><td>82</td>
  253. <td align='left'>Table of 16-bit integers. The first integer (like many other data blocks) is
  254. the number of bytes in the record. This is followed by red, green1, green2 and blue
  255. levels for WhiteBalance settings: auto, daylight, shade, cloudy, tungsten,
  256. fluorescent, flash, custom and kelvin. The final 4 entries appear to be some sort of
  257. baseline red, green1, green2 and blue levels.</td></tr>
  258. <tr align='center'><td>0x10aa</td><td>0xaa</td><td>0x300b</td><td>?</td><td>10</td><td align='left'>-</td></tr>
  259. <tr align='center'><td>0x10ad</td><td>-</td><td>0x300b</td><td>?</td><td>62</td><td align='left'>-</td></tr>
  260. <tr align='center'><td>0x10ae</td><td>0xae</td><td>0x300b</td><td>ColorTemperature</td><td>2</td>
  261. <td align='left'>16-bit integer giving the color temperature</td></tr>
  262. <tr align='center'><td>0x10af</td><td>-</td><td>0x300b</td><td>?</td><td>2</td><td align='left'>-</td></tr>
  263. <tr align='center'><td>0x10b4</td><td>0xb4</td><td>0x300b</td><td>ColorSpace</td><td>2</td>
  264. <td align='left'>16-bit integer specifying the color space
  265. (1=sRGB, 2=Adobe RGB, 0xffff=uncalibrated)</td></tr>
  266. <tr align='center'><td>0x10b5</td><td>0xb5</td><td>0x300b</td><td>RawJpgInfo</td><td>10</td>
  267. <td align='left'>Data block giving <a href="TagNames/CanonRaw.html#RawJpgInfo">embedded JPG information</a></td></tr>
  268. <tr align='center'><td>0x10c0</td><td>0xc0</td><td>0x300b</td><td>?</td><td>26</td><td align='left'>-</td></tr>
  269. <tr align='center'><td>0x10c1</td><td>0xc1</td><td>0x300b</td><td>?</td><td>26</td><td align='left'>-</td></tr>
  270. <tr align='center'><td>0x10c2</td><td>-</td><td>0x300b</td><td>?</td><td>884</td><td align='left'>-</td></tr>
  271. <tr><th class='lt' colspan=6>4-Byte Alignment</th></tr>
  272. <tr align='center'><td>0x1803</td><td>-</td><td>0x300a</td><td>ImageFormat</td><td>8</td>
  273. <td align='left'>32-bit integer specifying image format (0x20001 for CRW), followed
  274. by 32-bit float giving target compression ratio</td></tr>
  275. <tr align='center'><td>0x1804</td><td>-</td><td>0x300a</td><td>RecordID</td><td>4</td>
  276. <td align='left'>The number of pictures taken since the camera was manufactured</td></tr>
  277. <tr align='center'><td>0x1805</td><td>-</td><td>0x3002</td><td>-</td><td>8</td><td align='left'>-</td></tr>
  278. <tr align='center'><td>0x1806</td><td>-</td><td>0x3002</td><td>SelfTimerTime</td><td>4</td>
  279. <td align='left'>32-bit integer giving self-timer time in milliseconds</td></tr>
  280. <tr align='center'><td>0x1807</td><td>-</td><td>0x3002</td><td>TargetDistanceSetting</td><td>4</td>
  281. <td align='left'>32-bit float giving target distance in mm</td></tr>
  282. <tr align='center'><td>0x180b</td><td>0x0c</td><td>0x3004</td><td>SerialNumber</td><td>4</td>
  283. <td align='left'>The camera body number for EOS models. eg) 00560012345</td></tr>
  284. <tr align='center'><td>0x180e</td><td>-</td><td>0x300a</td><td>TimeStamp</td><td>12</td>
  285. <td align='left'>32-bit integer giving the time in seconds when the picture was taken,
  286. followed by a 32-bit timezone in seconds</td></tr>
  287. <tr align='center'><td>0x1810</td><td>-</td><td>0x300a</td><td>ImageInfo</td><td>28</td>
  288. <td align='left'>Data block containing <a href="TagNames/CanonRaw.html#ImageInfo">image information, including rotation</a></td></tr>
  289. <tr align='center'><td>0x1812</td><td>-</td><td>0x3004</td><td>-</td><td>40</td><td align='left'>-</td></tr>
  290. <tr align='center'><td>0x1813</td><td>-</td><td>0x3002</td><td>FlashInfo</td><td>8</td>
  291. <td align='left'>Two 32-bit floats: The flash guide number and the flash threshold</td></tr>
  292. <tr align='center'><td>0x1814</td><td>-</td><td>0x3003</td><td>MeasuredEV</td><td>4</td>
  293. <td align='left'>32-bit float giving the measured EV</td></tr>
  294. <tr align='center'><td>0x1817</td><td>0x08</td><td>0x300a</td><td>FileNumber</td><td>4</td>
  295. <td align='left'>32-bit integer giving the number of this file. eg) 1181834</td></tr>
  296. <tr align='center'><td>0x1818</td><td>-</td><td>0x3002</td><td>ExposureInfo</td><td>12</td>
  297. <td align='left'>Three 32-bit floats: Exposure compensation, Tv, Av</td></tr>
  298. <tr align='center'><td>0x1819</td><td>-</td><td>0x300b</td><td>-</td><td>64</td><td align='left'>-</td></tr>
  299. <tr align='center'><td>0x1834</td><td>0x10</td><td>0x300b</td><td>CanonModelID</td><td>4</td>
  300. <td align='left'>Unsigned 32-bit integer giving unique model ID</td></tr>
  301. <tr align='center'><td>0x1835</td><td>-</td><td>0x300b</td><td>DecoderTable</td><td>16</td>
  302. <td align='left'><a href="TagNames/CanonRaw.html#DecoderTable">RAW decoder table information</a></td></tr>
  303. <tr align='center'><td>0x183b</td><td>0x15</td><td>0x300b</td><td>SerialNumberFormat</td><td>4</td>
  304. <td align='left'>32-bit integer (0x90000000=format 1, 0xa0000000=format 2)</td></tr>
  305. <tr><th class='lt' colspan=6>Mixed Data Records</th></tr>
  306. <tr align='center'><td>0x2005</td><td>-</td><td><i>root</i></td><td>RawData</td><td><i>varies</i></td>
  307. <td align='left'>The raw data itself (the bulk of the CRW file)</td></tr>
  308. <tr align='center'><td>0x2007</td><td>-</td><td><i>root</i></td><td>JpgFromRaw</td><td><i>varies</i></td>
  309. <td align='left'>The embedded JPEG image (2048x1360 pixels for the 300D with Canon firmware)</td></tr>
  310. <tr align='center'><td>0x2008</td><td>-</td><td><i>root</i></td><td>ThumbnailImage</td><td><i>varies</i></td>
  311. <td align='left'>Thumbnail image (JPEG, 160x120 pixels)</td></tr>
  312. <tr><th class='lt' colspan=6>SubDirectory Blocks</th></tr>
  313. <tr align='center'><td>0x2804</td><td>-</td><td>0x300a</td><td>ImageDescription</td><td><i>varies</i></td>
  314. <td align='left'>The image description subdirectory</td></tr>
  315. <tr align='center'><td>0x2807</td><td>-</td><td>0x300a</td><td>CameraObject</td><td><i>varies</i></td>
  316. <td align='left'>The camera object subdirectory</td></tr>
  317. <tr align='center'><td>0x3002</td><td>-</td><td>0x300a</td><td>ShootingRecord</td><td><i>varies</i></td>
  318. <td align='left'>The shooting record subdirectory</td></tr>
  319. <tr align='center'><td>0x3003</td><td>-</td><td>0x300a</td><td>MeasuredInfo</td><td><i>varies</i></td>
  320. <td align='left'>The measured information subdirectory</td></tr>
  321. <tr align='center'><td>0x3004</td><td>-</td><td>0x2807</td><td>CameraSpecification</td><td><i>varies</i></td>
  322. <td align='left'>The camera specification subdirectory</td></tr>
  323. <tr align='center'><td>0x300a</td><td>-</td><td><i>root</i></td><td>ImageProps</td><td><i>varies</i></td>
  324. <td align='left'>The main subdirectory containing all meta information</td></tr>
  325. <tr align='center'><td>0x300b</td><td>-</td><td>0x300a</td><td>ExifInformation</td><td><i>varies</i></td>
  326. <td align='left'>The subdirectory containing most of the JPEG/TIFF EXIF information</td></tr>
  327. </table></blockquote>
  328. <h3>Revisions</h3>
  329. <p>Sept. 20, 2010 - Added note about XMP support in the VRD data</p>
  330. <p>Feb. 12, 2009 - Moved a couple of entries in the TagID table that were in
  331. the wrong section</p>
  332. <p>Feb. 4, 2008 - Added a number of unknown TagID's, decode some tags in the
  333. WhiteSample and DecoderTable data blocks, and fix incorrect SubDir for
  334. SerialNumber tag</p>
  335. <p>Nov. 16, 2007 - Added a number of unknown blocks</p>
  336. <p>Sept. 12, 2007 - Change name of CanonPictureInfo record to CanonAFInfo</p>
  337. <p>Nov. 28, 2006 - Highlight the possibility of <b>OtherData</b> existing in the
  338. directory block</p>
  339. <hr>
  340. Please e-mail me if you find any errors or omissions in this document. My
  341. address is phil at owl.phy.queensu.ca - Thanks!
  342. <p class='lf'><i>Created Jan. 28, 2005</i>
  343. <br><i>Last revised Sept. 20, 2010</i></p>
  344. <p class='lf'><a href="index.html">&lt;-- Back to ExifTool home page</a></p>
  345. </body>
  346. </html>