| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
| 2 | "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> |
| 3 | <html> |
| 4 | <head> |
| 5 | <title>Problems with current Metadata Standards</title> |
| 6 | <link rel=stylesheet type='text/css' href='style.css' title='Style'> |
| 7 | <style type="text/css"> |
| 8 | <!-- |
| 9 | a.ref { text-decoration: none; font-size: x-small; |
| 10 | font-weight: normal; vertical-align: super; } |
| 11 | --> |
| 12 | </style> |
| 13 | </head> |
| 14 | <body> |
| 15 | <div class='index'> |
| 16 | <a href="#TIFF">TIFF 6.0</a> |
| 17 | <br><a href="#DNG">DNG 1.3</a> |
| 18 | <br><a href="#EXIF">EXIF 2.3</a> |
| 19 | <br><a href="#PhotoInfo">OffsetSchema</a> |
| 20 | <br><a href="#JPEG">JPEG</a> |
| 21 | <br><a href="#MPF">MPF</a> |
| 22 | <br><a href="#ID3">ID3</a> |
| 23 | <br><a href="#refs">References</a> |
| 24 | </div> |
| 25 | |
| 26 | <h1 class=up>Problems with current Metadata Standards</h1> |
| 27 | |
| 28 | <p>It seems that all metadata standards have their own unique problems. This |
| 29 | page documents some significant structural problems found in some current |
| 30 | metadata and file format specifications, and gives possible solutions to these |
| 31 | problems. <i>[Also see my <a href="commentary.html">Commentary on Meta |
| 32 | Information Formats</a>.]</i></p> |
| 33 | |
| 34 | <a name="TIFF"></a> |
| 35 | <h3>TIFF 6.0 <a class=ref href="#ref1">[1]</a></h3> |
| 36 | |
| 37 | <p>A significant problem of the 1992 TIFF 6.0 specification is that there is no |
| 38 | way to distinguish an IFD (image file directory) offset from a simple integer |
| 39 | value. As a result, new IFD's may not be created without risking corruption of |
| 40 | the files by unaware software. This is not only a problem for proprietary maker |
| 41 | notes which commonly use a TIFF IFD structure, but is also a problem for |
| 42 | extensibility of TIFF-based RAW image formats (as demonstrated by the DNG 1.3 |
| 43 | specification -- see below).</p> |
| 44 | |
| 45 | <p><b>A simple solution:</b></p> |
| 46 | |
| 47 | <p>Use a TIFF field type of 13 (IFD) instead of 4 (LONG) for IFD offsets. |
| 48 | This was first proposed in 1995 by Adobe in their PageMaker |
| 49 | 6.0 TIFF Technical Notes<a class=ref href="#ref2">[2]</a>, |
| 50 | but unfortunately it never found its way into the TIFF specification. Even so, |
| 51 | Olympus Optical Co. has shown some intelligence and is using this field type in |
| 52 | the maker notes of their recent digital cameras. |
| 53 | </p> |
| 54 | |
| 55 | <p><b>Another useful addition:</b> <i>(added 2009-09-27)</i></p> |
| 56 | |
| 57 | <p>A number of camera and cell phone manufacturers (Concord, Kodak, Motorola, |
| 58 | Nokia, Olympus, Pentax, Ricoh, Samsung and Sony) leave blank IFD entries in the |
| 59 | maker notes of images from some models. Presumably this simplifies the embedded |
| 60 | software by allowing the output file structure to be kept constant even when the |
| 61 | number of maker note IFD entries changes. It could be useful if this feature |
| 62 | was added explicitly to the official TIFF specification by defining a field type |
| 63 | of 0 as a "free IFD entry" to be ignored. (Note that this ability already |
| 64 | exists implicitly at a certain level in the specification, which states: |
| 65 | <i>"Readers should skip over fields containing an unexpected field |
| 66 | type"</i>.)</p> |
| 67 | |
| 68 | <a name="DNG"></a> |
| 69 | <h3>DNG 1.3 <a class=ref href="#ref3">[3]</a></h3> |
| 70 | |
| 71 | <p>With the DNG 1.3 specification of June 2009, Adobe added a new Camera Profile |
| 72 | IFD referenced by an offset using the standard (and unfortunate) TIFF LONG field |
| 73 | type. This means that the new Profile IFD will be lost if the file is rewritten |
| 74 | by any software which does not have explicit knowledge of the 1.3 specification. |
| 75 | But to make things worse, Adobe didn't even use a standard IFD format for the |
| 76 | data. Instead, the IFD begins with a TIFF-style header and uses relative instead |
| 77 | of absolute offsets. This would have been a good idea if the IFD was stored as |
| 78 | the value of an UNDEFINED tag rather than referenced from a LONG offset. (If |
| 79 | done this way, the new information would have been preserved if the file was |
| 80 | rewritten by unaware software.) But as implemented it just adds to the pain of |
| 81 | parsing the file by requiring even more specialized code to be written in |
| 82 | support of the DNG 1.3 format.</p> |
| 83 | |
| 84 | <p><b>A simple solution:</b></p> |
| 85 | |
| 86 | <p>Sack the Adobe developers who were responsible for this, and use field type |
| 87 | 13 (as recommended above for TIFF 6.0) and a standard TIFF IFD structure when |
| 88 | adding new IFD's in the future.</p> |
| 89 | |
| 90 | <a name="EXIF"></a> |
| 91 | <h3>EXIF 2.3 <a class=ref href="#ref4">[4]</a></h3> |
| 92 | |
| 93 | <p>The EXIF specification has been the standard for digital camera metadata for |
| 94 | many years, and while the digital camera technology has advanced significantly |
| 95 | in these years, the EXIF specification has not. There are a number of |
| 96 | significant problems with the EXIF specification which have never been |
| 97 | addressed.</p> |
| 98 | |
| 99 | <p>Some current problems with the EXIF specification are:</p> |
| 100 | |
| 101 | <ol> |
| 102 | <li>Maker note data structure has no restrictions and is easily invalidated when |
| 103 | editing EXIF.</li> |
| 104 | <li>No facility for storing the time zone for date/time values. <i>[finally |
| 105 | added to Exif 2.31 spec.]</i></li> |
| 106 | <li>Very limited support for alternate character sets (essentially only the |
| 107 | UserComment tag has this feature).</li> |
| 108 | <li>No alternate language support.</li> |
| 109 | <li>Byte ordering for "Unicode" text strings, and the meaning of "Unicode" |
| 110 | itself is not clearly specified.</li> |
| 111 | <li>Mandatory tags are unnecessary and painful to implement.</li> |
| 112 | <li>ApertureValue and MaxApertureValue are stored as unsigned RATIONAL, which |
| 113 | means that lenses with F numbers faster than 1.0 (with equivalent APEX values of |
| 114 | less than zero) can not be represented.</li> |
| 115 | <li>MaxApertureValue is defined as "The smallest F number of the lens". This |
| 116 | definition is unclear in the case of zoom lenses where the maximum aperture |
| 117 | varies across the zoom range. Some manufacturers (Canon, Nikon, Sony) store the |
| 118 | maximum aperture at the specific focal length, but others (Olympus, Pentax) |
| 119 | store the absolute maximum aperture of the lens.</li> |
| 120 | <li>EXIF is not extensible, and is missing definitions for storing some |
| 121 | information that could be very useful to camera owners (eg. camera pitch/roll |
| 122 | angles, sensor temperature, face detection, auto-focus points, image |
| 123 | stabilization, flash exposure compensation, etc). <i>[Some of these tags |
| 124 | were added in the Exif 2.31 specification.]</i></li> |
| 125 | <li>0xffffffff in the numerator or denominator of some rational-value tags is |
| 126 | used to indicate an unknown or infinite value. This is completely unnecessary |
| 127 | and not supported by many applications because it requires extra tag-specific |
| 128 | logic to be implemented.</li> |
| 129 | <li>The total size of EXIF metadata in JPEG images is limited to 65527 bytes |
| 130 | or less.</li> |
| 131 | </ol> |
| 132 | |
| 133 | <p><b>Simple solutions:</b></p> |
| 134 | |
| 135 | <ol> |
| 136 | <li>Specify that maker note data must be self-contained (ie. must not exceed the |
| 137 | bounds of the maker note value data), and must be relocatable (ie. must not use |
| 138 | absolute offsets). <i>[I would have suggested defining a new maker note tag |
| 139 | with field type 13 (IFD) which references a standard format IFD, but I am afraid |
| 140 | that no camera maker would ever jump on board with this suggestion now that they |
| 141 | have already been seduced by the dark side.]</i></li> |
| 142 | <li>Change the specification to allow an optional time zone of the format |
| 143 | "-05:00" to be appended to the date/time string values.</li> |
| 144 | <li>Change the specification to allow UTF-8 in ASCII-type values as recommended |
| 145 | by the MWG<a class=ref href="#ref5">[5]</a>.</li> |
| 146 | <li>No simple solution for this. XMP<a class=ref href="#ref6">[6]</a> |
| 147 | is the only reasonable alternative if alternate language support is |
| 148 | required.</li> |
| 149 | <li>Specify that the Unicode byte order must be the same as the EXIF byte |
| 150 | ordering. (This is the only reasonable choice, but for some reason both |
| 151 | Microsoft and Apple seem to write Unicode using the native processor byte |
| 152 | ordering. regardless of the EXIF byte order.) Also, it should be made clear |
| 153 | that by "Unicode" the EXIF specification actually means UCS-2, although updating |
| 154 | this to allow UTF-16 surrogate pairs may be a good idea.</li> |
| 155 | <li>Define reasonable fallback values for required tags which are missing.</li> |
| 156 | <li>Allow ApertureValue and MaxApertureValue to be stored as signed SRATIONAL.</li> |
| 157 | <li>Define whether MaxApertureValue is taken at the current focal length of |
| 158 | a zoom lens, or over the entire zoom range.</li> |
| 159 | <li>Expand the standard to include additional useful information available from |
| 160 | modern digital cameras.</li> |
| 161 | <li>Use a rational value of 1/0 to indicate infinity, and 0/0 to indicate an |
| 162 | unknown/undefined value.</li> |
| 163 | <li>Allow EXIF to span multiple JPEG segments. Multiple consecutive EXIF |
| 164 | segments are simply concatenated into a single data block when reading. |
| 165 | <i>[Apparently Adobe has been doing this for years<a class=ref href="#ref11">[11]</a>, |
| 166 | and this ability was added to ExifTool in version 10.97.]</i></li> |
| 167 | </ol> |
| 168 | |
| 169 | <a name="PhotoInfo"></a> |
| 170 | <h3>Microsoft "OffsetSchema" Tag <a class=ref href="#ref7">[7]</a></h3> |
| 171 | |
| 172 | <p>In February 2007 Microsoft proposed a new PhotoInfo tag called "OffsetSchema" |
| 173 | (hex. 0xEA1D, dec. 59933) in an attempt to patch a deficiency in the EXIF maker |
| 174 | note specification (see point 1 in EXIF 2.2 section above). This tag represents |
| 175 | the offset difference between the original maker note location in the EXIF and |
| 176 | the new location after editing, and is designed to allow the maker note tag |
| 177 | values to be accessed after the location of the maker notes is changed by |
| 178 | editing the EXIF. <i>[Bless their little hearts for trying to improve this |
| 179 | situation, but while the idea is good the implementation is flawed and |
| 180 | ultimately unworkable.]</i></p> |
| 181 | |
| 182 | <p>There are two main problems with the implementation, and the second is a show |
| 183 | stopper:</p> |
| 184 | |
| 185 | <blockquote>1. For this new tag to be available to a single-pass metadata reader, it |
| 186 | must come <i>before</i> the maker note data (hex. 0x927C, dec. 37500). But |
| 187 | since the EXIF/TIFF format specifies that tags must be stored in numerical |
| 188 | order, the maker note tag (hex. 0x927C) comes before the OffsetSchema tag |
| 189 | (hex. 0xEA1D).</blockquote> |
| 190 | |
| 191 | <blockquote>2. The OffsetSchema tag will be invalidated by any software that |
| 192 | rewrites the EXIF and moves the maker notes without properly updating the tag. |
| 193 | In an ideal world all application developers would release an updated version |
| 194 | of their software which treats the OffsetSchema properly, and all users would |
| 195 | update to this new version. But since this is the real world it just won't |
| 196 | happen, which makes the value of OffsetSchema unreliable. Too bad, because this |
| 197 | wouldn't have been a problem if Microsoft had specified that the new tag |
| 198 | represented the original offset of the maker notes instead of the difference |
| 199 | from the original position. With this change, the tag wouldn't need updating |
| 200 | when the EXIF is edited, and the information would be much more reliable. The |
| 201 | only problem here would be editing software that explicitly changes the maker |
| 202 | note offsets. However, software with this ability is rare, and it is more |
| 203 | reasonable to ask that the OffsetSchema tag simply be deleted by any software |
| 204 | that updates the maker note offsets. (Software must be fairly advanced in the |
| 205 | first place if it parses the proprietary maker note data structures and changes |
| 206 | these offsets.)</blockquote> |
| 207 | |
| 208 | <p><b>A simple solution:</b></p> |
| 209 | |
| 210 | <p>Create a new tag which comes before the maker notes (hex. 0x927B, dec. 37499 |
| 211 | would be good) and represents the original offset of the maker notes.</p> |
| 212 | |
| 213 | <a name="JPEG"></a> |
| 214 | <h3>JPEG File Interchange Format <a class=ref href="#ref8">[8]</a></h3> |
| 215 | |
| 216 | <p>The JPEG File Interchange Format version 1.02 was released in 1992. The |
| 217 | biggest structural problem with this standard is that metadata in these files in |
| 218 | is stored in segments which have a maximum size of 65533 bytes. This limit has |
| 219 | necessitated a number of creative solutions, each creating complications and |
| 220 | problems of their own. <i>[See my comments on the <a |
| 221 | href="writing.html#Preview">PreviewImage problem</a> for example.]</i></p> |
| 222 | |
| 223 | <p><b>A simple solution:</b></p> |
| 224 | |
| 225 | <p>Since the value of the segment size word includes the 2 bytes of the segment |
| 226 | size word itself, a value of 0 or 1 is not allowed by the current JPEG standard. |
| 227 | The standard could be enhanced so a value of 1 indicates an extended JPEG |
| 228 | segment where the 2-byte size word (with value 0x0001) is followed immediately |
| 229 | by a 4-byte integer giving the size of the extended JPEG segment. This would |
| 230 | allow segment sizes of up to 4294967291 bytes (assuming the size includes these |
| 231 | 4 bytes). Further, a value of 0 could be defined for an 8-byte integer if one |
| 232 | really wanted to support huge metadata segments. Either change to an existing |
| 233 | JPEG would break all current JPEG reader/writers, but the change is trivial and |
| 234 | could easily be implemented.</p> |
| 235 | |
| 236 | <p><b>An alternative solution:</b></p> |
| 237 | |
| 238 | <p>Define a new application marker segment which uses a 4-byte size word. This |
| 239 | technique is already used for the extended JPEG2000 codestream MCT, MCC and MIC |
| 240 | marker segments.</p> |
| 241 | |
| 242 | <p><b>Another solution:</b> <i>[implemented in ExifTool 10.97]</i></p> |
| 243 | |
| 244 | <p>We can work around this limitation for EXIF metadata by allowing it to span |
| 245 | multiple segments using the same technique as for Photoshop APP13 metadata.</p> |
| 246 | |
| 247 | <a name="MPF"></a> |
| 248 | <h3>Multi-Picture Format (MPF) <a class=ref href="#ref9">[9]</a></h3> |
| 249 | |
| 250 | <p>In February 2009 CIPA<a class=ref href="#ref10">[10]</a> released a |
| 251 | "Multi-Picture Format" standard for storing large images in JPEG files. This |
| 252 | format is yet another attempt to bypass the JPEG segment-size limit (see above) |
| 253 | to store large preview images. But again, there is a significant problem with |
| 254 | this standard: Pointers in the new APP2 MPF segment use offsets relative to the |
| 255 | start of the MPF header in this segment to reference image data after the JPEG |
| 256 | EOI. Unfortunately, these offsets are quickly broken if any data after the MPF |
| 257 | segment changes length. This problem could have been avoided if offsets had |
| 258 | been specified relative to the end of file, but it is too late for this now that |
| 259 | the specification is public. However, another problem is that information after |
| 260 | the JPEG EOI is often discarded by software when the file is edited.</p> |
| 261 | |
| 262 | <p><b>A possible work-around:</b></p> |
| 263 | |
| 264 | <p>Enforce the rule that the MPF APP2 segment must come after all other APP |
| 265 | segments. (It would have been smart if this was specified in the CIPA standard, |
| 266 | but sadly this wasn't the case.) If this is done, then metadata in the remaining |
| 267 | APP segments (EXIF, IPTC, XMP, etc) can safely be edited without breaking the |
| 268 | MPF offsets. I suggest that all metadata editors employ this strategy, |
| 269 | regardless of the segment order specified in the standard (which says that the |
| 270 | MPF APP2 segment must come immediately after the EXIF APP1 segment).</p> |
| 271 | |
| 272 | <p>Unfortunately this work-around has the same problems as the Microsoft |
| 273 | OffsetSchema tag because the MPF information may easily be invalidated by an |
| 274 | unaware editor, and it doesn't address the problem of losing data stored after |
| 275 | the JPEG EOI.</p> |
| 276 | |
| 277 | <p><b>A simple solution:</b></p> |
| 278 | |
| 279 | <p>Change the JPEG specification to allow larger segments (as mentioned above in |
| 280 | the JPEG section), and change the MPF specification to store all information |
| 281 | inside a JPEG segment.</p> |
| 282 | |
| 283 | <p><i>[2014-04-29: CIPA has changed the location of these standards documents, |
| 284 | so the URL's referenced here are now broken.]</i></p> |
| 285 | |
| 286 | <a name="ID3"></a> |
| 287 | <h3>ID3 <a class=ref href="#ref12">[12]</a></h3> |
| 288 | |
| 289 | <p>I should have commented about this specification back |
| 290 | in 2006 when I first attempted to add write support. I soon abandoned all hope |
| 291 | because the ID3 specification does not provide enough detail to implement unambiguously, |
| 292 | but it was so long ago I can't be more specific now about the pitfalls. <i>(added 2026-03-26)</i></p> |
| 293 | |
| 294 | <a name="refs"></a> |
| 295 | <h3>References</h3> |
| 296 | |
| 297 | <ol> |
| 298 | <li><a name="ref1" href="http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf">http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf</a></li> |
| 299 | <li><a name="ref2" href="http://partners.adobe.com/public/developer/en/tiff/TIFFPM6.pdf">http://partners.adobe.com/public/developer/en/tiff/TIFFPM6.pdf</a></li> |
| 300 | <li><a name="ref3" href="http://www.adobe.com/products/dng/pdfs/dng_spec_1_3_0_0.pdf">http://www.adobe.com/products/dng/pdfs/dng_spec_1_3_0_0.pdf</a></li> |
| 301 | <li><a name="ref4" href="http://www.cipa.jp/english/hyoujunka/kikaku/pdf/DC-008-2010_E.pdf">http://www.cipa.jp/english/hyoujunka/kikaku/pdf/DC-008-2010_E.pdf</a></li> |
| 302 | <li><a name="ref5" href="https://web.archive.org/web/20180822085951/http://metadataworkinggroup.com/pdf/mwg_guidance.pdf">https://web.archive.org/web/20180822085951/http://metadataworkinggroup.com/pdf/mwg_guidance.pdf</a></li> |
| 303 | <li><a name="ref6" href="http://www.adobe.com/devnet/xmp/">http://www.adobe.com/devnet/xmp/</a></li> |
| 304 | <li><a name="ref7" href="http://support.microsoft.com/kb/927527">http://support.microsoft.com/kb/927527</a></li> |
| 305 | <li><a name="ref8" href="http://www.jpeg.org/public/jfif.pdf">http://www.jpeg.org/public/jfif.pdf</a></li> |
| 306 | <li><a name="ref9" href="http://www.cipa.jp/english/hyoujunka/kikaku/pdf/DC-X007-KEY_E.pdf">http://www.cipa.jp/english/hyoujunka/kikaku/pdf/DC-X007-KEY_E.pdf</a></li> |
| 307 | <li><a name="ref10" href="http://www.cipa.jp/english/hyoujunka/kikaku/cipa_e_kikaku_list.html">http://www.cipa.jp/english/hyoujunka/kikaku/cipa_e_kikaku_list.html</a></li> |
| 308 | <li id="ref11">XMP Specification part 3 November 2014, p. 13</li> |
| 309 | <li><a name="ref12" href="https://id3.org/id3v2.3.0">https://id3.org/id3v2.3.0</a></li> |
| 310 | </ol> |
| 311 | <hr> |
| 312 | <i>Created Sep 17, 2009</i><br> |
| 313 | <i>Last revised Mar 26, 2026</i> |
| 314 | <p class='lf'><a href="index.html"><-- Back to ExifTool home page</a></p> |
| 315 | </body> |
| 316 | </html> |