Debian Codegraph @

html/idiosyncracies.html

raw symbols SCIP
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>Maker Note Idio(t)syncrasies</title>
6 <link rel=stylesheet type='text/css' href='style.css' title='Style'>
7 </head>
8 <body>
9 <h1 class='up'>Maker Note Idio(t)syncrasies</h1>
10
11 <p>It really is surprising how stupid some (...many, ...most?) manufacturers
12 seem to be when it comes to writing what should be a fairly simple file
13 format.</p>
14
15 <p>One positive thing is that most manufacturers seem to have standardized on an
16 EXIF-like IFD (Image File Directory) structure for their maker notes. But many
17 problems arise because of a fundamental design flaw in the EXIF/TIFF format.
18 Values longer than 4 bytes are stored at a location referenced by an offset from
19 an absolute position in the file (where offset 0 is the start of the EXIF/TIFF
20 information).</p>
21
22 <p>The difficulty is that these offsets must be recalculated when a file is
23 rewritten, but in general this is not possible (particularly for the maker
24 notes) because the format of all information is not known. Some manufacturers
25 have attempted to avoid this problem using offsets which are relative to the
26 start of the maker note IFD instead of the usual start of EXIF. This is a good
27 idea if implemented properly, but this is not done consistently. (And some
28 manufacturers are not even consistent about how the offsets are calculated from
29 one camera model to the next!)</p>
30
31 <blockquote><font size='-1'><b>Technical aside:</b>
32 <br>If EXIF were designed properly, all offsets would
33 be relative to 4 bytes after the end of the IFD, which is the normal position
34 for values to be stored, and all value data for the IFD would be stored in a
35 block at this location. If this was done, an entire IFD could be relocated
36 easily without causing problems.</font></blockquote>
37
38 <p>Below is a list of idiosyncrasies in files written by the digital cameras or
39 software from various manufacturers. Many of these quirks relate to the offset
40 problem mentioned above.</p>
41
42 <hr>
43
44 <p><a name="Canon"><b>Canon:</b></a> The 350D (firmware 1.0.1) gets the size of the thumbnail image
45 wrong and reports it to be 10 bytes too long. This can cause the reported
46 thumbnail image data to run off the end of the APP1 segment. A bug in version
47 1.0.4 of the 40D firmware causes it to write a maker note entry count that is
48 one greater than it should be.</p>
49
50 <p><a name="Casio"><b>Casio:</b></a> The preview image is referenced by two different offsets (the
51 PreviewImage tag plus a PreviewImageStart/PreviewImageLength pair). Also, the
52 offset for the PrintIM information is relative to the start of the IFD entry
53 even though other offsets aren't.</p>
54
55 <p><a name="Concord"><b>Concord:</b></a> Some models write PrintIM information with an entry-based
56 offset like Casio.</p>
57
58 <p><a name="GE"><b>General Electric:</b></a> A number of GE cameras store zero offsets for some
59 maker note tags (possibly to indicate that the tags do not exist), and other
60 offsets are 12 bytes too high for some models (like the A1230, E1035 and G2).
61 </p>
62
63 <p><a name="HP"><b>Hewlett-Packard:</b></a> The PhotoSmart 720 (one of the few HP models to use
64 EXIF-format maker notes) uses a format code of 5 (rational64u) for tag 0x0204,
65 but stores a rational32u value. Other models show about as much standardization
66 as the Kodak point-and-shoot lineup. Also, some models (C945, M22, M23, R507,
67 R607, R707, R717, R725, R727, R817, R818, R827, R927 and R960) write the EXIF
68 ComponentsConfiguration incorrectly as ASCII characters (like the Leica M8 and
69 M9).</p>
70
71 <p><a name="Kodak"><b>Kodak:</b></a> Professional DCS Photo Desk software writes a cyclical EXIF
72 directory such that the InteropIFD pointer points back to IFD0.
73 Point-and-shoot models show little standardization in maker note format.
74 Some models with IFD-format maker notes store incorrect count values for
75 a number of tags (this is particularly nasty), and may contain blank IFD
76 entries which are filled with 0xff's (not zeros like other makes).</p>
77
78 <p><a name="Konica"><b>Konica:</b></a> The KD-300Z writes all maker notes offsets relative to the
79 start of the individual IFD entry.</p>
80
81 <p><a name="Kyocera"><b>Kyocera:</b></a> A number of models write all maker notes offsets relative
82 to the start of the individual IFD entry.</p>
83
84 <p><a name="Leica"><b>Leica:</b></a> Leica is hands-down the most inconsistent
85 company when it comes to writing makernote information. Various models use
86 different signatures and different bases for the offsets for the maker notes. As
87 well as this, they do a number of really peculiar things with in their
88 metadata.</p>
89
90 <p>The M8 and M9 write the EXIF ComponentsConfiguration value in
91 ASCII instead of binary. The M8 writes EXIF ExposureCompensation and
92 ShutterSpeedValue incorrectly as a unsigned rationals when they should be
93 signed. This leads to crazy values like "+65536" for small negative exposure
94 compensations, and "0 s" for long exposure times. (NOTE: These are all EXIF
95 idiosyncrasies since the values are in the standard EXIF, not the maker
96 notes.) In DNG images, the M8 uses maker note offsets relative to the
97 start of the maker notes in JPEG images (very reasonable), but relative to
98 the end of the maker note header in DNG images. I think this was a mistake
99 because this is changed in M9 DNG images to be the same as JPEG images.</p>
100
101 <p>2010-02-20: The Leica S2 maker note format is the MOST idiotic I have seen, and has the
102 following peculiarities:</p>
103
104 <ul>
105 <li>It is stored as a trailer after the JPEG EOI (but referenced from a pointer
106 inside the APP1 EXIF segment).</li>
107 <li>Most of the offsets in this MakerNote IFD are relative to the start of the
108 file instead of the EXIF TIFF header (which is particularly cruel because they
109 are broken if other software simply adds a leading JFIF segment, but there is no
110 simple way to detect that this has happened. Normally this could be detected by
111 analyzing the pointers, but this doesn't work here because all of the unused
112 data in the Leica maker notes make normal pointer assumptions impossible).</li>
113 <li>The PreviewImage offset is relative to the start of the MakerNote data
114 (which is MUCH more reasonable, but using two different offset bases in the same
115 directory is yet another level of idiocy).</li>
116 <li>In DNG images the maker notes use an absolute base offset. Yet again
117 different from the M8 and M9. Consistency isn't Leica's strong suit.</li>
118 </ul>
119
120 <p>2013-07-27: Strike that. The most idiotic award now goes to the Leica M (Typ 240), which
121 adds these quirks (firmware 1.1.0.2):</p>
122
123 <ul>
124 <li>Tag 0x0301 has the same offset as the PreviewImage in the maker note IFD,
125 although it looks like the data for this tag probably comes after the
126 PreviewImage.</li>
127 <li>Tag 0x0302 has an invalid offset (0xffffffff).</li>
128 </ul>
129
130 <p>2015-09-03: OK, I give up on Leica. The new Leica S (Typ 007) attains a new level of
131 stupidity by storing the preview image in the JPG file using a completely
132 nonsensical technique (in IFD2 of the EXIF segment, with the data being stored
133 outside the EXIF segment after the JPEG EOI), as well as various other brainless
134 blunders. [@Leica: Try reading the MPF specification.]</p>
135
136 <p><a name="Minolta"><b>Minolta:</b></a> An obvious bug in the firmware of the Z2 writes an incorrect
137 offset for the 'MinoltaCameraSettings2' information -- it writes the offset of
138 the offset itself instead of the offset of the value (hahaha!). Other
139 offsets are correct.</p>
140
141 <p><a name="Nikon"><b>Nikon:</b></a> D2H NEF files have huge blocks with all zero data (3.7 MB in
142 my test file!).</p>
143
144 <p><a name="Olympus"><b>Olympus:</b></a> The E-1 and E-300 have subdirectories in the maker notes, but
145 not only does the data size of these subdirectories exclude the subdirectory
146 value data, but also it is 2 bytes too small for the directory information
147 itself (doh! -- they forgot to include the entry count). Similarly, the stored
148 size of the maker note data block is too small for many models, which results
149 in a loss of data if the maker notes are copied as a block when an image is
150 rewritten.</p>
151
152 <p><a name="Pentax"><b>Pentax:</b></a> The Optio 330 uses an offset for the PrintIM information which
153 is relative to the start of the IFD entry (hmmm, like some Casio models...).
154 Also, preview image offsets in the maker notes are given relative to the EXIF
155 base rather than the maker note base (like all other maker notes offsets).</p>
156
157 <p>The Optio 550, 555, 33WR and 43WR all specify a PrintIM directory at a the
158 same offset of 0x29a with length 40 bytes, but the only PrintIM information in
159 the file is nowhere near that offset and is 128 bytes long. Also for these
160 models, tag 0x002e has a constant value of 0x6a6 even though its position
161 changes. Finally, all of these models plus the Optio WP waste many kilobytes of
162 space in each image with large unused data blocks in the EXIF information.</p>
163
164 <p>The Optio 330RS and 430RS double reference the preview image information.</p>
165
166 <p>Note that the worst problems are with the Optio 230, 330, and 430, which
167 carry the Asahi brand name.</p>
168
169 <p><a name="Photoshop"><b>Photoshop and Nikon Capture:</b></a> Both of these packages write TIFF IPTC
170 information as 'int32u' (or 'LONG'). This is wrong
171 (<a href="http://www.awaresystems.be/imaging/tiff/tifftags/iptc.html">see
172 reference</a>). Nikon Capture goes one step further and simply ignores IPTC
173 that is written correctly as 'undef' or 'int8u'. (So for compatibility,
174 ExifTool also writes this incorrectly as 'int32u'.) Photoshop completely
175 deletes the maker notes when an image is edited.</p>
176
177 <p><a name="Ricoh"><b>Ricoh:</b></a> There is an IFD subdirectory in the Ricoh maker notes of both the
178 Caplio RR30 and RR1. The RR30 uses standard EXIF offsets (relative to the start
179 of the EXIF data), but for the RR1 the offsets are relative to the start of the
180 subdirectory. The G700 uses MPF offsets relative to the start of the file,
181 instead of the start of the MPF segment as per the MPF spec. The HX15 uses
182 a standard EXIF maker note structure, but there are 2 extra padding bytes
183 between the IFD entry count and the 1st IFD entry. The HZ15 and Pentax XG-1 (by
184 Ricoh) both have an extra 2 bytes after the IFD entry counts. All value offsets
185 are erroneously 0 for the HZ15, and there are other problems with the offsets
186 stored by the XG-1.</p>
187
188 <p><a name="Rollei"><b>Rollei:</b></a> The DK4010 writes all maker notes offsets relative to the
189 start of the individual IFD entry.</p>
190
191 <p><a name="Sanyo"><b>Sanyo:</b></a> The offsets written in the maker notes of the J1, J2, J3, S1,
192 S3 and S4 have very little to do with reality. Apparently the Sanyo
193 programmers have no understanding of the concept of an IFD offset.</p>
194
195 <p><a name="Skanhex"><b>Skanhex:</b></a> With some Skanhex models (SX-210Z3, SX-330Z3, SX3300,
196 SX410Z3), the 264-byte makernotes block contains no useful information, and
197 overlaps values from the ExifIFD. For these models there is also a large block
198 (typically 1195 bytes) of unreferenced information in the EXIF data immediately
199 following the IteropIFD. This block begins with the character sequence
200 "SKANH\0", and contains exactly the same information in all 20 of my sample
201 images that contain this block (except for a variable amount of padding at the
202 end with 0xff bytes). These quirks also affect some Gateway, Jenoptik, Medion,
203 Samsung and Yakumo models built by Skanhex.</p>
204
205 <p><a name="Toshiba"><b>Toshiba:</b></a> The PDR-3310 writes all maker notes offsets relative to the
206 start of the individual IFD entry. (very similar to Konica KD-300Z)</p>
207
208 <hr><a name="raw"></a>
209 <h2>RAW file Idiosyncrasies</h2>
210
211 <p><a name="MinoltaMRW"><b>Minolta MRW:</b></a> The A200 stores the thumbnail image offset in IFD0
212 relative to the start of file, while all other offsets are relative to the start
213 of the TIFF header, which is 48 bytes into the file. Also, the A200 stores the
214 StripOffsets and the StripByteCounts values in the wrong byte order.</p>
215
216 <p><a name="SonyARW"><b>Sony ARW:</b></a> The maker notes of ARW images are not self-contained, so
217 some information is lost when the images are rewritten by other software
218 (including the Adobe DNG converter). The A100 with firmware 1.00 sets the high
219 word of the thumbnail image offset to zero, but it should sometimes be 0x0001.
220 (This problem is fixed for firmware 1.01.) Also with the A100, the
221 JpgFromRawLength stored in IFD0 may be wrong (although this value is also stored
222 in the MakerNotes and is correct here). As well, much information in these
223 images is encrypted, which complicates things somewhat. Even the Sony IDC
224 utility can't properly rewrite ARW files -- it corrupts the embedded MRW record
225 when used to edit ARW images. Even funnier: IDC v3.0 will crash when loading
226 some original A100 firmware 1.00 images, but no longer crashes if the images are
227 first edited with ExifTool (probably because ExifTool fixes the above mentioned
228 problems when it rewrites the image).</p>
229
230 <p><a name="HasselbladFFF"><b>Hasselblad FFF:</b></a> Many Hasselblad camera models
231 write TIFF-format FFF raw files which contain a double-referenced
232 reduced-resolution image that is referenced from both IFD0 and IFD1.Immediately
233 following the data for this image is an unreferenced data block that the
234 Hasselblad Phocus software uses for an updated preview to reflect the raw
235 development settings. This unreferenced data is lost if the FFF file is edited
236 using a TIFF-compatible algorithm, which results in the Phocus no longer
237 updating the preview when the settings are changed.</p>
238
239 <p><a name="LeicaDNG"><b>Leica DNG:</b></a> The makernote offsets for the M8 are relative to the start
240 of the makernote IFD in JPEG images, but relative to the start of the makernote
241 header (8 bytes earlier) in DNG images. <i>[2009-09-09: This is fixed for the
242 M9 which has offsets relative to the start of the makernote header for both JPEG
243 and DNG.]</i></p>
244
245 <p><a name="NikonNEF"><b>Nikon NEF:</b></a> Aside from the encryption that Nikon uses to try to hide
246 some information in their maker notes, the NEF files in general seem fairly well
247 behaved. Even so, the Nikon Transfer utility (version 1.3) still manages to
248 corrupt some information in the 0th SubIFD when it is used to process NEF
249 images. (Beware that other Nikon utilities may have this same problem if they
250 use the same NEF writing routines.) But luckly the lost information isn't very
251 important. (Only a few tags from the embedded full-sized preview image are
252 lost: XResolution, YResolution and YCbCrPositioning.) Also, Nikon Transfer and
253 Nikon Capture both write an incorrect size for the maker notes, which could
254 cause loss of MakerNote information if the file is edited by other software (but
255 this isn't a problem with ExifTool, which will fix this type of problem
256 automatically when writing).</p>
257
258 <p><a name="NikonNRW"><b>Nikon NRW:</b></a> Nikon should have just called this NEF with a different
259 version number -- there should be no need to pollute the universe with zillions
260 of unnecessary file extensions. Oh right, they weren't smart enough to include
261 a file identifier containing a version number in their NEF images -- Doh! In
262 these images, CFAPattern2 is written incorrectly with UNDEFINED instead of BYTE
263 format.</p>
264
265 <p><a name="PhaseOneIIQ"><b>Phase One IIQ:</b></a> Many values are referenced from more than one location
266 in the TIFF structure of these images. For instance, the IFD0 strip data
267 actually exists within the MakerNotes data block. This is a poor design, and
268 leads to duplicated information when the image is rewritten.</p>
269
270 <p><a name="RicohDNG"><b>Ricoh DNG:</b></a> The GR Digital IV (firmware 1.14) stores an incorrect
271 length for the JPEG preview in SubIFD1.</p>
272
273 <p><a name="SamsungSRW"><b>Samsung SRW:</b></a> Yet another TIFF-based raw image with no proper file
274 identifier. In these images the thumbnail is stored inside a SubIFD of IFD1
275 instead of directly in IFD1 (dumb, dumb...). Also, the NX200 (firmware
276 NX200_011181) uses a base offset for the X/YResolution values that is different
277 from the PreviewImageStart pointer, both in the MakerNotes PreviewIFD. (Note
278 that the NX100 uses the same base for both, so this is certainly a firmware bug
279 for the NX200. <i>[2012-06-21: This problem now also affects the EX1, NX20 and
280 WB2000] [2013-07-25: Add the NX2000 to this list]</i>)</p>
281
282 <p><a name="GN120">2018-04-30: The Samsung EK-GN120</a> has many
283 problems in the makernote offsets. Most of the offsets are based on the start of
284 the maker notes, but the PreviewIFD is offset is wrong by 36 bytes, and some
285 offsets in the PreviewIFD are based on the start of the maker notes while others
286 are absolute. What a mess!</p>
287
288 <hr>
289 <i>Created Mar 25, 2005</i>
290 <br><i>Last revised Feb 24, 2020</i>
291 <p class='lf'><a href="index.html">&lt;-- Back to ExifTool home page</a></p>
292 </body>
293 </html>