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