2004-05-03 Lutz Mueller <lutz@users.sourceforge.net>
[platform/upstream/libexif.git] / libexif / exif-tag.c
1 /* exif-tag.c
2  *
3  * Copyright © 2001 Lutz Müller <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., 59 Temple Place - Suite 330,
18  * Boston, MA 02111-1307, USA.
19  */
20
21 #include "config.h"
22 #include "exif-tag.h"
23 #include "i18n.h"
24
25 #include <stdlib.h>
26
27 static struct {
28         ExifTag tag;
29         const char *name;
30         const char *title;
31         const char *description;
32 } ExifTagTable[] = {
33         {EXIF_TAG_INTEROPERABILITY_INDEX, "InteroperabilityIndex",
34          "InteroperabilityIndex",
35          N_("Indicates the identification of the Interoperability rule. "
36             "Use \"R98\" for stating ExifR98 Rules. Four bytes used "
37             "including the termination code (NULL). see the separate "
38             "volume of Recommended Exif Interoperability Rules (ExifR98) "
39             "for other tags used for ExifR98.")},
40         {EXIF_TAG_INTEROPERABILITY_VERSION, "InteroperabilityVersion",
41          "InteroperabilityVersion", ""},
42         {EXIF_TAG_IMAGE_WIDTH, "ImageWidth", N_("Image Width"),
43          N_("The number of colums of image data, equal to the number of "
44             "pixels per row. In JPEG compressed data a JPEG marker is "
45             "used instead of this tag.")},
46         {EXIF_TAG_IMAGE_LENGTH, "ImageLength", N_("Image Length"),
47          N_("The number of rows of image data. In JPEG compressed data a "
48             "JPEG marker is used instead of this tag.")},
49         {EXIF_TAG_BITS_PER_SAMPLE, "BitsPerSample", N_("Bits per Sample"),
50          N_("The number of bits per image component. In this standard each "
51             "component of the image is 8 bits, so the value for this "
52             "tag is 9. See also <SamplesPerPixel>. In JPEG compressed data "
53             "a JPEG marker is used instead of this tag.")},
54         {EXIF_TAG_COMPRESSION, "Compression", N_("Compression"),
55          N_("The compression scheme used for the image data. When a "
56             "primary image is JPEG compressed, this designation is "
57             "not necessary and is omitted. When thumbnails use JPEG "
58             "compression, this tag value is set to 6.")},
59         {EXIF_TAG_PHOTOMETRIC_INTERPRETATION, "PhotometricInterpretation",
60          N_("Photometric Interpretation"),
61          N_("The pixel composition. In JPEG compressed data a JPEG "
62             "marker is used instead of this tag.")},
63         {EXIF_TAG_FILL_ORDER, "FillOrder", N_("Fill Order"), ""},
64         {EXIF_TAG_DOCUMENT_NAME, "DocumentName", N_("Document Name"), ""},
65         {EXIF_TAG_IMAGE_DESCRIPTION, "ImageDescription",
66          N_("Image Description"),
67          N_("A character string giving the title of the image. It may be "
68             "a comment such as \"1988 company picnic\" or "
69             "the like. Two-bytes character codes cannot be used. "
70             "When a 2-bytes code is necessary, the Exif Private tag "
71             "<UserComment> is to be used.")},
72         {EXIF_TAG_MAKE, "Make", N_("Manufacturer"),
73          N_("The manufacturer of the recording "
74             "equipment. This is the manufacturer of the DSC, scanner, "
75             "video digitizer or other equipment that generated the "
76             "image. When the field is left blank, it is treated as "
77             "unknown.")},
78         {EXIF_TAG_MODEL, "Model", N_("Model"),
79          N_("The model name or model number of the equipment. This is the "
80             "model name or number of the DSC, scanner, video digitizer "
81             "or other equipment that generated the image. When the field "
82             "is left blank, it is treated as unknown.")},
83         {EXIF_TAG_STRIP_OFFSETS, "StripOffsets", N_("Strip Offsets"),
84          N_("For each strip, the byte offset of that strip. It is "
85             "recommended that this be selected so the number of strip "
86             "bytes does not exceed 64 Kbytes. With JPEG compressed "
87             "data this designation is not needed and is omitted. See also "
88             "<RowsPerStrip> and <StripByteCounts>.")},
89         {EXIF_TAG_ORIENTATION, "Orientation", N_("Orientation"),
90          N_("The image orientation viewed in terms of rows and colums.")},
91         {EXIF_TAG_SAMPLES_PER_PIXEL, "SamplesPerPixel",
92          N_("Samples per Pixel"),
93          N_("The number of components per pixel. Since this standard applies "
94             "to RGB and YCbCr images, the value set for this tag is 3. "
95             "In JPEG compressed data a JPEG marker is used instead of this "
96             "tag.")},
97         {EXIF_TAG_ROWS_PER_STRIP, "RowsPerStrip", N_("Rows per Strip"),
98          N_("The number of rows per strip. This is the number of rows "
99             "in the image of one strip when an image is divided into "
100             "strips. With JPEG compressed data this designation is not "
101             "needed and is omitted. See also <RowsPerStrip> and "
102             "<StripByteCounts>.")},
103         {EXIF_TAG_STRIP_BYTE_COUNTS, "StripByteCounts", N_("Strip Byte Count"),
104          N_("The total number of bytes in each strip. With JPEG compressed "
105             "data this designation is not needed and is omitted.")},
106         {EXIF_TAG_X_RESOLUTION, "XResolution", N_("x-Resolution"),
107          N_("The number of pixels per <ResolutionUnit> in the <ImageWidth> "
108             "direction. When the image resolution is unknown, 72 [dpi] "
109             "is designated.")},
110         {EXIF_TAG_Y_RESOLUTION, "YResolution", N_("y-Resolution"),
111          N_("The number of pixels per <ResolutionUnit> in the <ImageLength> "
112             "direction. The same value as <XResolution> is designated.")},
113         {EXIF_TAG_PLANAR_CONFIGURATION, "PlanarConfiguration",
114          N_("Planar Configuration"),
115          N_("Indicates whether pixel components are recorded in a chunky "
116             "or planar format. In JPEG compressed files a JPEG marker "
117             "is used instead of this tag. If this field does not exist, "
118             "the TIFF default of 1 (chunky) is assumed.")},
119         {EXIF_TAG_RESOLUTION_UNIT, "ResolutionUnit", N_("Resolution Unit"),
120          N_("The unit for measuring <XResolution> and <YResolution>. The same "
121             "unit is used for both <XResolution> and <YResolution>. If "
122             "the image resolution is unknown, 2 (inches) is designated.")},
123         {EXIF_TAG_TRANSFER_FUNCTION, "TransferFunction",
124          N_("Transfer Function"),
125          N_("A transfer function for the image, described in tabular style. "
126             "Normally this tag is not necessary, since color space is "
127             "specified in the color space information tag (<ColorSpace>).")},
128         {EXIF_TAG_SOFTWARE, "Software", N_("Software"),
129          N_("This tag records the name and version of the software or "
130             "firmware of the camera or image input device used to "
131             "generate the image. The detailed format is not specified, but "
132             "it is recommended that the example shown below be "
133             "followed. When the field is left blank, it is treated as "
134             "unknown.")},
135         {EXIF_TAG_DATE_TIME, "DateTime", N_("Date and Time"),
136          N_("The date and time of image creation. In this standard "
137             "(EXIF-2.1) it is the date and time the file was changed.")},
138         {EXIF_TAG_ARTIST, "Artist", N_("Artist"),
139          N_("This tag records the name of the camera owner, photographer or "
140             "image creator. The detailed format is not specified, but it is "
141             "recommended that the information be written as in the example "
142             "below for ease of Interoperability. When the field is "
143             "left blank, it is treated as unknown.")},
144         {EXIF_TAG_WHITE_POINT, "WhitePoint", N_("White Point"),
145          N_("The chromaticity of the white point of the image. Normally "
146             "this tag is not necessary, since color space is specified "
147             "in the colorspace information tag (<ColorSpace>).")},
148         {EXIF_TAG_PRIMARY_CHROMATICITIES, "PrimaryChromaticities",
149          N_("Primary Chromaticities"),
150          N_("The chromaticity of the three primary colors of the image. "
151             "Normally this tag is not necessary, since colorspace is "
152             "specified in the colorspace information tag (<ColorSpace>).")},
153         {EXIF_TAG_TRANSFER_RANGE, "TransferRange", N_("Transfer Range"), ""},
154         {EXIF_TAG_JPEG_PROC, "JPEGProc", "JPEGProc", ""},
155         {EXIF_TAG_JPEG_INTERCHANGE_FORMAT, "JPEGInterchangeFormat",
156          N_("JPEG Interchange Format"),
157          N_("The offset to the start byte (SOI) of JPEG compressed "
158             "thumbnail data. This is not used for primary image "
159             "JPEG data.")},
160         {EXIF_TAG_JPEG_INTERCHANGE_FORMAT_LENGTH,
161          "JPEGInterchangeFormatLength", N_("JPEG Interchange Format Length"),
162          N_("The number of bytes of JPEG compressed thumbnail data. This "
163             "is not used for primary image JPEG data. JPEG thumbnails "
164             "are not divided but are recorded as a continuous JPEG "
165             "bitstream from SOI to EOI. Appn and COM markers should "
166             "not be recorded. Compressed thumbnails must be recorded in no "
167             "more than 64 Kbytes, including all other data to be "
168             "recorded in APP1.")},
169         {EXIF_TAG_YCBCR_COEFFICIENTS, "YCbCrCoefficients",
170          N_("YCbCr Coefficients"),
171          N_("The matrix coefficients for transformation from RGB to YCbCr "
172             "image data. No default is given in TIFF; but here the "
173             "value given in Appendix E, \"Color Space Guidelines\", is used "
174             "as the default. The color space is declared in a "
175             "color space information tag, with the default being the value "
176             "that gives the optimal image characteristics "
177             "Interoperability this condition.")},
178         {EXIF_TAG_YCBCR_SUB_SAMPLING, "YCbCrSubSampling",
179          N_("YCbCr Sub-Sampling"),
180          N_("The sampling ratio of chrominance components in relation to the "
181             "luminance component. In JPEG compressed data a JPEG marker "
182             "is used instead of this tag.")},
183         {EXIF_TAG_YCBCR_POSITIONING, "YCbCrPositioning",
184          N_("YCbCr Positioning"),
185          N_("The position of chrominance components in relation to the "
186             "luminance component. This field is designated only for "
187             "JPEG compressed data or uncompressed YCbCr data. The TIFF "
188             "default is 1 (centered); but when Y:Cb:Cr = 4:2:2 it is "
189             "recommended in this standard that 2 (co-sited) be used to "
190             "record data, in order to improve the image quality when viewed "
191             "on TV systems. When this field does not exist, the reader shall "
192             "assume the TIFF default. In the case of Y:Cb:Cr = 4:2:0, the "
193             "TIFF default (centered) is recommended. If the reader "
194             "does not have the capability of supporting both kinds of "
195             "<YCbCrPositioning>, it shall follow the TIFF default regardless "
196             "of the value in this field. It is preferable that readers "
197             "be able to support both centered and co-sited positioning.")},
198         {EXIF_TAG_REFERENCE_BLACK_WHITE, "ReferenceBlackWhite",
199          N_("Reference Black/White"),
200          N_("The reference black point value and reference white point "
201             "value. No defaults are given in TIFF, but the values "
202             "below are given as defaults here. The color space is declared "
203             "in a color space information tag, with the default "
204             "being the value that gives the optimal image characteristics "
205             "Interoperability these conditions.")},
206         {EXIF_TAG_RELATED_IMAGE_FILE_FORMAT, "RelatedImageFileFormat",
207          "RelatedImageFileFormat", ""},
208         {EXIF_TAG_RELATED_IMAGE_WIDTH, "RelatedImageWidth",
209          "RelatedImageWidth", ""},
210         {EXIF_TAG_RELATED_IMAGE_LENGTH, "RelatedImageLength",
211          "RelatedImageLength", ""},
212         {EXIF_TAG_CFA_REPEAT_PATTERN_DIM, "CFARepeatPatternDim",
213          "CFARepeatPatternDim", ""},
214         {EXIF_TAG_CFA_PATTERN, "CFAPattern",
215          N_("CFA Pattern"),
216          N_("Indicates the color filter array (CFA) geometric pattern of the "
217             "image sensor when a one-chip color area sensor is used. "
218             "It does not apply to all sensing methods.")},
219         {EXIF_TAG_BATTERY_LEVEL, "BatteryLevel", N_("Battery Level"), ""},
220         {EXIF_TAG_COPYRIGHT, "Copyright", N_("Copyright"),
221          N_("Copyright information. In this standard the tag is used to "
222             "indicate both the photographer and editor copyrights. It is "
223             "the copyright notice of the person or organization claiming "
224             "rights to the image. The Interoperability copyright "
225             "statement including date and rights should be written in this "
226             "field; e.g., \"Copyright, John Smith, 19xx. All rights "
227             "reserved.\". In this standard the field records both the "
228             "photographer and editor copyrights, with each recorded in a "
229             "separate part of the statement. When there is a clear "
230             "distinction between the photographer and editor copyrights, "
231             "these are to be written in the order of photographer followed "
232             "by editor copyright, separated by NULL (in this case, "
233             "since the statement also ends with a NULL, there are two NULL "
234             "codes) (see example 1). When only the photographer is given, "
235             "it is terminated by one NULL code (see example 2). When only "
236             "the editor copyright is given, "
237             "the photographer copyright part consists of one space followed "
238             "by a terminating NULL code, then the editor copyright is given "
239             "(see example 3). When the field is left blank, it is treated "
240             "as unknown.")},
241         {EXIF_TAG_EXPOSURE_TIME, "ExposureTime", N_("Exposure Time"),
242          N_("Exposure time, given in seconds (sec).")},
243         {EXIF_TAG_FNUMBER, "FNumber", "FNumber",
244          N_("The F number.")},
245         {EXIF_TAG_IPTC_NAA, "IPTC/NAA", "IPTC/NAA", ""},
246         {EXIF_TAG_EXIF_IFD_POINTER, "ExifIFDPointer", "ExifIFDPointer",
247          N_("A pointer to the Exif IFD. Interoperability, Exif IFD has the "
248             "same structure as that of the IFD specified in TIFF. "
249             "ordinarily, however, it does not contain image data as in "
250             "the case of TIFF.")},
251         {EXIF_TAG_INTER_COLOR_PROFILE, "InterColorProfile",
252          "InterColorProfile", ""},
253         {EXIF_TAG_EXPOSURE_PROGRAM, "ExposureProgram", "ExposureProgram",
254          N_("The class of the program used by the camera to set exposure "
255             "when the picture is taken.")},
256         {EXIF_TAG_SPECTRAL_SENSITIVITY, "SpectralSensitivity",
257          N_("Spectral Sensitivity"),
258          N_("Indicates the spectral sensitivity of each channel of the "
259             "camera used. The tag value is an ASCII string compatible "
260             "with the standard developed by the ASTM Technical committee.")},
261         {EXIF_TAG_GPS_INFO_IFD_POINTER, "GPSInfoIFDPointer", 
262          "GPSInfoIFDPointer",
263          N_("A pointer to the GPS Info IFD. The "
264             "Interoperability structure of the GPS Info IFD, like that of "
265             "Exif IFD, has no image data.")},
266 #if 0
267         {EXIF_TAG_GPS_VERSION_ID, "GPSVersionID", "",
268          N_("Indicates the version of <GPSInfoIFD>. The version is given "
269             "as 2.0.0.0. This tag is mandatory when <GPSInfo> tag is "
270             "present. (Note: The <GPSVersionID tag is given in bytes, "
271             "unlike the <ExifVersion> tag. When the version is "
272             "2.0.0.0, the tag value is 02000000.H).")},
273         {EXIF_TAG_GPS_LATITUDE_REF, "GPSLatitudeRef", ""
274          N_("Indicates whether the latitude is north or south latitude. The "
275             "ASCII value 'N' indicates north latitude, and 'S' is south "
276             "latitude.")},
277         {EXIF_TAG_GPS_LATITUDE, "GPSLatitude", ""
278          N_("Indicates the latitude. The latitude is expressed as three "
279             "RATIONAL values giving the degrees, minutes, and seconds, "
280             "respectively. When degrees, minutes and seconds are expressed, "
281             "the format is dd/1,mm/1,ss/1. When degrees and minutes are used "
282             "and, for example, fractions of minutes are given up to two "
283             "two decimal places, the format is dd/1,mmmm/100,0/1.")},
284         {EXIF_TAG_GPS_LONGITUDE_REF, "GPSLongitudeRef", ""
285          N_("Indicates whether the longitude is east or west longitude. "
286             "ASCII 'E' indicates east longitude, and 'W' is west "
287             "longitude.")},
288         {EXIF_TAG_GPS_LONGITUDE, "GPSLongitude", ""
289          N_("Indicates the longitude. The longitude is expressed as three "
290             "RATIONAL values giving the degrees, minutes, and seconds, "
291             "respectively. When degrees, minutes and seconds are expressed, "
292             "the format is ddd/1,mm/1,ss/1. When degrees and minutes are "
293             "used and, for example, fractions of minutes are given up to "
294             "two decimal places, the format is ddd/1,mmmm/100,0/1.")}, 
295 #endif
296         {EXIF_TAG_ISO_SPEED_RATINGS, "ISOSpeedRatings",
297          N_("ISO Speed Ratings"),
298          N_("Indicates the ISO Speed and ISO Latitude of the camera or "
299             "input device as specified in ISO 12232.")},
300         {EXIF_TAG_OECF, "OECF", "OECF",
301          N_("Indicates the Opto-Electoric Conversion Function (OECF) "
302             "specified in ISO 14524. <OECF> is the relationship between "
303             "the camera optical input and the image values.")},
304         {EXIF_TAG_EXIF_VERSION, "ExifVersion", N_("Exif Version"),
305          N_("The version of this standard supported. Nonexistence of this "
306             "field is taken to mean nonconformance to the standard.")},
307         {EXIF_TAG_DATE_TIME_ORIGINAL, "DateTimeOriginal",
308          N_("Date and Time (original)"),
309          N_("The date and time when the original image data was generated. "
310             "For a digital still camera "
311             "the date and time the picture was taken are recorded.")},
312         {EXIF_TAG_DATE_TIME_DIGITIZED, "DateTimeDigitized",
313          N_("Date and Time (digitized)"),
314          N_("The date and time when the image was stored as digital data. ")},
315         {EXIF_TAG_COMPONENTS_CONFIGURATION, "ComponentsConfiguration",
316          "ComponentsConfiguration",
317          N_("Information specific to compressed data. The channels of "
318             "each component are arranged in order from the 1st "
319             "component to the 4th. For uncompressed data the data "
320             "arrangement is given in the <PhotometricInterpretation> tag. "
321             "However, since <PhotometricInterpretation> can only "
322             "express the order of Y, Cb and Cr, this tag is provided "
323             "for cases when compressed data uses components other than "
324             "Y, Cb, and Cr and to enable support of other sequences.")},
325         {EXIF_TAG_COMPRESSED_BITS_PER_PIXEL, "CompressedBitsPerPixel",
326          N_("Compressed Bits per Pixel"),
327          N_("Information specific to compressed data. The compression mode "
328             "used for a compressed image is indicated in unit bits "
329             "per pixel.")},
330         {EXIF_TAG_SHUTTER_SPEED_VALUE, "ShutterSpeedValue", N_("Shutter speed"),
331          N_("Shutter speed. The unit is the APEX (Additive System of "
332             "Photographic Exposure) setting (see Appendix C).")},
333         {EXIF_TAG_APERTURE_VALUE, "ApertureValue", N_("Aperture"),
334          N_("The lens aperture. The unit is the APEX value.")},
335         {EXIF_TAG_BRIGHTNESS_VALUE, "BrightnessValue", N_("Brightness"),
336          N_("The value of brightness. The unit is the APEX value. "
337             "Ordinarily it is given in the range of -99.99 to 99.99.")},
338         {EXIF_TAG_EXPOSURE_BIAS_VALUE, "ExposureBiasValue",
339          N_("Exposure Bias"),
340          N_("The exposure bias. The units is the APEX value. Ordinarily "
341             "it is given in the range of -99.99 to 99.99.")},
342         {EXIF_TAG_MAX_APERTURE_VALUE, "MaxApertureValue", "MaxApertureValue",
343          N_("The smallest F number of the lens. The unit is the APEX value. "
344             "Ordinarily it is given in the range of 00.00 to 99.99, "
345             "but it is not limited to this range.")},
346         {EXIF_TAG_SUBJECT_DISTANCE, "SubjectDistance",
347          N_("Subject Distance"),
348          N_("The distance to the subject, given in meters.")},
349         {EXIF_TAG_METERING_MODE, "MeteringMode", N_("Metering Mode"),
350          N_("The metering mode.")},
351         {EXIF_TAG_LIGHT_SOURCE, "LightSource", N_("Light Source"),
352          N_("The kind of light source.")},
353         {EXIF_TAG_FLASH, "Flash", N_("Flash"),
354          N_("This tag is recorded when an image is taken using a strobe "
355             "light (flash).")},
356         {EXIF_TAG_FOCAL_LENGTH, "FocalLength", N_("Focal Length"),
357          N_("The actual focal length of the lens, in mm. Conversion is not "
358             "made to the focal length of a 35 mm film camera.")},
359         {EXIF_TAG_MAKER_NOTE, "MakerNote", N_("Maker Note"),
360          N_("A tag for manufacturers of Exif writers to record any desired "
361             "information. The contents are up to the manufacturer.")},
362         {EXIF_TAG_USER_COMMENT, "UserComment", N_("User Comment"),
363          N_("A tag for Exif users to write keywords or comments on the image "
364             "besides those in <ImageDescription>, and without the "
365             "character code limitations of the <ImageDescription> tag. The "
366             "character code used in the <UserComment> tag is identified "
367             "based on an ID code in a fixed 8-byte area at the start of "
368             "the tag data area. The unused portion of the area is padded "
369             "with NULL (\"00.h\"). ID codes are assigned by means of "
370             "registration. The designation method and references for each "
371             "character code are given in Table 6. The value of CountN "
372             "is determinated based on the 8 bytes in the character code "
373             "area and the number of bytes in the user comment part. Since "
374             "the TYPE is not ASCII, NULL termination is not necessary "
375             "(see Fig. 9). "
376             "The ID code for the <UserComment> area may be a Defined code "
377             "such as JIS or ASCII, or may be Undefined. The Undefined name "
378             "is UndefinedText, and the ID code is filled with 8 bytes of all "
379             "\"NULL\" (\"00.H\"). An Exif reader that reads the "
380             "<UserComment> tag must have a function for determining the "
381             "ID code. This function is not required in Exif readers that "
382             "do not use the <UserComment> tag (see Table 7). "
383             "When a <UserComment> area is set aside, it is recommended that "
384             "the ID code be ASCII and that the following user comment "
385             "part be filled with blank characters [20.H].")},
386         {EXIF_TAG_SUB_SEC_TIME, "SubsecTime", "SubsecTime",
387          N_("A tag used to record fractions of seconds for the "
388             "<DateTime> tag.")},
389         {EXIF_TAG_SUB_SEC_TIME_ORIGINAL, "SubSecTimeOriginal",
390          "SubSecTimeOriginal",
391          N_("A tag used to record fractions of seconds for the "
392             "<DateTimeOriginal> tag.")},
393         {EXIF_TAG_SUB_SEC_TIME_DIGITIZED, "SubSecTimeDigitized",
394          "SubSecTimeDigitized",
395          N_("A tag used to record fractions of seconds for the "
396             "<DateTimeDigitized> tag.")},
397         {EXIF_TAG_FLASH_PIX_VERSION, "FlashPixVersion", "FlashPixVersion",
398          N_("The FlashPix format version supported by a FPXR file.")},
399         {EXIF_TAG_COLOR_SPACE, "ColorSpace", N_("Color Space"),
400          N_("The color space information tag is always "
401             "recorded as the color space specifier. Normally sRGB (=1) "
402             "is used to define the color space based on the PC monitor "
403             "conditions and environment. If a color space other than "
404             "sRGB is used, Uncalibrated (=FFFF.H) is set. Image data "
405             "recorded as Uncalibrated can be treated as sRGB when it is "
406             "converted to FlashPix. On sRGB see Appendix E.")},
407         {EXIF_TAG_PIXEL_X_DIMENSION, "PixelXDimension", "PixelXDimension",
408          N_("Information specific to compressed data. When a "
409             "compressed file is recorded, the valid width of the "
410             "meaningful image must be recorded in this tag, whether or "
411             "not there is padding data or a restart marker. This tag "
412             "should not exist in an uncompressed file. For details see "
413             "section 2.8.1 and Appendix F.")},
414         {EXIF_TAG_PIXEL_Y_DIMENSION, "PixelYDimension", "PixelYDimension",
415          N_("Information specific to compressed data. When a compressed "
416             "file is recorded, the valid height of the meaningful image "
417             "must be recorded in this tag, whether or not there is padding "
418             "data or a restart marker. This tag should not exist in an "
419             "uncompressed file. For details see section 2.8.1 and Appendix "
420             "F. Since data padding is unnecessary in the vertical direction, "
421             "the number of lines recorded in this valid image height tag "
422             "will in fact be the same as that recorded in the SOF.")},
423         {EXIF_TAG_RELATED_SOUND_FILE, "RelatedSoundFile",
424          "RelatedSoundFile",
425          N_("This tag is used to record the name of an audio file related "
426             "to the image data. The only relational information "
427             "recorded here is the Exif audio file name and extension (an "
428             "ASCII string consisting of 8 characters + '.' + 3 "
429             "characters). The path is not recorded. Stipulations on audio "
430             "are given in  section 3.6.3. File naming conventions are "
431             "given in section 3.7.1. "
432             "When using this tag, audio files must be recorded in "
433             "conformance to the Exif audio format. Writers are also allowed "
434             "to store the data such as Audio within APP2 as FlashPix "
435             "extension stream data. "
436             "Audio files must be recorded in conformance to the Exif audio "
437             "format. The mapping of Exif image files and audio files is done "
438             "in any of the three ways shown in Table 8. If multiple files "
439             "are mapped to one file as in [2] or [3] of this table, the above "
440             "format is used to record just one audio file name. If "
441             "there are multiple audio files, the first recorded file is "
442             "given. In the case of [3] in Table 8, for example, for the "
443             "Exif image file \"DSC00001.JPG\" only  \"SND00001.WAV\" is "
444             "given as the related Exif audio file. When there are three "
445             "Exif audio files \"SND00001.WAV\", \"SND00002.WAV\" and "
446             "\"SND00003.WAV\", the Exif image file name for each of them, "
447             "\"DSC00001.JPG\", is indicated. By combining multiple "
448             "relational information, a variety of playback possibilities "
449             "can be supported. The method of using relational information "
450             "is left to the implementation on the playback side. Since this "
451             "information is an ASCII character string, it is terminated by "
452             "NULL. When this tag is used to map audio files, the relation "
453             "of the audio file to image data must also be indicated on the "
454             "audio file end.")},
455         {EXIF_TAG_INTEROPERABILITY_IFD_POINTER, "InteroperabilityIFDPointer",
456          "InteroperabilityIFDPointer",
457          N_("Interoperability IFD is composed of tags which stores the "
458             "information to ensure the Interoperability and pointed "
459             "by the following tag located in Exif IFD. "
460             "The Interoperability structure of Interoperability IFD is "
461             "the same as TIFF defined IFD structure "
462             "but does not contain the "
463             "image data characteristically compared with normal TIFF "
464             "IFD.")},
465         {EXIF_TAG_FLASH_ENERGY, "FlashEnergy", N_("Flash Energy"),
466          N_("Indicates the strobe energy at the time the image is "
467             "captured, as measured in Beam Candle Power Seconds (BCPS).")},
468         {EXIF_TAG_SPATIAL_FREQUENCY_RESPONSE, "SpatialFrequencyResponse",
469          N_("Spatial Frequency Response"),
470          N_("This tag records the camera or input device spatial frequency "
471             "table and SFR values in the direction of image width, "
472             "image height, and diagonal direction, as specified in ISO "
473             "12233.")},
474         {EXIF_TAG_FOCAL_PLANE_X_RESOLUTION, "FocalPlaneXResolution",
475          N_("Focal Plane x-Resolution"),
476          N_("Indicates the number of pixels in the image width (X) direction "
477             "per <FocalPlaneResolutionUnit> on the camera focal plane.")},
478         {EXIF_TAG_FOCAL_PLANE_Y_RESOLUTION, "FocalPlaneYResolution",
479          N_("Focal Plane y-Resolution"),
480          N_("Indicates the number of pixels in the image height (V) direction "
481             "per <FocalPlaneResolutionUnit> on the camera focal plane.")},
482         {EXIF_TAG_FOCAL_PLANE_RESOLUTION_UNIT, "FocalPlaneResolutionUnit",
483          N_("Focal Plane Resolution Unit"),
484          N_("Indicates the unit for measuring <FocalPlaneXResolution> and "
485             "<FocalPlaneYResolution>. This value is the same as the "
486             "<ResolutionUnit>.")},
487         {EXIF_TAG_SUBJECT_LOCATION, "SubjectLocation",
488          N_("Subject Location"),
489          N_("Indicates the location of the main subject in the scene. The "
490             "value of this tag represents the pixel at the center of the "
491             "main subject relative to the left edge, prior to rotation "
492             "processing as per the <Rotation> tag. The first value "
493             "indicates the X column number and second indicates "
494             "the Y row number.")},
495         {EXIF_TAG_EXPOSURE_INDEX, "ExposureIndex", N_("Exposure index"),
496          N_("Indicates the exposure index selected on the camera or "
497             "input device at the time the image is captured.")},
498         {EXIF_TAG_SENSING_METHOD, "SensingMethod", N_("Sensing Method"),
499          N_("Indicates the image sensor type on the camera or input "
500             "device.")},
501         {EXIF_TAG_FILE_SOURCE, "FileSource", N_("File Source"),
502          N_("Indicates the image source. If a DSC recorded the image, "
503             "this tag value of this tag always be set to 3, indicating "
504             "that the image was recorded on a DSC.")},
505         {EXIF_TAG_SCENE_TYPE, "SceneType", N_("Scene Type"),
506          N_("Indicates the type of scene. If a DSC recorded the image, "
507             "this tag value must always be set to 1, indicating that the "
508             "image was directly photographed.")},
509         {EXIF_TAG_NEW_CFA_PATTERN, "CFAPattern",
510          N_("CFA Pattern"),
511          N_("Indicates the color filter array (CFA) geometric pattern of the "
512             "image sensor when a one-chip color area sensor is used. "
513             "It does not apply to all sensing methods.")},
514         {EXIF_TAG_SUBJECT_AREA, "SubjectArea", N_("Subject Area"),
515          N_("This tag indicates the location and area of the main subject "
516             "in the overall scene.")},
517         {EXIF_TAG_CUSTOM_RENDERED, "CustomRendered", N_("Custom Rendered"),
518          N_("This tag indicates the use of special processing on image "
519             "data, such as rendering geared to output. When special "
520             "processing is performed, the reader is expected to disable "
521             "or minimize any further processing.")},
522         {EXIF_TAG_EXPOSURE_MODE, "ExposureMode", N_("Exposure Mode"),
523          N_("This tag indicates the exposure mode set when the image was "
524             "shot. In auto-bracketing mode, the camera shoots a series of "
525             "frames of the same scene at different exposure settings.")},
526         {EXIF_TAG_WHITE_BALANCE, "WhiteBalance", N_("White Balance"),
527          N_("This tag indicates the white balance mode set when the image "
528             "was shot.")},
529         {EXIF_TAG_DIGITAL_ZOOM_RATIO, "DigitalZoomRatio",
530          N_("Digital Zoom Ratio"),
531          N_("This tag indicates the digital zoom ratio when the image was "
532             "shot. If the numerator of the recorded value is 0, this "
533             "indicates that digital zoom was not used.")},
534         {EXIF_TAG_FOCAL_LENGTH_IN_35MM_FILM, "FocalLengthIn35mmFilm",
535          N_("Focal Length In 35mm Film"),
536          N_("This tag indicates the equivalent focal length assuming a "
537             "35mm film camera, in mm. A value of 0 means the focal "
538             "length is unknown. Note that this tag differs from the "
539             "FocalLength tag.")},
540         {EXIF_TAG_SCENE_CAPTURE_TYPE, "SceneCaptureType",
541          N_("Scene Capture Type"),
542          N_("This tag indicates the type of scene that was shot. It can "
543             "also be used to record the mode in which the image was "
544             "shot. Note that this differs from the scene type "
545             "(SceneType) tag.")},
546         {EXIF_TAG_GAIN_CONTROL, "GainControl", N_("Gain Control"),
547          N_("This tag indicates the degree of overall image gain "
548             "adjustment.")},
549         {EXIF_TAG_CONTRAST, "Contrast", N_("Contrast"),
550          N_("This tag indicates the direction of contrast processing "
551             "applied by the camera when the image was shot.")},
552         {EXIF_TAG_SATURATION, "Saturation", N_("Saturation"),
553          N_("This tag indicates the direction of saturation processing "
554             "applied by the camera when the image was shot.")},
555         {EXIF_TAG_SHARPNESS, "Sharpness", N_("Sharpness"),
556          N_("This tag indicates the direction of sharpness processing "
557             "applied by the camera when the image was shot.")},
558         {EXIF_TAG_DEVICE_SETTING_DESCRIPTION, "DeviceSettingDescription",
559          N_("Device Setting Description"),
560          N_("This tag indicates information on the picture-taking "
561             "conditions of a particular camera model. The tag is used "
562             "only to indicate the picture-taking conditions in the "
563             "reader.")},
564         {EXIF_TAG_SUBJECT_DISTANCE_RANGE, "SubjectDistanceRange",
565          N_("Subject Distance Range"),
566          N_("This tag indicates the distance to the subject.")},
567         {EXIF_TAG_IMAGE_UNIQUE_ID, "ImageUniqueID", N_("Image Unique ID"),
568          N_("This tag indicates an identifier assigned uniquely to "
569             "each image. It is recorded as an ASCII string equivalent "
570             "to hexadecimal notation and 128-bit fixed length.")},
571         {0, NULL, NULL, NULL}
572 };
573
574 /* For now, do not use these functions. */
575 ExifTag      exif_tag_table_get_tag  (unsigned int n);
576 const char  *exif_tag_table_get_name (unsigned int n);
577 unsigned int exif_tag_table_count    (void);
578
579 ExifTag
580 exif_tag_table_get_tag (unsigned int n)
581 {
582         return (n < exif_tag_table_count ()) ? ExifTagTable[n].tag : 0;
583 }
584
585 const char *
586 exif_tag_table_get_name (unsigned int n)
587 {
588         return (n < exif_tag_table_count ()) ? ExifTagTable[n].name : NULL;
589 }
590
591 unsigned int
592 exif_tag_table_count (void)
593 {
594         return sizeof (ExifTagTable) / sizeof (ExifTagTable[0]);
595 }
596
597 const char *
598 exif_tag_get_name (ExifTag tag)
599 {
600         unsigned int i;
601
602         for (i = 0; ExifTagTable[i].name; i++)
603                 if (ExifTagTable[i].tag == tag)
604                         break;
605
606         return (ExifTagTable[i].name);
607 }
608
609 const char *
610 exif_tag_get_title (ExifTag tag)
611 {
612         unsigned int i;
613
614         bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
615         bindtextdomain (GETTEXT_PACKAGE, LIBEXIF_LOCALEDIR);
616
617         for (i = 0; ExifTagTable[i].title; i++)
618                 if (ExifTagTable[i].tag == tag)
619                         break;
620
621         return (_(ExifTagTable[i].title));
622 }
623
624 const char *
625 exif_tag_get_description (ExifTag tag)
626 {
627         unsigned int i;
628
629         bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
630         bindtextdomain (GETTEXT_PACKAGE, LIBEXIF_LOCALEDIR);
631
632         for (i = 0; ExifTagTable[i].description; i++)
633                 if (ExifTagTable[i].tag == tag)
634                         break;
635
636         return (_(ExifTagTable[i].description));
637 }