1 /*
2  * Copyright (c) 2001-2004, Eric M. Johnston <emj@postal.net>
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  * 3. All advertising materials mentioning features or use of this software
14  *    must display the following acknowledgement:
15  *      This product includes software developed by Eric M. Johnston.
16  * 4. Neither the name of the author nor the names of any co-contributors
17  *    may be used to endorse or promote products derived from this software
18  *    without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
21  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
24  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30  * SUCH DAMAGE.
31  *
32  * $Id: tagdefs.c,v 1.24 2004/12/28 07:13:01 ejohnst Exp $
33  */
34 
35 /*
36  * Exif tag definitions.
37  *
38  * Developed using the TIFF 6.0 specification:
39  * (http://partners.adobe.com/asn/developer/pdfs/tn/TIFF6.pdf)
40  * and the EXIF 2.21 standard: (http://tsc.jeita.or.jp/avs/data/cp3451_1.pdf).
41  *
42  */
43 
44 #include <string.h>
45 
46 #include "exif.h"
47 #include "exifint.h"
48 
49 
50 /* TIFF 6.0 field types. */
51 
52 struct fieldtype ftypes[] = {
53 	{ TIFF_BYTE,	"byte",		1 },
54 	{ TIFF_ASCII,	"ascii",	1 },
55 	{ TIFF_SHORT,	"short",	2 },
56 	{ TIFF_LONG,	"long",		4 },
57 	{ TIFF_RTNL,	"rational",	8 },
58 	{ TIFF_SBYTE,	"sbyte",	1 },	/* not in Exif 2.2 */
59 	{ TIFF_UNDEF,	"undefined",	1 },
60 	{ TIFF_SSHORT,	"sshort",	2 },	/* not in Exif 2.2 */
61 	{ TIFF_SLONG,	"slong",	4 },
62 	{ TIFF_SRTNL,	"srational",	8 },
63 	{ TIFF_FLOAT,	"float",	4 },	/* not in Exif 2.2 */
64 	{ TIFF_DBL,	"double",	8 },	/* not in Exif 2.2 */
65 	{ TIFF_UNKN,	"unknown",	0 },
66 };
67 
68 
69 /*
70  * User comment types.  All should be 8 bytes.
71  */
72 
73 struct descrip ucomment[] = {
74 	{ TIFF_ASCII, "ASCII\0\0\0" },
75 	{ TIFF_UNDEF, "JIS\0\0\0\0\0" },
76 	{ TIFF_UNDEF, "UNICODE\0" },
77 	{ TIFF_UNDEF, "\0\0\0\0\0\0\0\0" },
78 	{ TIFF_UNDEF, NULL },
79 };
80 
81 
82 /*
83  * Various tag value lookup tables.  All are terminated by the value -1.
84  */
85 
86 
87 /* Compression schemes. */
88 
89 struct descrip compresss[] = {
90 	{ 1,	"Uncompressed" },
91 	{ 6,	"JPEG Compression (Thumbnail)" },
92 	{ -1,	"Unknown" },
93 };
94 
95 
96 /* Pixel compositions. */
97 
98 struct descrip pixelcomps[] = {
99 	{ 2,	"RGB" },
100 	{ 6,	"YCbCr" },
101 	{ -1,	"Unknown" },
102 };
103 
104 
105 /* Image orientation in terms of rows and columns. */
106 
107 struct descrip orients[] = {
108 	{ 1,	"Top, Left-Hand" },
109 	{ 2,	"Top, Right-Hand" },
110 	{ 3,	"Bottom, Right-Hand" },
111 	{ 4,	"Bottom, Left-Hand" },
112 	{ 5,	"Left-Hand, Top" },
113 	{ 6,	"Right-Hand, Top" },
114 	{ 7,	"Right-Hand, Bottom" },
115 	{ 8,	"Left-Hand, Bottom" },
116 	{ -1,	"Unknown" },
117 };
118 
119 
120 /* Planar configurations. */
121 
122 struct descrip planarconfigs[] = {
123 	{ 1,	"Chunky Format" },
124 	{ 2, 	"Planar Format" },
125 	{ -1,	"Unknown" },
126 };
127 
128 
129 /* Resolution units. */
130 
131 struct descrip resunits[] = {
132 	{ 2,	"i" },
133 	{ 3,	"cm" },
134 	{ -1,	"" },
135 };
136 
137 
138 /*
139  * Chrominance components sampling ratio.
140  * Note: This only refers to the second short; first is assumed to be 2.
141  */
142 
143 struct descrip chromratios[] = {
144 	{ 1,	"YCbCr4:2:2" },
145 	{ 2,	"YCbCr4:2:0" },
146 	{ -1,	"Unknown" },
147 };
148 
149 
150 /* Chrominance components positioning. */
151 
152 struct descrip chrompos[] = {
153 	{ 1,	"Centered" },
154 	{ 2,	"Co-Sited" },
155 	{ -1,	"Unknown" },
156 };
157 
158 
159 /* Exposure programs. */
160 
161 struct descrip expprogs[] = {
162 	{ 0,	"Not Defined" },
163 	{ 1,	"Manual" },
164 	{ 2,	"Normal Program" },
165 	{ 3,	"Aperture Priority" },
166 	{ 4,	"Shutter Priority" },
167 	{ 5,	"Creative" },
168 	{ 6,	"Action" },
169 	{ 7,	"Portrait Mode" },
170 	{ 8,	"Landscape Mode" },
171 	{ -1,	"Unknown" },
172 };
173 
174 
175 /* Component configuration. */
176 
177 struct descrip compconfig[] = {
178 	{ 0,	"Does Not Exist" },
179 	{ 1,	"Y" },
180 	{ 2,	"Cb" },
181 	{ 3,	"Cr" },
182 	{ 4,	"R" },
183 	{ 5,	"G" },
184 	{ 6,	"B" },
185 	{ -1,	"Unknown" },
186 };
187 
188 
189 /* Metering modes. */
190 
191 struct descrip metermodes[] = {
192 	{ 0,	"Unknown" },
193 	{ 1,	"Average" },
194 	{ 2,	"Center Weighted Average" },
195 	{ 3,	"Spot" },
196 	{ 4,	"Multi Spot" },
197 	{ 5,	"Pattern" },
198 	{ 6,	"Partial" },
199 	{ 255,	"Other" },
200 	{ -1,	"Unknown" },
201 };
202 
203 
204 /* Light sources. */
205 
206 struct descrip lightsrcs[] = {
207 	{ 0,	"Unknown" },
208 	{ 1,	"Daylight" },
209 	{ 2,	"Fluorescent" },
210 	{ 3,	"Tungsten" },
211 	{ 4,	"Flash" },
212 	{ 9,	"Fine Weather" },
213 	{ 10,	"Cloudy Weather" },
214 	{ 11,	"Shade" },
215 	{ 12,	"Daylight Fluorescent" },
216 	{ 13,	"Day White Fluorescent" },
217 	{ 14,	"Cool White Fluorescent" },
218 	{ 15,	"White Fluorescent" },
219 	{ 17,	"Standard Light A" },
220 	{ 18,	"Standard Light B" },
221 	{ 19,	"Standard Light C" },
222 	{ 20,	"D55" },
223 	{ 21,	"D65" },
224 	{ 22,	"D75" },
225 	{ 23,	"D50" },
226 	{ 24,	"ISO Studio Tungsten" },
227 	{ 255,	"Other" },
228 	{ -1,	"Unknown" },
229 };
230 
231 
232 /*
233  * Flash modes.
234  *
235  * The value is split into 5 sub-values:
236  *   Flash fired, bit 0;
237  *   Flash return, bits 1 & 2;
238  *   Flash mode, bits 3 & 4;
239  *   Flash function, bit 5; and
240  *   Red-eye mode, bit 6.
241  * Bit 7 is unused in the 2.21 spec.
242  *
243  * We'll just process each sub-value individually and concatenate them.
244  */
245 
246 struct descrip flash_fire[] = {
247 	{ 0x00,	"No Flash" },
248 	{ 0x01,	"Flash" },
249 	{ -1,	"Unknown" },
250 };
251 
252 struct descrip flash_return[] = {
253 	{ 0x04, "Return Not Detected" },
254 	{ 0x06,	"Return Detected" },
255 	{ -1,	"Unknown" },
256 };
257 
258 struct descrip flash_mode[] = {
259 	{ 0x08, "Compulsory" },
260 	{ 0x10,	"Compulsory" },
261 	{ 0x18,	"Auto" },
262 	{ -1,	"Unknown" },
263 };
264 
265 struct descrip flash_func[] = {
266 	{ 0x20,	"No Flash Function" },
267 	{ -1,	"Unknown" },
268 };
269 
270 struct descrip flash_redeye[] = {
271 	{ 0x40,	"Red-Eye Reduce" },
272 	{ -1,	"Unknown" },
273 };
274 
275 
276 /* Color spaces. */
277 
278 struct descrip colorspcs[] = {
279 	{ 1,	"sRGB" },
280 	{0xffff,"Uncalibrated" },
281 	{ -1,	"Unknown" },
282 };
283 
284 
285 /* Image sensor types. */
286 
287 struct descrip imgsensors[] = {
288 	{ 1,	"Not Defined" },
289 	{ 2,	"One-Chip Color Area" },
290 	{ 3,	"Two-Chip Color Area" },
291 	{ 4,	"Three-Chip Color Area" },
292 	{ 5,	"Color Sequential Area" },
293 	{ 7,	"Trilinear" },
294 	{ 8,	"Color Sequential Linear" },
295 	{ -1,	"Unknown" },
296 };
297 
298 
299 /* File sources */
300 
301 struct descrip filesrcs[] = {
302 	{ 0,	"Other" },
303 	{ 1,	"Scanner (Transparent)" },
304 	{ 2,	"Scanner (Reflex)" },
305 	{ 3,	"Digital Still Camera" },
306 	{ -1,	"Unknown" },
307 };
308 
309 
310 /* Scene types. */
311 
312 struct descrip scenetypes[] = {
313 	{ 1,	"Directly Photographed" },
314 	{ -1,	"Unknown" },
315 };
316 
317 
318 /* Custom rendering. */
319 
320 struct descrip customrend[] = {
321 	{ 0,	"Normal" },
322 	{ 1,	"Custom" },
323 	{ -1,	"Unknown" },
324 };
325 
326 
327 /* Exposure mode. */
328 
329 struct descrip expmode[] = {
330 	{ 0,	"Auto" },
331 	{ 1,	"Manual" },
332 	{ 2,	"Auto Bracket" },
333 	{ -1,	"Unknown" },
334 };
335 
336 
337 /* White balance. */
338 
339 struct descrip whitebal[] = {
340 	{ 0,	"Auto" },
341 	{ 1,	"Manual" },
342 	{ -1,	"Unknown" },
343 };
344 
345 
346 /* Scene capture type. */
347 
348 struct descrip scenecaptypes[] = {
349 	{ 0,	"Standard" },
350 	{ 1,	"Landscape" },
351 	{ 2,	"Portrait" },
352 	{ 3,	"Night Scene" },
353 	{ -1,	"Unknown" },
354 };
355 
356 
357 /* Gain control. */
358 
359 struct descrip gainctrl[] = {
360 	{ 0,	"None" },
361 	{ 1,	"Low Gain Up" },
362 	{ 2,	"High Gain Up" },
363 	{ 3,	"Low Gain Down" },
364 	{ 4,	"High Gain Down" },
365 	{ -1,	"Unknown" },
366 };
367 
368 
369 /* Contrast & sharpness. */
370 
371 struct descrip processrange[] = {
372 	{ 0,	"Normal" },
373 	{ 1,	"Soft" },
374 	{ 2,	"Hard" },
375 	{ -1,	"Unknown" },
376 };
377 
378 
379 /* Saturation. */
380 
381 struct descrip saturate[] = {
382 	{ 0,	"Normal" },
383 	{ 1,	"Low" },
384 	{ 2,	"High" },
385 	{ -1,	"Unknown" },
386 };
387 
388 
389 /* Subject distance range. */
390 
391 struct descrip subjdist[] = {
392 	{ 1,	"Macro" },
393 	{ 2,	"Close View" },
394 	{ 3,	"Distant View" },
395 	{ -1,	"Unknown" },
396 };
397 
398 
399 /* Exif 2.2 tags. */
400 
401 struct exiftag tags[] = {
402 	{ 0x0100, TIFF_UNKN,  1,  ED_IMG, 		/* columns */
403 	    "ImageWidth", "Image Width", NULL },
404 	{ 0x0101, TIFF_UNKN,  1,  ED_IMG, 		/* rows */
405 	    "ImageLength", "Image Height", NULL },
406 	{ 0x0102, TIFF_SHORT, 3,  ED_IMG, 		/* bits */
407 	    "BitsPerSample", "Number of Bits Per Component", NULL },
408 	{ 0x0103, TIFF_SHORT, 1,  ED_IMG,
409 	    "Compression", "Compression Scheme", compresss },
410 	{ 0x0106, TIFF_SHORT, 1,  ED_IMG,
411 	    "PhotometricInterpretation", "Pixel Composition", pixelcomps },
412 	{ 0x010a, TIFF_UNKN,  0,  ED_UNK,
413 	    "FillOrder", NULL, NULL },
414 	{ 0x010d, TIFF_UNKN,  0,  ED_UNK,
415 	    "DocumentName", NULL, NULL },
416 	{ 0x010e, TIFF_ASCII, 0,  ED_UNK,
417 	    "ImageDescription", "Title", NULL },
418 	{ 0x010f, TIFF_ASCII, 0,  ED_CAM,
419 	    "Make", "Equipment Make", NULL },
420 	{ 0x0110, TIFF_ASCII, 0,  ED_CAM,
421 	    "Model", "Camera Model", NULL },
422 	{ 0x0111, TIFF_UNKN,  0,  ED_VRB,		/* bytes */
423 	    "StripOffsets", "Image Data Location", NULL },
424 	{ 0x0112, TIFF_SHORT, 1,  ED_IMG,
425 	    "Orientation", "Image Orientation", orients },
426 	{ 0x0115, TIFF_SHORT, 1,  ED_VRB,
427 	    "SamplesPerPixel", "Number of Components", NULL },
428 	{ 0x0116, TIFF_UNKN,  1,  ED_VRB,		/* rows */
429 	    "RowsPerStrip", "Number of Rows Per Strip", NULL },
430 	{ 0x0117, TIFF_UNKN,  0,  ED_VRB,		/* bytes */
431 	    "StripByteCounts", "Bytes per Compressed Strip", NULL },
432 	{ 0x011a, TIFF_RTNL,  1,  ED_IMG,		/* dp[i|cm] */
433 	    "XResolution", "Horizontal Resolution", NULL },
434 	{ 0x011b, TIFF_RTNL,  1,  ED_IMG,		/* dp[i|cm] */
435 	    "YResolution", "Vertical Resolution", NULL },
436 	{ 0x011c, TIFF_SHORT, 1,  ED_IMG,
437 	    "PlanarConfiguration", "Image Data Arrangement", planarconfigs },
438 	{ 0x0128, TIFF_SHORT, 1,  ED_VRB,
439 	    "ResolutionUnit", "Resolution Unit", resunits },
440 	{ 0x012d, TIFF_SHORT, 0,  ED_VRB,
441 	    "TransferFunction", "Transfer Function", NULL },
442 	{ 0x0131, TIFF_ASCII, 0,  ED_CAM,
443 	    "Software", "Camera Software", NULL },
444 	{ 0x0132, TIFF_ASCII, 20, ED_IMG,
445 	    "DateTime", "Image Created", NULL },
446 	{ 0x013b, TIFF_ASCII, 0,  ED_CAM,
447 	    "Artist", "Photographer", NULL },
448 	{ 0x013e, TIFF_RTNL,  2,  ED_IMG,
449 	    "WhitePoint", "White Point Chromaticity", NULL },
450 	{ 0x013f, TIFF_RTNL,  6,  ED_VRB,
451 	    "PrimaryChromaticities", "Chromaticities of Primary Colors", NULL },
452 	{ 0x0156, TIFF_UNKN,  0,  ED_UNK,
453 	    "TransferRange", NULL, NULL },
454 	{ 0x0200, TIFF_UNKN,  0,  ED_UNK,
455 	    "JPEGProc", NULL, NULL },
456 	{ 0x0201, TIFF_LONG,  1,  ED_VRB,
457 	    "JPEGInterchangeFormat", "Offset to JPEG SOI", NULL },
458 	{ 0x0202, TIFF_LONG,  1,  ED_VRB,		/* bytes */
459 	    "JPEGInterchangeFormatLength", "Bytes of JPEG Data", NULL },
460 	{ 0x0211, TIFF_RTNL,  3,  ED_VRB,
461 	    "YCbCrCoefficients", "Color Space Xform Matrix Coeff's", NULL },
462 	{ 0x0212, TIFF_SHORT, 2,  ED_VRB,
463 	    "YCbCrSubSampling", "Chrominance Comp Samp Ratio", chromratios },
464 	{ 0x0213, TIFF_SHORT, 1,  ED_VRB,
465 	    "YCbCrPositioning", "Chrominance Comp Positioning", chrompos },
466 	{ 0x0214, TIFF_RTNL,  6,  ED_VRB,
467 	    "ReferenceBlackWhite", "Black and White Ref Point Values", NULL },
468 	{ 0x828d, TIFF_UNKN,  0,  ED_UNK,
469 	    "CFARepeatPatternDim", NULL, NULL },
470 	{ 0x828e, TIFF_UNKN,  0,  ED_UNK,
471 	    "CFAPattern", NULL, NULL },
472 	{ 0x828f, TIFF_UNKN,  0,  ED_UNK,
473 	    "BatteryLevel", NULL, NULL },
474 	{ 0x8298, TIFF_ASCII, 0,  ED_UNK,
475 	    "Copyright", "Copyright", NULL },
476 	{ 0x829a, TIFF_RTNL,  1,  ED_IMG,		/* s */
477 	    "ExposureTime", "Exposure Time", NULL },
478 	{ 0x829d, TIFF_RTNL,  1,  ED_IMG,
479 	    "FNumber", "F-Number", NULL },
480 	{ 0x83bb, TIFF_UNKN,  0,  ED_UNK,
481 	    "IPTC/NAA", NULL, NULL },
482 	{ 0x8769, TIFF_LONG,  1,  ED_VRB,
483 	    "ExifOffset", "Exif IFD Pointer", NULL },
484 	{ 0x8773, TIFF_UNKN,  0,  ED_UNK,
485 	    "InterColorProfile", NULL, NULL },
486 	{ 0x8822, TIFF_SHORT, 1,  ED_IMG,
487 	    "ExposureProgram", "Exposure Program", expprogs },
488 	{ 0x8824, TIFF_ASCII, 0,  ED_CAM,
489 	    "SpectralSensitivity", "Spectral Sensitivity", NULL },
490 	{ 0x8825, TIFF_LONG,  1,  ED_UNK,
491 	    "GPSInfo", "GPS Info IFD Pointer", NULL },
492 	{ 0x8827, TIFF_SHORT, 0,  ED_IMG,
493 	    "ISOSpeedRatings", "ISO Speed Rating", NULL },
494 	{ 0x8828, TIFF_UNDEF, 0,  ED_CAM,
495 	    "OECF", "Opto-Electric Conversion Factor", NULL },
496 	{ 0x9000, TIFF_UNDEF, 4,  ED_VRB,
497 	    "ExifVersion", "Exif Version", NULL },
498 	{ 0x9003, TIFF_ASCII, 20, ED_VRB,
499 	    "DateTimeOriginal", "Image Generated", NULL },
500 	{ 0x9004, TIFF_ASCII, 20, ED_VRB,
501 	    "DateTimeDigitized", "Image Digitized", NULL },
502 	{ 0x9101, TIFF_UNDEF, 4,  ED_VRB,
503 	    "ComponentsConfiguration", "Meaning of Each Comp", compconfig },
504 	{ 0x9102, TIFF_RTNL,  1,  ED_VRB,
505 	    "CompressedBitsPerPixel", "Image Compression Mode", NULL },
506 	{ 0x9201, TIFF_SRTNL, 1,  ED_IMG,		/* s */
507 	    "ShutterSpeedValue", "Shutter Speed", NULL },
508 	{ 0x9202, TIFF_RTNL,  1,  ED_IMG,
509 	    "ApertureValue", "Lens Aperture", NULL },
510 	{ 0x9203, TIFF_SRTNL, 1,  ED_IMG,
511 	    "BrightnessValue", "Brightness", NULL },
512 	{ 0x9204, TIFF_SRTNL, 1,  ED_IMG,
513 	    "ExposureBiasValue", "Exposure Bias", NULL },
514 	{ 0x9205, TIFF_RTNL,  1,  ED_PAS,
515 	    "MaxApertureValue", "Maximum Lens Aperture", NULL },
516 	{ 0x9206, TIFF_RTNL,  1,  ED_IMG,		/* m */
517 	    "SubjectDistance", "Subject Distance", NULL },
518 	{ 0x9207, TIFF_SHORT, 1,  ED_IMG,
519 	    "MeteringMode", "Metering Mode", metermodes },
520 	{ 0x9208, TIFF_SHORT, 1,  ED_IMG,
521 	    "LightSource", "Light Source", lightsrcs },
522 	{ 0x9209, TIFF_SHORT, 1,  ED_IMG,
523 	    "Flash", "Flash", NULL },
524 	{ 0x920a, TIFF_RTNL,  1,  ED_IMG,		/* mm */
525 	    "FocalLength", "Focal Length", NULL },
526 	{ 0x9214, TIFF_SHORT,  0,  ED_VRB,
527 	    "SubjectArea", "Subject Area", NULL },
528 	{ 0x927c, TIFF_UNDEF, 0,  ED_UNK,
529 	    "MakerNote", "Manufacturer Notes", NULL },
530 	{ 0x9286, TIFF_UNDEF, 0,  ED_UNK,
531 	    "UserComment", "Comment", NULL },
532 	{ 0x9290, TIFF_ASCII, 0,  ED_VRB,
533 	    "SubsecTime", "DateTime Second Fraction", NULL },
534 	{ 0x9291, TIFF_ASCII, 0,  ED_VRB,
535 	    "SubsecTimeOrginal", "DateTimeOriginal Second Fraction", NULL },
536 	{ 0x9292, TIFF_ASCII, 0,  ED_VRB,
537 	    "SubsecTimeDigitized", "DateTimeDigitized Second Fraction", NULL },
538 	{ 0xa000, TIFF_UNDEF, 4,  ED_UNK,
539 	    "FlashPixVersion", "Supported FlashPix Version", NULL },
540 	{ 0xa001, TIFF_SHORT, 1,  ED_IMG,
541 	    "ColorSpace", "Color Space Information", colorspcs },
542 	{ 0xa002, TIFF_UNKN,  1,  ED_IMG,		/* pixels */
543 	    "PixelXDimension", "Image Width", NULL },
544 	{ 0xa003, TIFF_UNKN,  1,  ED_IMG,		/* pixels */
545 	    "PixelYDimension", "Image Height", NULL },
546 	{ 0xa004, TIFF_ASCII, 13, ED_UNK,
547 	    "RelatedSoundFile", "Related Audio File", NULL },
548 	{ 0xa005, TIFF_LONG,  1,  ED_UNK,
549 	    "InteroperabilityOffset", "Interoperability IFD Pointer", NULL },
550 	{ 0xa20b, TIFF_RTNL,  1,  ED_IMG,		/* bcps */
551 	    "FlashEnergy", "Flash Energy", NULL },
552 	{ 0xa20c, TIFF_UNDEF, 0,  ED_VRB,
553 	    "SpatialFrequencyResponse", "Spatial Frequency Response", NULL },
554 	{ 0xa20e, TIFF_RTNL,  1,  ED_VRB,		/* dp[i|cm] */
555 	    "FocalPlaneXResolution", "Focal Plane Horiz Resolution", NULL },
556 	{ 0xa20f, TIFF_RTNL,  1,  ED_VRB,		/* dp[i|cm] */
557 	    "FocalPlaneYResolution", "Focal Plane Vert Resolution", NULL },
558 	{ 0xa210, TIFF_SHORT, 1,  ED_VRB,
559 	    "FocalPlaneResolutionUnit", "Focal Plane Res Unit", resunits },
560 	{ 0xa214, TIFF_SHORT, 2,  ED_VRB,
561 	    "SubjectLocation", "Subject Location", NULL },
562 	{ 0xa215, TIFF_RTNL,  1,  ED_IMG,
563 	    "ExposureIndex", "Exposure Index", NULL },
564 	{ 0xa217, TIFF_SHORT, 1,  ED_CAM,
565 	    "SensingMethod", "Sensing Method", imgsensors },
566 	{ 0xa300, TIFF_UNDEF, 1,  ED_VRB,
567 	    "FileSource", "File Source", NULL },
568 	{ 0xa301, TIFF_UNDEF, 1,  ED_VRB,
569 	    "SceneType", "Scene Type", scenetypes },
570 	{ 0xa302, TIFF_UNDEF, 0,  ED_CAM,
571 	    "CFAPattern", "Color Filter Array Pattern", NULL },
572 	{ 0xa401, TIFF_SHORT, 1,  ED_IMG,
573 	    "CustomRendered", "Rendering", customrend },
574 	{ 0xa402, TIFF_SHORT, 1,  ED_IMG,
575 	    "ExposureMode", "Exposure Mode", expmode },
576 	{ 0xa403, TIFF_SHORT, 1,  ED_IMG,
577 	    "WhiteBalance", "White Balance", whitebal },
578 	{ 0xa404, TIFF_RTNL,  1,  ED_IMG,
579 	    "DigitalZoomRatio", "Digital Zoom Ratio", NULL },
580 	{ 0xa405, TIFF_SHORT, 1,  ED_PAS,		/* mm */
581 	    "FocalLenIn35mmFilm", "Focal Length (35mm Equiv)", NULL },
582 	{ 0xa406, TIFF_SHORT, 1,  ED_IMG,
583 	    "SceneCaptureType", "Scene Capture Type", scenecaptypes },
584 	{ 0xa407, TIFF_SHORT, 1,  ED_IMG,		/* XXX typo in spec? */
585 	    "GainControl", "Gain Control", gainctrl },
586 	{ 0xa408, TIFF_SHORT, 1,  ED_IMG,
587 	    "Contrast", "Contrast", processrange },
588 	{ 0xa409, TIFF_SHORT, 1,  ED_IMG,
589 	    "Saturation", "Saturation", saturate },
590 	{ 0xa40a, TIFF_SHORT, 1,  ED_IMG,
591 	    "Sharpness", "Sharpness", processrange },
592 	{ 0xa40b, TIFF_UNDEF, 0,  ED_UNK,
593 	    "DeviceSettingDescr", "Device Settings", NULL },
594 	{ 0xa40c, TIFF_SHORT, 1,  ED_IMG,
595 	    "SubjectDistRange", "Subject Distance Range", subjdist },
596 	{ 0xa420, TIFF_ASCII, 33, ED_IMG,
597 	    "ImageUniqueID", "Unique Image ID", NULL },
598 	{ 0xa500, TIFF_RTNL,  1,  ED_UNK,
599 	    "GammaCoefficient", "Gamma Coefficient", NULL },
600 	{ 0xffff, TIFF_UNKN,  0,  ED_UNK,
601 	    "Unknown", NULL, NULL },
602 };
603