1/* exif-tag.c
2 *
3 * Copyright (c) 2001 Lutz Mueller <lutz@users.sourceforge.net>
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA  02110-1301  USA.
19 */
20
21#include <config.h>
22
23#include <libexif/exif-tag.h>
24#include <libexif/i18n.h>
25
26#include <stdlib.h>
27#include <string.h>
28
29#define ESL_NNNN { EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED }
30#define ESL_OOOO { EXIF_SUPPORT_LEVEL_OPTIONAL, EXIF_SUPPORT_LEVEL_OPTIONAL, EXIF_SUPPORT_LEVEL_OPTIONAL, EXIF_SUPPORT_LEVEL_OPTIONAL }
31#define ESL_MMMN { EXIF_SUPPORT_LEVEL_MANDATORY, EXIF_SUPPORT_LEVEL_MANDATORY, EXIF_SUPPORT_LEVEL_MANDATORY, EXIF_SUPPORT_LEVEL_NOT_RECORDED }
32#define ESL_MMMM { EXIF_SUPPORT_LEVEL_MANDATORY, EXIF_SUPPORT_LEVEL_MANDATORY, EXIF_SUPPORT_LEVEL_MANDATORY, EXIF_SUPPORT_LEVEL_MANDATORY }
33#define ESL_OMON { EXIF_SUPPORT_LEVEL_OPTIONAL, EXIF_SUPPORT_LEVEL_MANDATORY, EXIF_SUPPORT_LEVEL_OPTIONAL, EXIF_SUPPORT_LEVEL_NOT_RECORDED }
34#define ESL_NNOO { EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_OPTIONAL, EXIF_SUPPORT_LEVEL_OPTIONAL }
35#define ESL_NNMN { EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_MANDATORY, EXIF_SUPPORT_LEVEL_NOT_RECORDED }
36#define ESL_NNMM { EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_MANDATORY, EXIF_SUPPORT_LEVEL_MANDATORY }
37#define ESL_NNNM { EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_MANDATORY }
38#define ESL_NNNO { EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_OPTIONAL }
39#define ESL_GPS { ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN }
40
41/*!
42 * Table giving information about each EXIF tag.
43 * There may be more than one entry with the same tag value because some tags
44 * have different meanings depending on the IFD in which they appear.
45 * When there are such duplicate entries, there must be no overlap in their
46 * support levels.
47 * The entries MUST be sorted in tag order.
48 * The name and title are mandatory, but the description may be an empty
49 * string. None of the entries may be NULL except the final array terminator.
50 */
51static const struct TagEntry {
52	/*! Tag ID. There may be duplicate tags when the same number is used for
53	 * different meanings in different IFDs. */
54	ExifTag tag;
55	const char *name;
56	const char *title;
57	const char *description;
58	/*! indexed by the types [ExifIfd][ExifDataType] */
59	ExifSupportLevel esl[EXIF_IFD_COUNT][EXIF_DATA_TYPE_COUNT];
60} ExifTagTable[] = {
61#ifndef NO_VERBOSE_TAG_STRINGS
62	{EXIF_TAG_GPS_VERSION_ID, "GPSVersionID", N_("GPS tag version"),
63	 N_("Indicates the version of <GPSInfoIFD>. The version is given "
64	    "as 2.0.0.0. This tag is mandatory when <GPSInfo> tag is "
65	    "present. (Note: The <GPSVersionID> tag is given in bytes, "
66	    "unlike the <ExifVersion> tag. When the version is "
67	    "2.0.0.0, the tag value is 02000000.H)."), ESL_GPS},
68	{EXIF_TAG_INTEROPERABILITY_INDEX, "InteroperabilityIndex",
69	 N_("Interoperability Index"),
70	 N_("Indicates the identification of the Interoperability rule. "
71	    "Use \"R98\" for stating ExifR98 Rules. Four bytes used "
72	    "including the termination code (NULL). see the separate "
73	    "volume of Recommended Exif Interoperability Rules (ExifR98) "
74	    "for other tags used for ExifR98."),
75	 { ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_OOOO } },
76	{EXIF_TAG_GPS_LATITUDE_REF, "GPSLatitudeRef", N_("North or South Latitude"),
77	 N_("Indicates whether the latitude is north or south latitude. The "
78	    "ASCII value 'N' indicates north latitude, and 'S' is south "
79	    "latitude."), ESL_GPS},
80	{EXIF_TAG_INTEROPERABILITY_VERSION, "InteroperabilityVersion",
81	 N_("Interoperability Version"), "",
82	 { ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_OOOO } },
83	{EXIF_TAG_GPS_LATITUDE, "GPSLatitude", N_("Latitude"),
84	 N_("Indicates the latitude. The latitude is expressed as three "
85	    "RATIONAL values giving the degrees, minutes, and seconds, "
86	    "respectively. When degrees, minutes and seconds are expressed, "
87	    "the format is dd/1,mm/1,ss/1. When degrees and minutes are used "
88	    "and, for example, fractions of minutes are given up to two "
89	    "decimal places, the format is dd/1,mmmm/100,0/1."),
90	 ESL_GPS},
91	{EXIF_TAG_GPS_LONGITUDE_REF, "GPSLongitudeRef", N_("East or West Longitude"),
92	 N_("Indicates whether the longitude is east or west longitude. "
93	    "ASCII 'E' indicates east longitude, and 'W' is west "
94	    "longitude."), ESL_GPS},
95	{EXIF_TAG_GPS_LONGITUDE, "GPSLongitude", N_("Longitude"),
96	 N_("Indicates the longitude. The longitude is expressed as three "
97	    "RATIONAL values giving the degrees, minutes, and seconds, "
98	    "respectively. When degrees, minutes and seconds are expressed, "
99	    "the format is ddd/1,mm/1,ss/1. When degrees and minutes are "
100	    "used and, for example, fractions of minutes are given up to "
101	    "two decimal places, the format is ddd/1,mmmm/100,0/1."),
102	 ESL_GPS},
103	{EXIF_TAG_GPS_ALTITUDE_REF, "GPSAltitudeRef", N_("Altitude reference"),
104	 N_("Indicates the altitude used as the reference altitude. If the "
105	    "reference is sea level and the altitude is above sea level, 0 "
106	    "is given. If the altitude is below sea level, a value of 1 is given "
107	    "and the altitude is indicated as an absolute value in the "
108	    "GSPAltitude tag. The reference unit is meters. Note that this tag "
109	    "is BYTE type, unlike other reference tags."), ESL_GPS},
110	{EXIF_TAG_GPS_ALTITUDE, "GPSAltitude", N_("Altitude"),
111	 N_("Indicates the altitude based on the reference in GPSAltitudeRef. "
112	    "Altitude is expressed as one RATIONAL value. The reference unit "
113	    "is meters."), ESL_GPS},
114	{EXIF_TAG_GPS_TIME_STAMP, "GPSTimeStamp", N_("GPS time (atomic clock)"),
115         N_("Indicates the time as UTC (Coordinated Universal Time). "
116	    "TimeStamp is expressed as three RATIONAL values giving "
117            "the hour, minute, and second."), ESL_GPS},
118	{EXIF_TAG_GPS_SATELLITES, "GPSSatellites", N_("GPS satellites used for measurement"),
119         N_("Indicates the GPS satellites used for measurements. This "
120            "tag can be used to describe the number of satellites, their ID "
121            "number, angle of elevation, azimuth, SNR and other information "
122            "in ASCII notation. The format is not specified. If the GPS "
123            "receiver is incapable of taking measurements, value of the tag "
124            "shall be set to NULL."), ESL_GPS},
125	{EXIF_TAG_GPS_STATUS, "GPSStatus", N_("GPS receiver status"),
126         N_("Indicates the status of the GPS receiver when the image is "
127            "recorded. 'A' means measurement is in progress, and 'V' means "
128            "the measurement is Interoperability."), ESL_GPS},
129	{EXIF_TAG_GPS_MEASURE_MODE, "GPSMeasureMode", N_("GPS measurement mode"),
130         N_("Indicates the GPS measurement mode. '2' means "
131            "two-dimensional measurement and '3' means three-dimensional "
132            "measurement is in progress."), ESL_GPS},
133	{EXIF_TAG_GPS_DOP, "GPSDOP", N_("Measurement precision"),
134         N_("Indicates the GPS DOP (data degree of precision). An HDOP "
135            "value is written during two-dimensional measurement, and PDOP "
136            "during three-dimensional measurement."), ESL_GPS},
137	{EXIF_TAG_GPS_SPEED_REF, "GPSSpeedRef", N_("Speed unit"),
138         N_("Indicates the unit used to express the GPS receiver speed "
139            "of movement. 'K', 'M' and 'N' represent kilometers per hour, "
140            "miles per hour, and knots."), ESL_GPS},
141	{EXIF_TAG_GPS_SPEED, "GPSSpeed", N_("Speed of GPS receiver"),
142	 N_("Indicates the speed of GPS receiver movement."), ESL_GPS},
143	{EXIF_TAG_GPS_TRACK_REF, "GPSTrackRef", N_("Reference for direction of movement"),
144         N_("Indicates the reference for giving the direction of GPS "
145            "receiver movement. 'T' denotes true direction and 'M' is "
146            "magnetic direction."), ESL_GPS},
147	{EXIF_TAG_GPS_TRACK, "GPSTrack", N_("Direction of movement"),
148         N_("Indicates the direction of GPS receiver movement. The range "
149            "of values is from 0.00 to 359.99."), ESL_GPS},
150	{EXIF_TAG_GPS_IMG_DIRECTION_REF, "GPSImgDirectionRef", N_("GPS Img Direction Reference"),
151	 N_("Indicates the reference for giving the direction of the image when it is captured. "
152	    "'T' denotes true direction and 'M' is magnetic direction."), ESL_GPS},
153	{EXIF_TAG_GPS_IMG_DIRECTION, "GPSImgDirection", N_("GPS Img Direction"),
154	 N_("Indicates the direction of the image when it was captured. The range of values is "
155	    "from 0.00 to 359.99."), ESL_GPS},
156	{EXIF_TAG_GPS_MAP_DATUM, "GPSMapDatum", N_("Geodetic survey data used"),
157         N_("Indicates the geodetic survey data used by the GPS "
158            "receiver. If the survey data is restricted to Japan, the value "
159            "of this tag is 'TOKYO' or 'WGS-84'. If a GPS Info tag is "
160            "recorded, it is strongly recommended that this tag be recorded."), ESL_GPS},
161	{EXIF_TAG_GPS_DEST_LATITUDE_REF, "GPSDestLatitudeRef", N_("Reference for latitude of destination"),
162         N_("Indicates whether the latitude of the destination point is "
163            "north or south latitude. The ASCII value 'N' indicates north "
164            "latitude, and 'S' is south latitude."), ESL_GPS},
165	{EXIF_TAG_GPS_DEST_LATITUDE, "GPSDestLatitude", N_("Latitude of destination"),
166         N_("Indicates the latitude of the destination point. The "
167            "latitude is expressed as three RATIONAL values giving the "
168            "degrees, minutes, and seconds, respectively. If latitude is "
169            "expressed as degrees, minutes and seconds, a typical format "
170            "would be dd/1,mm/1,ss/1. When degrees and minutes are used and, "
171            "for example, fractions of minutes are given up to two decimal "
172            "places, the format would be dd/1,mmmm/100,0/1."), ESL_GPS},
173	{EXIF_TAG_GPS_DEST_LONGITUDE_REF, "GPSDestLongitudeRef", N_("Reference for longitude of destination"),
174         N_("Indicates whether the longitude of the destination point is "
175            "east or west longitude. ASCII 'E' indicates east longitude, and "
176            "'W' is west longitude."), ESL_GPS},
177	{EXIF_TAG_GPS_DEST_LONGITUDE, "GPSDestLongitude", N_("Longitude of destination"),
178         N_("Indicates the longitude of the destination point. The "
179            "longitude is expressed as three RATIONAL values giving the "
180            "degrees, minutes, and seconds, respectively. If longitude is "
181            "expressed as degrees, minutes and seconds, a typical format "
182            "would be ddd/1,mm/1,ss/1. When degrees and minutes are used "
183            "and, for example, fractions of minutes are given up to two "
184            "decimal places, the format would be ddd/1,mmmm/100,0/1."),
185         ESL_GPS},
186	{EXIF_TAG_GPS_DEST_BEARING_REF, "GPSDestBearingRef", N_("Reference for bearing of destination"),
187         N_("Indicates the reference used for giving the bearing to "
188            "the destination point. 'T' denotes true direction and 'M' is "
189            "magnetic direction."), ESL_GPS},
190	{EXIF_TAG_GPS_DEST_BEARING, "GPSDestBearing", N_("Bearing of destination"),
191         N_("Indicates the bearing to the destination point. The range "
192            "of values is from 0.00 to 359.99."), ESL_GPS},
193	{EXIF_TAG_GPS_DEST_DISTANCE_REF, "GPSDestDistanceRef", N_("Reference for distance to destination"),
194         N_("Indicates the unit used to express the distance to the "
195            "destination point. 'K', 'M' and 'N' represent kilometers, miles "
196            "and knots."), ESL_GPS},
197	{EXIF_TAG_GPS_DEST_DISTANCE, "GPSDestDistance", N_("Distance to destination"),
198	 N_("Indicates the distance to the destination point."), ESL_GPS},
199	{EXIF_TAG_GPS_PROCESSING_METHOD, "GPSProcessingMethod", N_("Name of GPS processing method"),
200         N_("A character string recording the name of the method used "
201            "for location finding. The first byte indicates the character "
202            "code used, and this is followed by the name "
203            "of the method. Since the Type is not ASCII, NULL termination is "
204            "not necessary."), ESL_GPS},
205	{EXIF_TAG_GPS_AREA_INFORMATION, "GPSAreaInformation", N_("Name of GPS area"),
206         N_("A character string recording the name of the GPS area. The "
207            "first byte indicates the character code used, "
208            "and this is followed by the name of the GPS area. Since "
209            "the Type is not ASCII, NULL termination is not necessary."), ESL_GPS},
210	{EXIF_TAG_GPS_DATE_STAMP, "GPSDateStamp", N_("GPS date"),
211         N_("A character string recording date and time information "
212            "relative to UTC (Coordinated Universal Time). The format is "
213            "\"YYYY:MM:DD\". The length of the string is 11 bytes including "
214            "NULL."), ESL_GPS},
215	{EXIF_TAG_GPS_DIFFERENTIAL, "GPSDifferential", N_("GPS differential correction"),
216         N_("Indicates whether differential correction is applied to the "
217            "GPS receiver."), ESL_GPS},
218	/* Not in EXIF 2.2 */
219	{EXIF_TAG_NEW_SUBFILE_TYPE, "NewSubfileType",
220	 N_("New Subfile Type"), N_("A general indication of the kind of data "
221	    "contained in this subfile.")},
222	{EXIF_TAG_IMAGE_WIDTH, "ImageWidth", N_("Image Width"),
223	 N_("The number of columns of image data, equal to the number of "
224	    "pixels per row. In JPEG compressed data a JPEG marker is "
225	    "used instead of this tag."),
226	 { ESL_MMMN, ESL_MMMN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
227	{EXIF_TAG_IMAGE_LENGTH, "ImageLength", N_("Image Length"),
228	 N_("The number of rows of image data. In JPEG compressed data a "
229	    "JPEG marker is used instead of this tag."),
230	 { ESL_MMMN, ESL_MMMN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
231	{EXIF_TAG_BITS_PER_SAMPLE, "BitsPerSample", N_("Bits per Sample"),
232	 N_("The number of bits per image component. In this standard each "
233	    "component of the image is 8 bits, so the value for this "
234	    "tag is 8. See also <SamplesPerPixel>. In JPEG compressed data "
235	    "a JPEG marker is used instead of this tag."),
236	 { ESL_MMMN, ESL_MMMN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
237	{EXIF_TAG_COMPRESSION, "Compression", N_("Compression"),
238	 N_("The compression scheme used for the image data. When a "
239	    "primary image is JPEG compressed, this designation is "
240	    "not necessary and is omitted. When thumbnails use JPEG "
241	    "compression, this tag value is set to 6."),
242	 { ESL_MMMN, ESL_MMMM, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
243	{EXIF_TAG_PHOTOMETRIC_INTERPRETATION, "PhotometricInterpretation",
244	 N_("Photometric Interpretation"),
245	 N_("The pixel composition. In JPEG compressed data a JPEG "
246	    "marker is used instead of this tag."),
247	 { ESL_MMMN, ESL_MMMN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
248	/* Not in EXIF 2.2 */
249	{EXIF_TAG_FILL_ORDER, "FillOrder", N_("Fill Order"), ""},
250	/* Not in EXIF 2.2 */
251	{EXIF_TAG_DOCUMENT_NAME, "DocumentName", N_("Document Name"), ""},
252	{EXIF_TAG_IMAGE_DESCRIPTION, "ImageDescription",
253	 N_("Image Description"),
254	 N_("A character string giving the title of the image. It may be "
255	    "a comment such as \"1988 company picnic\" or "
256	    "the like. Two-bytes character codes cannot be used. "
257	    "When a 2-bytes code is necessary, the Exif Private tag "
258	    "<UserComment> is to be used."),
259	 { ESL_OOOO, ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
260	{EXIF_TAG_MAKE, "Make", N_("Manufacturer"),
261	 N_("The manufacturer of the recording "
262	    "equipment. This is the manufacturer of the DSC, scanner, "
263	    "video digitizer or other equipment that generated the "
264	    "image. When the field is left blank, it is treated as "
265	    "unknown."),
266	 { ESL_OOOO, ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
267	{EXIF_TAG_MODEL, "Model", N_("Model"),
268	 N_("The model name or model number of the equipment. This is the "
269	    "model name or number of the DSC, scanner, video digitizer "
270	    "or other equipment that generated the image. When the field "
271	    "is left blank, it is treated as unknown."),
272	 { ESL_OOOO, ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
273	{EXIF_TAG_STRIP_OFFSETS, "StripOffsets", N_("Strip Offsets"),
274	 N_("For each strip, the byte offset of that strip. It is "
275	    "recommended that this be selected so the number of strip "
276	    "bytes does not exceed 64 Kbytes. With JPEG compressed "
277	    "data this designation is not needed and is omitted. See also "
278	    "<RowsPerStrip> and <StripByteCounts>."),
279	 { ESL_MMMN, ESL_MMMN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
280	{EXIF_TAG_ORIENTATION, "Orientation", N_("Orientation"),
281	 N_("The image orientation viewed in terms of rows and columns."),
282	 { ESL_OOOO, ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
283	{EXIF_TAG_SAMPLES_PER_PIXEL, "SamplesPerPixel",
284	 N_("Samples per Pixel"),
285	 N_("The number of components per pixel. Since this standard applies "
286	    "to RGB and YCbCr images, the value set for this tag is 3. "
287	    "In JPEG compressed data a JPEG marker is used instead of this "
288	    "tag."),
289	 { ESL_MMMN, ESL_MMMN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
290	{EXIF_TAG_ROWS_PER_STRIP, "RowsPerStrip", N_("Rows per Strip"),
291	 N_("The number of rows per strip. This is the number of rows "
292	    "in the image of one strip when an image is divided into "
293	    "strips. With JPEG compressed data this designation is not "
294	    "needed and is omitted. See also <StripOffsets> and "
295	    "<StripByteCounts>."),
296	 { ESL_MMMN, ESL_MMMN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
297	{EXIF_TAG_STRIP_BYTE_COUNTS, "StripByteCounts", N_("Strip Byte Count"),
298	 N_("The total number of bytes in each strip. With JPEG compressed "
299	    "data this designation is not needed and is omitted."),
300	 { ESL_MMMN, ESL_MMMN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
301	{EXIF_TAG_X_RESOLUTION, "XResolution", N_("x-Resolution"),
302	 N_("The number of pixels per <ResolutionUnit> in the <ImageWidth> "
303	    "direction. When the image resolution is unknown, 72 [dpi] "
304	    "is designated."),
305	 { ESL_MMMM, ESL_MMMM, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
306	{EXIF_TAG_Y_RESOLUTION, "YResolution", N_("y-Resolution"),
307	 N_("The number of pixels per <ResolutionUnit> in the <ImageLength> "
308	    "direction. The same value as <XResolution> is designated."),
309	 { ESL_MMMM, ESL_MMMM, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
310	{EXIF_TAG_PLANAR_CONFIGURATION, "PlanarConfiguration",
311	 N_("Planar Configuration"),
312	 N_("Indicates whether pixel components are recorded in a chunky "
313	    "or planar format. In JPEG compressed files a JPEG marker "
314	    "is used instead of this tag. If this field does not exist, "
315	    "the TIFF default of 1 (chunky) is assumed."),
316	 { ESL_OMON, ESL_OMON, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
317	{EXIF_TAG_RESOLUTION_UNIT, "ResolutionUnit", N_("Resolution Unit"),
318	 N_("The unit for measuring <XResolution> and <YResolution>. The same "
319	    "unit is used for both <XResolution> and <YResolution>. If "
320	    "the image resolution is unknown, 2 (inches) is designated."),
321	 { ESL_MMMM, ESL_MMMM, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
322	{EXIF_TAG_TRANSFER_FUNCTION, "TransferFunction",
323	 N_("Transfer Function"),
324	 N_("A transfer function for the image, described in tabular style. "
325	    "Normally this tag is not necessary, since color space is "
326	    "specified in the color space information tag (<ColorSpace>)."),
327	 { ESL_OOOO, ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
328	{EXIF_TAG_SOFTWARE, "Software", N_("Software"),
329	 N_("This tag records the name and version of the software or "
330	    "firmware of the camera or image input device used to "
331	    "generate the image. The detailed format is not specified, but "
332	    "it is recommended that the example shown below be "
333	    "followed. When the field is left blank, it is treated as "
334	    "unknown."),
335	 { ESL_OOOO, ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
336	{EXIF_TAG_DATE_TIME, "DateTime", N_("Date and Time"),
337	 N_("The date and time of image creation. In this standard "
338	    "(EXIF-2.1) it is the date and time the file was changed."),
339	 { ESL_OOOO, ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
340	{EXIF_TAG_ARTIST, "Artist", N_("Artist"),
341	 N_("This tag records the name of the camera owner, photographer or "
342	    "image creator. The detailed format is not specified, but it is "
343	    "recommended that the information be written as in the example "
344	    "below for ease of Interoperability. When the field is "
345	    "left blank, it is treated as unknown."),
346	 { ESL_OOOO, ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
347	{EXIF_TAG_WHITE_POINT, "WhitePoint", N_("White Point"),
348	 N_("The chromaticity of the white point of the image. Normally "
349	    "this tag is not necessary, since color space is specified "
350	    "in the color space information tag (<ColorSpace>)."),
351	 { ESL_OOOO, ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
352	{EXIF_TAG_PRIMARY_CHROMATICITIES, "PrimaryChromaticities",
353	 N_("Primary Chromaticities"),
354	 N_("The chromaticity of the three primary colors of the image. "
355	    "Normally this tag is not necessary, since color space is "
356	    "specified in the color space information tag (<ColorSpace>)."),
357	 { ESL_OOOO, ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
358	/* Not in EXIF 2.2 */
359	{EXIF_TAG_SUB_IFDS, "SubIFDs", "SubIFD Offsets", N_("Defined by Adobe Corporation "
360	    "to enable TIFF Trees within a TIFF file.")},
361	/* Not in EXIF 2.2 */
362	{EXIF_TAG_TRANSFER_RANGE, "TransferRange", N_("Transfer Range"), ""},
363	/* Not in EXIF 2.2 */
364	{EXIF_TAG_JPEG_PROC, "JPEGProc", "JPEGProc", ""},
365	{EXIF_TAG_JPEG_INTERCHANGE_FORMAT, "JPEGInterchangeFormat",
366	 N_("JPEG Interchange Format"),
367	 N_("The offset to the start byte (SOI) of JPEG compressed "
368	    "thumbnail data. This is not used for primary image "
369	    "JPEG data."),
370	 { ESL_NNNN, ESL_NNNM, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
371	{EXIF_TAG_JPEG_INTERCHANGE_FORMAT_LENGTH,
372	 "JPEGInterchangeFormatLength", N_("JPEG Interchange Format Length"),
373	 N_("The number of bytes of JPEG compressed thumbnail data. This "
374	    "is not used for primary image JPEG data. JPEG thumbnails "
375	    "are not divided but are recorded as a continuous JPEG "
376	    "bitstream from SOI to EOI. Appn and COM markers should "
377	    "not be recorded. Compressed thumbnails must be recorded in no "
378	    "more than 64 Kbytes, including all other data to be "
379	    "recorded in APP1."),
380	 { ESL_NNNN, ESL_NNNM, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
381	{EXIF_TAG_YCBCR_COEFFICIENTS, "YCbCrCoefficients",
382	 N_("YCbCr Coefficients"),
383	 N_("The matrix coefficients for transformation from RGB to YCbCr "
384	    "image data. No default is given in TIFF; but here the "
385	    "value given in \"Color Space Guidelines\", is used "
386	    "as the default. The color space is declared in a "
387	    "color space information tag, with the default being the value "
388	    "that gives the optimal image characteristics "
389	    "Interoperability this condition."),
390	 { ESL_NNOO, ESL_NNOO, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
391	{EXIF_TAG_YCBCR_SUB_SAMPLING, "YCbCrSubSampling",
392	 N_("YCbCr Sub-Sampling"),
393	 N_("The sampling ratio of chrominance components in relation to the "
394	    "luminance component. In JPEG compressed data a JPEG marker "
395	    "is used instead of this tag."),
396	 { ESL_NNMN, ESL_NNMN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
397	{EXIF_TAG_YCBCR_POSITIONING, "YCbCrPositioning",
398	 N_("YCbCr Positioning"),
399	 N_("The position of chrominance components in relation to the "
400	    "luminance component. This field is designated only for "
401	    "JPEG compressed data or uncompressed YCbCr data. The TIFF "
402	    "default is 1 (centered); but when Y:Cb:Cr = 4:2:2 it is "
403	    "recommended in this standard that 2 (co-sited) be used to "
404	    "record data, in order to improve the image quality when viewed "
405	    "on TV systems. When this field does not exist, the reader shall "
406	    "assume the TIFF default. In the case of Y:Cb:Cr = 4:2:0, the "
407	    "TIFF default (centered) is recommended. If the reader "
408	    "does not have the capability of supporting both kinds of "
409	    "<YCbCrPositioning>, it shall follow the TIFF default regardless "
410	    "of the value in this field. It is preferable that readers "
411	    "be able to support both centered and co-sited positioning."),
412	 { ESL_NNMM, ESL_NNOO, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
413	{EXIF_TAG_REFERENCE_BLACK_WHITE, "ReferenceBlackWhite",
414	 N_("Reference Black/White"),
415	 N_("The reference black point value and reference white point "
416	    "value. No defaults are given in TIFF, but the values "
417	    "below are given as defaults here. The color space is declared "
418	    "in a color space information tag, with the default "
419	    "being the value that gives the optimal image characteristics "
420	    "Interoperability these conditions."),
421	 { ESL_OOOO, ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
422	/* Not in EXIF 2.2 */
423	{EXIF_TAG_XML_PACKET, "XMLPacket", N_("XML Packet"), N_("XMP Metadata")},
424	/* Not in EXIF 2.2 */
425	{EXIF_TAG_RELATED_IMAGE_FILE_FORMAT, "RelatedImageFileFormat",
426	 "RelatedImageFileFormat", ""},
427	/* Not in EXIF 2.2 */
428	{EXIF_TAG_RELATED_IMAGE_WIDTH, "RelatedImageWidth",
429	 "RelatedImageWidth", ""},
430	/* Not in EXIF 2.2 */
431	{EXIF_TAG_RELATED_IMAGE_LENGTH, "RelatedImageLength",
432	 "RelatedImageLength", ""},
433	/* Not in EXIF 2.2 */
434	{EXIF_TAG_CFA_REPEAT_PATTERN_DIM, "CFARepeatPatternDim",
435	 "CFARepeatPatternDim", ""},
436	/* Not in EXIF 2.2 */
437	{EXIF_TAG_CFA_PATTERN, "CFAPattern",
438	 N_("CFA Pattern"),
439	 N_("Indicates the color filter array (CFA) geometric pattern of the "
440	    "image sensor when a one-chip color area sensor is used. "
441	    "It does not apply to all sensing methods.")},
442	/* Not in EXIF 2.2 */
443	{EXIF_TAG_BATTERY_LEVEL, "BatteryLevel", N_("Battery Level"), ""},
444	{EXIF_TAG_COPYRIGHT, "Copyright", N_("Copyright"),
445	 N_("Copyright information. In this standard the tag is used to "
446	    "indicate both the photographer and editor copyrights. It is "
447	    "the copyright notice of the person or organization claiming "
448	    "rights to the image. The Interoperability copyright "
449	    "statement including date and rights should be written in this "
450	    "field; e.g., \"Copyright, John Smith, 19xx. All rights "
451	    "reserved.\". In this standard the field records both the "
452	    "photographer and editor copyrights, with each recorded in a "
453	    "separate part of the statement. When there is a clear "
454	    "distinction between the photographer and editor copyrights, "
455	    "these are to be written in the order of photographer followed "
456	    "by editor copyright, separated by NULL (in this case, "
457	    "since the statement also ends with a NULL, there are two NULL "
458	    "codes) (see example 1). When only the photographer is given, "
459	    "it is terminated by one NULL code (see example 2). When only "
460	    "the editor copyright is given, "
461	    "the photographer copyright part consists of one space followed "
462	    "by a terminating NULL code, then the editor copyright is given "
463	    "(see example 3). When the field is left blank, it is treated "
464	    "as unknown."),
465	 { ESL_OOOO, ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
466	{EXIF_TAG_EXPOSURE_TIME, "ExposureTime", N_("Exposure Time"),
467	 N_("Exposure time, given in seconds (sec)."),
468	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
469	{EXIF_TAG_FNUMBER, "FNumber", N_("FNumber"),
470	 N_("The F number."),
471	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
472	/* Not in EXIF 2.2 */
473	{EXIF_TAG_IPTC_NAA, "IPTC/NAA", "IPTC/NAA", ""},
474	/* Not in EXIF 2.2 */
475	{EXIF_TAG_IMAGE_RESOURCES, "ImageResources", N_("Image Resources Block"), ""},
476	{EXIF_TAG_EXIF_IFD_POINTER, "ExifIfdPointer", "ExifIFDPointer",
477	 N_("A pointer to the Exif IFD. Interoperability, Exif IFD has the "
478	    "same structure as that of the IFD specified in TIFF. "
479	    "ordinarily, however, it does not contain image data as in "
480	    "the case of TIFF."),
481	 { ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
482	/* Not in EXIF 2.2 */
483	{EXIF_TAG_INTER_COLOR_PROFILE, "InterColorProfile",
484	 "InterColorProfile", ""},
485	{EXIF_TAG_EXPOSURE_PROGRAM, "ExposureProgram", N_("Exposure Program"),
486	 N_("The class of the program used by the camera to set exposure "
487	    "when the picture is taken."),
488	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
489	{EXIF_TAG_SPECTRAL_SENSITIVITY, "SpectralSensitivity",
490	 N_("Spectral Sensitivity"),
491	 N_("Indicates the spectral sensitivity of each channel of the "
492	    "camera used. The tag value is an ASCII string compatible "
493	    "with the standard developed by the ASTM Technical Committee."),
494	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
495	{EXIF_TAG_GPS_INFO_IFD_POINTER, "GPSInfoIFDPointer",
496	 "GPSInfoIFDPointer",
497	 N_("A pointer to the GPS Info IFD. The "
498	    "Interoperability structure of the GPS Info IFD, like that of "
499	    "Exif IFD, has no image data."),
500	 { ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
501
502	{EXIF_TAG_ISO_SPEED_RATINGS, "ISOSpeedRatings",
503	 N_("ISO Speed Ratings"),
504	 N_("Indicates the ISO Speed and ISO Latitude of the camera or "
505	    "input device as specified in ISO 12232."),
506	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
507	{EXIF_TAG_OECF, "OECF", N_("OECF"),
508	 N_("Indicates the Opto-Electronic Conversion Function (OECF) "
509	    "specified in ISO 14524. <OECF> is the relationship between "
510	    "the camera optical input and the image values."),
511	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
512	/* Not in EXIF 2.2 */
513	{EXIF_TAG_TIME_ZONE_OFFSET, "TimeZoneOffset", N_("Time Zone Offset"),
514	 N_("Encodes time zone of camera clock relative to GMT.")},
515	{EXIF_TAG_EXIF_VERSION, "ExifVersion", N_("Exif Version"),
516	 N_("The version of this standard supported. Nonexistence of this "
517	    "field is taken to mean nonconformance to the standard."),
518	 { ESL_NNNN, ESL_NNNN, ESL_MMMM, ESL_NNNN, ESL_NNNN } },
519	{EXIF_TAG_DATE_TIME_ORIGINAL, "DateTimeOriginal",
520	 N_("Date and Time (original)"),
521	 N_("The date and time when the original image data was generated. "
522	    "For a digital still camera "
523	    "the date and time the picture was taken are recorded."),
524	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
525	{EXIF_TAG_DATE_TIME_DIGITIZED, "DateTimeDigitized",
526	 N_("Date and Time (digitized)"),
527	 N_("The date and time when the image was stored as digital data."),
528	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
529	{EXIF_TAG_COMPONENTS_CONFIGURATION, "ComponentsConfiguration",
530	 N_("Components Configuration"),
531	 N_("Information specific to compressed data. The channels of "
532	    "each component are arranged in order from the 1st "
533	    "component to the 4th. For uncompressed data the data "
534	    "arrangement is given in the <PhotometricInterpretation> tag. "
535	    "However, since <PhotometricInterpretation> can only "
536	    "express the order of Y, Cb and Cr, this tag is provided "
537	    "for cases when compressed data uses components other than "
538	    "Y, Cb, and Cr and to enable support of other sequences."),
539	 { ESL_NNNN, ESL_NNNN, ESL_NNNM, ESL_NNNN, ESL_NNNN } },
540	{EXIF_TAG_COMPRESSED_BITS_PER_PIXEL, "CompressedBitsPerPixel",
541	 N_("Compressed Bits per Pixel"),
542	 N_("Information specific to compressed data. The compression mode "
543	    "used for a compressed image is indicated in unit bits "
544	    "per pixel."),
545	 { ESL_NNNN, ESL_NNNN, ESL_NNNO, ESL_NNNN, ESL_NNNN } },
546	{EXIF_TAG_SHUTTER_SPEED_VALUE, "ShutterSpeedValue", N_("Shutter speed"),
547	 N_("Shutter speed. The unit is the APEX (Additive System of "
548	    "Photographic Exposure) setting."),
549	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
550	{EXIF_TAG_APERTURE_VALUE, "ApertureValue", N_("Aperture"),
551	 N_("The lens aperture. The unit is the APEX value."),
552	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
553	{EXIF_TAG_BRIGHTNESS_VALUE, "BrightnessValue", N_("Brightness"),
554	 N_("The value of brightness. The unit is the APEX value. "
555	    "Ordinarily it is given in the range of -99.99 to 99.99."),
556	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
557	{EXIF_TAG_EXPOSURE_BIAS_VALUE, "ExposureBiasValue",
558	 N_("Exposure Bias"),
559	 N_("The exposure bias. The units is the APEX value. Ordinarily "
560	    "it is given in the range of -99.99 to 99.99."),
561	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
562	{EXIF_TAG_MAX_APERTURE_VALUE, "MaxApertureValue", N_("Maximum Aperture Value"),
563	 N_("The smallest F number of the lens. The unit is the APEX value. "
564	    "Ordinarily it is given in the range of 00.00 to 99.99, "
565	    "but it is not limited to this range."),
566	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
567	{EXIF_TAG_SUBJECT_DISTANCE, "SubjectDistance",
568	 N_("Subject Distance"),
569	 N_("The distance to the subject, given in meters."),
570	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
571	{EXIF_TAG_METERING_MODE, "MeteringMode", N_("Metering Mode"),
572	 N_("The metering mode."),
573	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
574	{EXIF_TAG_LIGHT_SOURCE, "LightSource", N_("Light Source"),
575	 N_("The kind of light source."),
576	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
577	{EXIF_TAG_FLASH, "Flash", N_("Flash"),
578	 N_("This tag is recorded when an image is taken using a strobe "
579	    "light (flash)."),
580	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
581	{EXIF_TAG_FOCAL_LENGTH, "FocalLength", N_("Focal Length"),
582	 N_("The actual focal length of the lens, in mm. Conversion is not "
583	    "made to the focal length of a 35 mm film camera."),
584	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
585	{EXIF_TAG_SUBJECT_AREA, "SubjectArea", N_("Subject Area"),
586	 N_("This tag indicates the location and area of the main subject "
587	    "in the overall scene."),
588	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
589	/* Not in EXIF 2.2 */
590	{EXIF_TAG_TIFF_EP_STANDARD_ID, "TIFF/EPStandardID", N_("TIFF/EP Standard ID"), ""},
591	{EXIF_TAG_MAKER_NOTE, "MakerNote", N_("Maker Note"),
592	 N_("A tag for manufacturers of Exif writers to record any desired "
593	    "information. The contents are up to the manufacturer."),
594	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
595	{EXIF_TAG_USER_COMMENT, "UserComment", N_("User Comment"),
596	 N_("A tag for Exif users to write keywords or comments on the image "
597	    "besides those in <ImageDescription>, and without the "
598	    "character code limitations of the <ImageDescription> tag. The "
599	    "character code used in the <UserComment> tag is identified "
600	    "based on an ID code in a fixed 8-byte area at the start of "
601	    "the tag data area. The unused portion of the area is padded "
602	    "with NULL (\"00.h\"). ID codes are assigned by means of "
603	    "registration. The designation method and references for each "
604	    "character code are defined in the specification. The value of "
605	    "CountN is determined based on the 8 bytes in the character code "
606	    "area and the number of bytes in the user comment part. Since "
607	    "the TYPE is not ASCII, NULL termination is not necessary. "
608	    "The ID code for the <UserComment> area may be a Defined code "
609	    "such as JIS or ASCII, or may be Undefined. The Undefined name "
610	    "is UndefinedText, and the ID code is filled with 8 bytes of all "
611	    "\"NULL\" (\"00.H\"). An Exif reader that reads the "
612	    "<UserComment> tag must have a function for determining the "
613	    "ID code. This function is not required in Exif readers that "
614	    "do not use the <UserComment> tag. "
615	    "When a <UserComment> area is set aside, it is recommended that "
616	    "the ID code be ASCII and that the following user comment "
617	    "part be filled with blank characters [20.H]."),
618	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
619	{EXIF_TAG_SUB_SEC_TIME, "SubsecTime", "SubsecTime",
620	 N_("A tag used to record fractions of seconds for the "
621	    "<DateTime> tag."),
622	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
623	{EXIF_TAG_SUB_SEC_TIME_ORIGINAL, "SubSecTimeOriginal",
624	 "SubSecTimeOriginal",
625	 N_("A tag used to record fractions of seconds for the "
626	    "<DateTimeOriginal> tag."),
627	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
628	{EXIF_TAG_SUB_SEC_TIME_DIGITIZED, "SubSecTimeDigitized",
629	 "SubSecTimeDigitized",
630	 N_("A tag used to record fractions of seconds for the "
631	    "<DateTimeDigitized> tag."),
632	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
633	/* Not in EXIF 2.2 (Microsoft extension) */
634	{EXIF_TAG_XP_TITLE, "XPTitle", N_("XP Title"),
635	 N_("A character string giving the title of the image, encoded in "
636	    "UTF-16LE."),
637	 { ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
638	/* Not in EXIF 2.2 (Microsoft extension) */
639	{EXIF_TAG_XP_COMMENT, "XPComment", N_("XP Comment"),
640	 N_("A character string containing a comment about the image, encoded "
641	    "in UTF-16LE."),
642	 { ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
643	/* Not in EXIF 2.2 (Microsoft extension) */
644	{EXIF_TAG_XP_AUTHOR, "XPAuthor", N_("XP Author"),
645	 N_("A character string containing the name of the image creator, "
646	    "encoded in UTF-16LE."),
647	 { ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
648	/* Not in EXIF 2.2 (Microsoft extension) */
649	{EXIF_TAG_XP_KEYWORDS, "XPKeywords", N_("XP Keywords"),
650	 N_("A character string containing key words describing the image, "
651	    "encoded in UTF-16LE."),
652	 { ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
653	/* Not in EXIF 2.2 (Microsoft extension) */
654	{EXIF_TAG_XP_SUBJECT, "XPSubject", N_("XP Subject"),
655	 N_("A character string giving the image subject, encoded in "
656	    "UTF-16LE."),
657	 { ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
658	{EXIF_TAG_FLASH_PIX_VERSION, "FlashPixVersion", "FlashPixVersion",
659	 N_("The FlashPix format version supported by a FPXR file."),
660	 { ESL_NNNN, ESL_NNNN, ESL_MMMM, ESL_NNNN, ESL_NNNN } },
661	{EXIF_TAG_COLOR_SPACE, "ColorSpace", N_("Color Space"),
662	 N_("The color space information tag is always "
663	    "recorded as the color space specifier. Normally sRGB (=1) "
664	    "is used to define the color space based on the PC monitor "
665	    "conditions and environment. If a color space other than "
666	    "sRGB is used, Uncalibrated (=FFFF.H) is set. Image data "
667	    "recorded as Uncalibrated can be treated as sRGB when it is "
668	    "converted to FlashPix."),
669	 { ESL_NNNN, ESL_NNNN, ESL_MMMM, ESL_NNNN, ESL_NNNN } },
670	{EXIF_TAG_PIXEL_X_DIMENSION, "PixelXDimension", "PixelXDimension",
671	 N_("Information specific to compressed data. When a "
672	    "compressed file is recorded, the valid width of the "
673	    "meaningful image must be recorded in this tag, whether or "
674	    "not there is padding data or a restart marker. This tag "
675	    "should not exist in an uncompressed file."),
676	 { ESL_NNNN, ESL_NNNN, ESL_NNNM, ESL_NNNN, ESL_NNNN } },
677	{EXIF_TAG_PIXEL_Y_DIMENSION, "PixelYDimension", "PixelYDimension",
678	 N_("Information specific to compressed data. When a compressed "
679	    "file is recorded, the valid height of the meaningful image "
680	    "must be recorded in this tag, whether or not there is padding "
681	    "data or a restart marker. This tag should not exist in an "
682	    "uncompressed file. "
683	    "Since data padding is unnecessary in the vertical direction, "
684	    "the number of lines recorded in this valid image height tag "
685	    "will in fact be the same as that recorded in the SOF."),
686	 { ESL_NNNN, ESL_NNNN, ESL_NNNM, ESL_NNNN, ESL_NNNN } },
687	{EXIF_TAG_RELATED_SOUND_FILE, "RelatedSoundFile",
688	 "RelatedSoundFile",
689	 N_("This tag is used to record the name of an audio file related "
690	    "to the image data. The only relational information "
691	    "recorded here is the Exif audio file name and extension (an "
692	    "ASCII string consisting of 8 characters + '.' + 3 "
693	    "characters). The path is not recorded. Stipulations on audio "
694	    "and file naming conventions are defined in the specification. "
695	    "When using this tag, audio files must be recorded in "
696	    "conformance to the Exif audio format. Writers are also allowed "
697	    "to store the data such as Audio within APP2 as FlashPix "
698	    "extension stream data. "
699	    "Audio files must be recorded in conformance to the Exif audio "
700	    "format. The mapping of Exif image files and audio files is done "
701	    "in any of three ways, [1], [2] and [3]. If multiple files "
702	    "are mapped to one file as in [2] or [3], the above "
703	    "format is used to record just one audio file name. If "
704	    "there are multiple audio files, the first recorded file is "
705	    "given. In the case of [3], for example, for the "
706	    "Exif image file \"DSC00001.JPG\" only  \"SND00001.WAV\" is "
707	    "given as the related Exif audio file. When there are three "
708	    "Exif audio files \"SND00001.WAV\", \"SND00002.WAV\" and "
709	    "\"SND00003.WAV\", the Exif image file name for each of them, "
710	    "\"DSC00001.JPG\", is indicated. By combining multiple "
711	    "relational information, a variety of playback possibilities "
712	    "can be supported. The method of using relational information "
713	    "is left to the implementation on the playback side. Since this "
714	    "information is an ASCII character string, it is terminated by "
715	    "NULL. When this tag is used to map audio files, the relation "
716	    "of the audio file to image data must also be indicated on the "
717	    "audio file end."),
718	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
719	{EXIF_TAG_INTEROPERABILITY_IFD_POINTER, "InteroperabilityIFDPointer",
720	 "InteroperabilityIFDPointer",
721	 N_("Interoperability IFD is composed of tags which stores the "
722	    "information to ensure the Interoperability and pointed "
723	    "by the following tag located in Exif IFD. "
724	    "The Interoperability structure of Interoperability IFD is "
725	    "the same as TIFF defined IFD structure "
726	    "but does not contain the "
727	    "image data characteristically compared with normal TIFF "
728	    "IFD."),
729	 { ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
730	{EXIF_TAG_FLASH_ENERGY, "FlashEnergy", N_("Flash Energy"),
731	 N_("Indicates the strobe energy at the time the image is "
732	    "captured, as measured in Beam Candle Power Seconds (BCPS)."),
733	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
734	{EXIF_TAG_SPATIAL_FREQUENCY_RESPONSE, "SpatialFrequencyResponse",
735	 N_("Spatial Frequency Response"),
736	 N_("This tag records the camera or input device spatial frequency "
737	    "table and SFR values in the direction of image width, "
738	    "image height, and diagonal direction, as specified in ISO "
739	    "12233."),
740	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
741	{EXIF_TAG_FOCAL_PLANE_X_RESOLUTION, "FocalPlaneXResolution",
742	 N_("Focal Plane x-Resolution"),
743	 N_("Indicates the number of pixels in the image width (X) direction "
744	    "per <FocalPlaneResolutionUnit> on the camera focal plane."),
745	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
746	{EXIF_TAG_FOCAL_PLANE_Y_RESOLUTION, "FocalPlaneYResolution",
747	 N_("Focal Plane y-Resolution"),
748	 N_("Indicates the number of pixels in the image height (V) direction "
749	    "per <FocalPlaneResolutionUnit> on the camera focal plane."),
750	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
751	{EXIF_TAG_FOCAL_PLANE_RESOLUTION_UNIT, "FocalPlaneResolutionUnit",
752	 N_("Focal Plane Resolution Unit"),
753	 N_("Indicates the unit for measuring <FocalPlaneXResolution> and "
754	    "<FocalPlaneYResolution>. This value is the same as the "
755	    "<ResolutionUnit>."),
756	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
757	{EXIF_TAG_SUBJECT_LOCATION, "SubjectLocation",
758	 N_("Subject Location"),
759	 N_("Indicates the location of the main subject in the scene. The "
760	    "value of this tag represents the pixel at the center of the "
761	    "main subject relative to the left edge, prior to rotation "
762	    "processing as per the <Rotation> tag. The first value "
763	    "indicates the X column number and the second indicates "
764	    "the Y row number."),
765	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
766	{EXIF_TAG_EXPOSURE_INDEX, "ExposureIndex", N_("Exposure Index"),
767	 N_("Indicates the exposure index selected on the camera or "
768	    "input device at the time the image is captured."),
769	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
770	{EXIF_TAG_SENSING_METHOD, "SensingMethod", N_("Sensing Method"),
771	 N_("Indicates the image sensor type on the camera or input "
772	    "device."),
773	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
774	{EXIF_TAG_FILE_SOURCE, "FileSource", N_("File Source"),
775	 N_("Indicates the image source. If a DSC recorded the image, "
776	    "the tag value of this tag always be set to 3, indicating "
777	    "that the image was recorded on a DSC."),
778	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
779	{EXIF_TAG_SCENE_TYPE, "SceneType", N_("Scene Type"),
780	 N_("Indicates the type of scene. If a DSC recorded the image, "
781	    "this tag value must always be set to 1, indicating that the "
782	    "image was directly photographed."),
783	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
784	{EXIF_TAG_NEW_CFA_PATTERN, "CFAPattern",
785	 N_("CFA Pattern"),
786	 N_("Indicates the color filter array (CFA) geometric pattern of the "
787	    "image sensor when a one-chip color area sensor is used. "
788	    "It does not apply to all sensing methods."),
789	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
790	{EXIF_TAG_CUSTOM_RENDERED, "CustomRendered", N_("Custom Rendered"),
791	 N_("This tag indicates the use of special processing on image "
792	    "data, such as rendering geared to output. When special "
793	    "processing is performed, the reader is expected to disable "
794	    "or minimize any further processing."),
795	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
796	{EXIF_TAG_EXPOSURE_MODE, "ExposureMode", N_("Exposure Mode"),
797	 N_("This tag indicates the exposure mode set when the image was "
798	    "shot. In auto-bracketing mode, the camera shoots a series of "
799	    "frames of the same scene at different exposure settings."),
800	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
801	{EXIF_TAG_WHITE_BALANCE, "WhiteBalance", N_("White Balance"),
802	 N_("This tag indicates the white balance mode set when the image "
803	    "was shot."),
804	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
805	{EXIF_TAG_DIGITAL_ZOOM_RATIO, "DigitalZoomRatio",
806	 N_("Digital Zoom Ratio"),
807	 N_("This tag indicates the digital zoom ratio when the image was "
808	    "shot. If the numerator of the recorded value is 0, this "
809	    "indicates that digital zoom was not used."),
810	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
811	{EXIF_TAG_FOCAL_LENGTH_IN_35MM_FILM, "FocalLengthIn35mmFilm",
812	 N_("Focal Length In 35mm Film"),
813	 N_("This tag indicates the equivalent focal length assuming a "
814	    "35mm film camera, in mm. A value of 0 means the focal "
815	    "length is unknown. Note that this tag differs from the "
816	    "FocalLength tag."),
817	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
818	{EXIF_TAG_SCENE_CAPTURE_TYPE, "SceneCaptureType",
819	 N_("Scene Capture Type"),
820	 N_("This tag indicates the type of scene that was shot. It can "
821	    "also be used to record the mode in which the image was "
822	    "shot. Note that this differs from the scene type "
823	    "<SceneType> tag."),
824	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
825	{EXIF_TAG_GAIN_CONTROL, "GainControl", N_("Gain Control"),
826	 N_("This tag indicates the degree of overall image gain "
827	    "adjustment."),
828	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
829	{EXIF_TAG_CONTRAST, "Contrast", N_("Contrast"),
830	 N_("This tag indicates the direction of contrast processing "
831	    "applied by the camera when the image was shot."),
832	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
833	{EXIF_TAG_SATURATION, "Saturation", N_("Saturation"),
834	 N_("This tag indicates the direction of saturation processing "
835	    "applied by the camera when the image was shot."),
836	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
837	{EXIF_TAG_SHARPNESS, "Sharpness", N_("Sharpness"),
838	 N_("This tag indicates the direction of sharpness processing "
839	    "applied by the camera when the image was shot."),
840	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
841	{EXIF_TAG_DEVICE_SETTING_DESCRIPTION, "DeviceSettingDescription",
842	 N_("Device Setting Description"),
843	 N_("This tag indicates information on the picture-taking "
844	    "conditions of a particular camera model. The tag is used "
845	    "only to indicate the picture-taking conditions in the "
846	    "reader."),
847	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
848	{EXIF_TAG_SUBJECT_DISTANCE_RANGE, "SubjectDistanceRange",
849	 N_("Subject Distance Range"),
850	 N_("This tag indicates the distance to the subject."),
851	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
852	{EXIF_TAG_IMAGE_UNIQUE_ID, "ImageUniqueID", N_("Image Unique ID"),
853	 N_("This tag indicates an identifier assigned uniquely to "
854	    "each image. It is recorded as an ASCII string equivalent "
855	    "to hexadecimal notation and 128-bit fixed length."),
856	 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
857	/* Not in EXIF 2.2 */
858	{EXIF_TAG_GAMMA, "Gamma", N_("Gamma"),
859	 N_("Indicates the value of coefficient gamma.")},
860	/* Not in EXIF 2.2 */
861	{EXIF_TAG_PRINT_IMAGE_MATCHING, "PrintImageMatching", N_("PRINT Image Matching"),
862	 N_("Related to Epson's PRINT Image Matching technology")},
863#endif
864	{0, NULL, NULL, NULL}
865};
866
867/* For now, do not use these functions. */
868
869/*!
870 * Return the number of entries in the EXIF tag table, including the
871 * terminating NULL entry.
872 */
873inline unsigned int
874exif_tag_table_count (void)
875{
876	return sizeof (ExifTagTable) / sizeof (ExifTagTable[0]);
877}
878
879
880ExifTag
881exif_tag_table_get_tag (unsigned int n)
882{
883	return (n < exif_tag_table_count ()) ? ExifTagTable[n].tag : 0;
884}
885
886const char *
887exif_tag_table_get_name (unsigned int n)
888{
889	return (n < exif_tag_table_count ()) ? ExifTagTable[n].name : NULL;
890}
891
892/*!
893 * Compares the tag with that in entry.
894 * \param[in] tag pointer to integer tag value
895 * \param[in] entry pointer to a struct TagEntry
896 * \return 0 if tags are equal, <0 if tag < entry, >0 if tag > entry
897 */
898static int
899match_tag(const void *tag, const void *entry)
900{
901	return *(int*)tag - ((struct TagEntry *)entry)->tag;
902}
903
904
905/*!
906 * Finds the first entry in the EXIF tag table with the given tag number
907 * using a binary search.
908 * \param[in] tag to find
909 * \return index into table, or -1 if not found
910 */
911static int
912exif_tag_table_first(ExifTag tag)
913{
914	int i;
915	struct TagEntry *entry = bsearch(&tag, ExifTagTable,
916		exif_tag_table_count()-1, sizeof(struct TagEntry), match_tag);
917	if (!entry)
918		return -1;	/* Not found */
919
920	/* Calculate index of found entry */
921	i = entry - ExifTagTable;
922
923	/* There may be other entries with the same tag number, so search
924	 * backwards to find the first
925	 */
926	while ((i > 0) && (ExifTagTable[i-1].tag == tag)) {
927		--i;
928	}
929	return i;
930}
931
932#define RECORDED \
933((ExifTagTable[i].esl[ifd][EXIF_DATA_TYPE_UNCOMPRESSED_CHUNKY] != EXIF_SUPPORT_LEVEL_NOT_RECORDED) || \
934 (ExifTagTable[i].esl[ifd][EXIF_DATA_TYPE_UNCOMPRESSED_PLANAR] != EXIF_SUPPORT_LEVEL_NOT_RECORDED) || \
935 (ExifTagTable[i].esl[ifd][EXIF_DATA_TYPE_UNCOMPRESSED_YCC] != EXIF_SUPPORT_LEVEL_NOT_RECORDED) || \
936 (ExifTagTable[i].esl[ifd][EXIF_DATA_TYPE_COMPRESSED] != EXIF_SUPPORT_LEVEL_NOT_RECORDED))
937
938const char *
939exif_tag_get_name_in_ifd (ExifTag tag, ExifIfd ifd)
940{
941	unsigned int i;
942	int first;
943
944	if (ifd >= EXIF_IFD_COUNT)
945		return NULL;
946	first = exif_tag_table_first(tag);
947	if (first < 0)
948		return NULL;
949
950	for (i = first; ExifTagTable[i].name; i++) {
951		if (ExifTagTable[i].tag == tag) {
952		   if (RECORDED)
953			   break;
954		} else
955			return NULL; /* Recorded tag not found in the table */
956	}
957	return ExifTagTable[i].name;
958}
959
960const char *
961exif_tag_get_title_in_ifd (ExifTag tag, ExifIfd ifd)
962{
963	unsigned int i;
964	int first;
965
966	/* FIXME: This belongs to somewhere else. */
967	/* libexif should use the default system locale.
968	 * If an application specifically requires UTF-8, then we
969	 * must give the application a way to tell libexif that.
970	 *
971	 * bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
972	 */
973	bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
974	if (ifd >= EXIF_IFD_COUNT)
975		return NULL;
976	first = exif_tag_table_first(tag);
977	if (first < 0)
978		return NULL;
979
980	for (i = first; ExifTagTable[i].name; i++) {
981		if (ExifTagTable[i].tag == tag) {
982		   if (RECORDED)
983			   break;
984		} else
985			return NULL; /* Recorded tag not found in the table */
986	}
987	return _(ExifTagTable[i].title);
988}
989
990const char *
991exif_tag_get_description_in_ifd (ExifTag tag, ExifIfd ifd)
992{
993	unsigned int i;
994	int first;
995
996	/* libexif should use the default system locale.
997	 * If an application specifically requires UTF-8, then we
998	 * must give the application a way to tell libexif that.
999	 *
1000	 * bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
1001	 */
1002	bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
1003
1004	if (ifd >= EXIF_IFD_COUNT)
1005		return NULL;
1006	first = exif_tag_table_first(tag);
1007	if (first < 0)
1008		return NULL;
1009
1010	for (i = first; ExifTagTable[i].name; i++) {
1011		if (ExifTagTable[i].tag == tag) {
1012			if (RECORDED)
1013				break;
1014		} else
1015			return NULL; /* Recorded tag not found in the table */
1016	}
1017
1018	/* GNU gettext acts strangely when given an empty string */
1019	if (!ExifTagTable[i].description || !*ExifTagTable[i].description)
1020		return "";
1021	return _(ExifTagTable[i].description);
1022}
1023
1024
1025/**********************************************************************
1026 * convenience functions
1027 **********************************************************************/
1028
1029/* generic part: iterate through IFD list and return first result */
1030typedef const char * (*get_stuff_func) (ExifTag tag, ExifIfd ifd);
1031
1032static const char *
1033exif_tag_get_stuff (ExifTag tag, get_stuff_func func)
1034{
1035	/* Search IFDs in this order, in decreasing order of number of valid tags */
1036	static const ExifIfd ifds[EXIF_IFD_COUNT] = {
1037		EXIF_IFD_EXIF,
1038		EXIF_IFD_0,
1039		EXIF_IFD_1,
1040		EXIF_IFD_INTEROPERABILITY,
1041		EXIF_IFD_GPS
1042	};
1043	int i;
1044	for (i=0; i<EXIF_IFD_COUNT; i++) {
1045		const char *result = func(tag, ifds[i]);
1046		if (result != NULL) {
1047			return result;
1048		}
1049	}
1050	return (const char *) NULL;
1051}
1052
1053/* explicit functions */
1054const char *
1055exif_tag_get_name (ExifTag tag)
1056{
1057	return exif_tag_get_stuff(tag, exif_tag_get_name_in_ifd);
1058}
1059
1060const char *
1061exif_tag_get_title (ExifTag tag)
1062{
1063	return exif_tag_get_stuff(tag, exif_tag_get_title_in_ifd);
1064}
1065
1066const char *
1067exif_tag_get_description (ExifTag tag)
1068{
1069	return exif_tag_get_stuff(tag, exif_tag_get_description_in_ifd);
1070}
1071
1072
1073
1074ExifTag
1075exif_tag_from_name (const char *name)
1076{
1077	unsigned int i;
1078	unsigned int result=0;
1079
1080	if (!name) return 0;
1081
1082	for (i = 0; ExifTagTable[i].name; i++)
1083		if (!strcmp (ExifTagTable[i].name, name))  {
1084		  	result = ExifTagTable[i].tag;
1085		  	break;
1086		}
1087	return result;
1088}
1089
1090/*! Return the support level of a tag in the given IFD with the given data
1091 * type. If the tag is not specified in the EXIF standard, this function
1092 * returns EXIF_SUPPORT_LEVEL_NOT_RECORDED.
1093 *
1094 * \param[in] tag EXIF tag
1095 * \param[in] ifd a valid IFD (not EXIF_IFD_COUNT)
1096 * \param[in] t a valid data type (not EXIF_DATA_TYPE_UNKNOWN)
1097 * \return the level of support for this tag
1098 */
1099static inline ExifSupportLevel
1100get_support_level_in_ifd (ExifTag tag, ExifIfd ifd, ExifDataType t)
1101{
1102	unsigned int i;
1103	int first = exif_tag_table_first(tag);
1104	if (first < 0)
1105		return EXIF_SUPPORT_LEVEL_NOT_RECORDED;
1106
1107	for (i = first; ExifTagTable[i].name; i++) {
1108		if (ExifTagTable[i].tag == tag) {
1109			const ExifSupportLevel supp = ExifTagTable[i].esl[ifd][t];
1110			if (supp != EXIF_SUPPORT_LEVEL_NOT_RECORDED)
1111				return supp;
1112			/* Try looking for another entry */
1113		} else {
1114			break; /* We've reached the end of the matching tags */
1115		}
1116	}
1117	return EXIF_SUPPORT_LEVEL_NOT_RECORDED;
1118}
1119
1120/*! Return the support level of a tag in the given IFD, regardless of the
1121 * data type. If the support level varies depending on the data type, this
1122 * function returns EXIF_SUPPORT_LEVEL_UNKNOWN. If the tag is not specified
1123 * in the EXIF standard, this function returns EXIF_SUPPORT_LEVEL_UNKNOWN.
1124 *
1125 * \param[in] tag EXIF tag
1126 * \param[in] ifd a valid IFD (not EXIF_IFD_COUNT)
1127 * \return the level of support for this tag
1128 */
1129static inline ExifSupportLevel
1130get_support_level_any_type (ExifTag tag, ExifIfd ifd)
1131{
1132	unsigned int i;
1133	int first = exif_tag_table_first(tag);
1134	if (first < 0)
1135		return EXIF_SUPPORT_LEVEL_UNKNOWN;
1136
1137	for (i = first; ExifTagTable[i].name; i++) {
1138		if (ExifTagTable[i].tag == tag) {
1139			/*
1140			 * Check whether the support level is the same for all possible
1141			 * data types and isn't marked not recorded.
1142			 */
1143			const ExifSupportLevel supp = ExifTagTable[i].esl[ifd][0];
1144			/* If level is not recorded, keep searching for another */
1145			if (supp != EXIF_SUPPORT_LEVEL_NOT_RECORDED) {
1146				unsigned int dt;
1147				for (dt = 0; dt < EXIF_DATA_TYPE_COUNT; ++dt) {
1148					if (ExifTagTable[i].esl[ifd][dt] != supp)
1149						break;
1150				}
1151				if (dt == EXIF_DATA_TYPE_COUNT)
1152					/* Support level is always the same, so return it */
1153					return supp;
1154			}
1155			/* Keep searching the table for another tag for our IFD */
1156		} else {
1157			break; /* We've reached the end of the matching tags */
1158		}
1159	}
1160	return EXIF_SUPPORT_LEVEL_UNKNOWN;
1161}
1162
1163ExifSupportLevel
1164exif_tag_get_support_level_in_ifd (ExifTag tag, ExifIfd ifd, ExifDataType t)
1165{
1166	if (ifd >= EXIF_IFD_COUNT)
1167		return EXIF_SUPPORT_LEVEL_UNKNOWN;
1168
1169	if (t >= EXIF_DATA_TYPE_COUNT)
1170		return get_support_level_any_type (tag, ifd);
1171
1172	return get_support_level_in_ifd (tag, ifd, t);
1173}
1174