00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include <config.h>
00022
00023 #include <libexif/exif-tag.h>
00024 #include <libexif/i18n.h>
00025
00026 #include <stdlib.h>
00027 #include <string.h>
00028
00029 #define ESL_NNNN { EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED }
00030 #define ESL_OOOO { EXIF_SUPPORT_LEVEL_OPTIONAL, EXIF_SUPPORT_LEVEL_OPTIONAL, EXIF_SUPPORT_LEVEL_OPTIONAL, EXIF_SUPPORT_LEVEL_OPTIONAL }
00031 #define ESL_MMMN { EXIF_SUPPORT_LEVEL_MANDATORY, EXIF_SUPPORT_LEVEL_MANDATORY, EXIF_SUPPORT_LEVEL_MANDATORY, EXIF_SUPPORT_LEVEL_NOT_RECORDED }
00032 #define ESL_MMMM { EXIF_SUPPORT_LEVEL_MANDATORY, EXIF_SUPPORT_LEVEL_MANDATORY, EXIF_SUPPORT_LEVEL_MANDATORY, EXIF_SUPPORT_LEVEL_MANDATORY }
00033 #define ESL_OMON { EXIF_SUPPORT_LEVEL_OPTIONAL, EXIF_SUPPORT_LEVEL_MANDATORY, EXIF_SUPPORT_LEVEL_OPTIONAL, EXIF_SUPPORT_LEVEL_NOT_RECORDED }
00034 #define ESL_NNOO { EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_OPTIONAL, EXIF_SUPPORT_LEVEL_OPTIONAL }
00035 #define ESL_NNMN { EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_MANDATORY, EXIF_SUPPORT_LEVEL_NOT_RECORDED }
00036 #define ESL_NNMM { EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_MANDATORY, EXIF_SUPPORT_LEVEL_MANDATORY }
00037 #define ESL_NNNM { EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_MANDATORY }
00038 #define ESL_NNNO { EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_OPTIONAL }
00039 #define ESL_GPS { ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN }
00040
00041 static struct {
00042 ExifTag tag;
00043 const char *name;
00044 const char *title;
00045 const char *description;
00046 ExifSupportLevel esl[EXIF_IFD_COUNT][4];
00047 } ExifTagTable[] = {
00048 {EXIF_TAG_NEW_SUBFILE_TYPE, "NewSubfileType",
00049 "New Subfile Type", N_("A general indication of the kind of data "
00050 "contained in this subfile.")},
00051 {EXIF_TAG_INTEROPERABILITY_INDEX, "InteroperabilityIndex",
00052 "InteroperabilityIndex",
00053 N_("Indicates the identification of the Interoperability rule. "
00054 "Use \"R98\" for stating ExifR98 Rules. Four bytes used "
00055 "including the termination code (NULL). see the separate "
00056 "volume of Recommended Exif Interoperability Rules (ExifR98) "
00057 "for other tags used for ExifR98."),
00058 { ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_OOOO } },
00059 {EXIF_TAG_INTEROPERABILITY_VERSION, "InteroperabilityVersion",
00060 "InteroperabilityVersion", "",
00061 { ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_OOOO } },
00062 {EXIF_TAG_IMAGE_WIDTH, "ImageWidth", N_("Image Width"),
00063 N_("The number of columns of image data, equal to the number of "
00064 "pixels per row. In JPEG compressed data a JPEG marker is "
00065 "used instead of this tag."),
00066 { ESL_MMMN, ESL_MMMN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
00067 {EXIF_TAG_IMAGE_LENGTH, "ImageLength", N_("Image Length"),
00068 N_("The number of rows of image data. In JPEG compressed data a "
00069 "JPEG marker is used instead of this tag."),
00070 { ESL_MMMN, ESL_MMMN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
00071 {EXIF_TAG_BITS_PER_SAMPLE, "BitsPerSample", N_("Bits per Sample"),
00072 N_("The number of bits per image component. In this standard each "
00073 "component of the image is 8 bits, so the value for this "
00074 "tag is 8. See also <SamplesPerPixel>. In JPEG compressed data "
00075 "a JPEG marker is used instead of this tag."),
00076 { ESL_MMMN, ESL_MMMN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
00077 {EXIF_TAG_COMPRESSION, "Compression", N_("Compression"),
00078 N_("The compression scheme used for the image data. When a "
00079 "primary image is JPEG compressed, this designation is "
00080 "not necessary and is omitted. When thumbnails use JPEG "
00081 "compression, this tag value is set to 6."),
00082 { ESL_MMMN, ESL_MMMM, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
00083 {EXIF_TAG_PHOTOMETRIC_INTERPRETATION, "PhotometricInterpretation",
00084 N_("Photometric Interpretation"),
00085 N_("The pixel composition. In JPEG compressed data a JPEG "
00086 "marker is used instead of this tag."),
00087 { ESL_MMMN, ESL_MMMN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
00088 {EXIF_TAG_FILL_ORDER, "FillOrder", N_("Fill Order"), ""},
00089 {EXIF_TAG_DOCUMENT_NAME, "DocumentName", N_("Document Name"), ""},
00090 {EXIF_TAG_IMAGE_DESCRIPTION, "ImageDescription",
00091 N_("Image Description"),
00092 N_("A character string giving the title of the image. It may be "
00093 "a comment such as \"1988 company picnic\" or "
00094 "the like. Two-bytes character codes cannot be used. "
00095 "When a 2-bytes code is necessary, the Exif Private tag "
00096 "<UserComment> is to be used."),
00097 { ESL_OOOO, ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
00098 {EXIF_TAG_MAKE, "Make", N_("Manufacturer"),
00099 N_("The manufacturer of the recording "
00100 "equipment. This is the manufacturer of the DSC, scanner, "
00101 "video digitizer or other equipment that generated the "
00102 "image. When the field is left blank, it is treated as "
00103 "unknown."),
00104 { ESL_OOOO, ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN }},
00105 {EXIF_TAG_MODEL, "Model", N_("Model"),
00106 N_("The model name or model number of the equipment. This is the "
00107 "model name or number of the DSC, scanner, video digitizer "
00108 "or other equipment that generated the image. When the field "
00109 "is left blank, it is treated as unknown."),
00110 { ESL_OOOO, ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
00111 {EXIF_TAG_STRIP_OFFSETS, "StripOffsets", N_("Strip Offsets"),
00112 N_("For each strip, the byte offset of that strip. It is "
00113 "recommended that this be selected so the number of strip "
00114 "bytes does not exceed 64 Kbytes. With JPEG compressed "
00115 "data this designation is not needed and is omitted. See also "
00116 "<RowsPerStrip> and <StripByteCounts>."),
00117 { ESL_MMMN, ESL_MMMN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
00118 {EXIF_TAG_ORIENTATION, "Orientation", N_("Orientation"),
00119 N_("The image orientation viewed in terms of rows and columns."),
00120 { ESL_OOOO, ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
00121 {EXIF_TAG_SAMPLES_PER_PIXEL, "SamplesPerPixel",
00122 N_("Samples per Pixel"),
00123 N_("The number of components per pixel. Since this standard applies "
00124 "to RGB and YCbCr images, the value set for this tag is 3. "
00125 "In JPEG compressed data a JPEG marker is used instead of this "
00126 "tag."),
00127 { ESL_MMMN, ESL_MMMN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
00128 {EXIF_TAG_ROWS_PER_STRIP, "RowsPerStrip", N_("Rows per Strip"),
00129 N_("The number of rows per strip. This is the number of rows "
00130 "in the image of one strip when an image is divided into "
00131 "strips. With JPEG compressed data this designation is not "
00132 "needed and is omitted. See also <StripOffsets> and "
00133 "<StripByteCounts>."),
00134 { ESL_MMMN, ESL_MMMN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
00135 {EXIF_TAG_STRIP_BYTE_COUNTS, "StripByteCounts", N_("Strip Byte Count"),
00136 N_("The total number of bytes in each strip. With JPEG compressed "
00137 "data this designation is not needed and is omitted."),
00138 { ESL_MMMN, ESL_MMMN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
00139 {EXIF_TAG_X_RESOLUTION, "XResolution", N_("x-Resolution"),
00140 N_("The number of pixels per <ResolutionUnit> in the <ImageWidth> "
00141 "direction. When the image resolution is unknown, 72 [dpi] "
00142 "is designated."),
00143 { ESL_MMMM, ESL_MMMM, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
00144 {EXIF_TAG_Y_RESOLUTION, "YResolution", N_("y-Resolution"),
00145 N_("The number of pixels per <ResolutionUnit> in the <ImageLength> "
00146 "direction. The same value as <XResolution> is designated."),
00147 { ESL_MMMM, ESL_MMMM, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
00148 {EXIF_TAG_PLANAR_CONFIGURATION, "PlanarConfiguration",
00149 N_("Planar Configuration"),
00150 N_("Indicates whether pixel components are recorded in a chunky "
00151 "or planar format. In JPEG compressed files a JPEG marker "
00152 "is used instead of this tag. If this field does not exist, "
00153 "the TIFF default of 1 (chunky) is assumed."),
00154 { ESL_OMON, ESL_OMON, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
00155 {EXIF_TAG_RESOLUTION_UNIT, "ResolutionUnit", N_("Resolution Unit"),
00156 N_("The unit for measuring <XResolution> and <YResolution>. The same "
00157 "unit is used for both <XResolution> and <YResolution>. If "
00158 "the image resolution is unknown, 2 (inches) is designated."),
00159 { ESL_MMMM, ESL_MMMM, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
00160 {EXIF_TAG_TRANSFER_FUNCTION, "TransferFunction",
00161 N_("Transfer Function"),
00162 N_("A transfer function for the image, described in tabular style. "
00163 "Normally this tag is not necessary, since color space is "
00164 "specified in the color space information tag (<ColorSpace>)."),
00165 { ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
00166 {EXIF_TAG_SOFTWARE, "Software", N_("Software"),
00167 N_("This tag records the name and version of the software or "
00168 "firmware of the camera or image input device used to "
00169 "generate the image. The detailed format is not specified, but "
00170 "it is recommended that the example shown below be "
00171 "followed. When the field is left blank, it is treated as "
00172 "unknown."),
00173 { ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
00174 {EXIF_TAG_DATE_TIME, "DateTime", N_("Date and Time"),
00175 N_("The date and time of image creation. In this standard "
00176 "(EXIF-2.1) it is the date and time the file was changed."),
00177 { ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
00178 {EXIF_TAG_ARTIST, "Artist", N_("Artist"),
00179 N_("This tag records the name of the camera owner, photographer or "
00180 "image creator. The detailed format is not specified, but it is "
00181 "recommended that the information be written as in the example "
00182 "below for ease of Interoperability. When the field is "
00183 "left blank, it is treated as unknown."),
00184 { ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
00185 {EXIF_TAG_WHITE_POINT, "WhitePoint", N_("White Point"),
00186 N_("The chromaticity of the white point of the image. Normally "
00187 "this tag is not necessary, since color space is specified "
00188 "in the colorspace information tag (<ColorSpace>)."),
00189 { ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
00190 {EXIF_TAG_PRIMARY_CHROMATICITIES, "PrimaryChromaticities",
00191 N_("Primary Chromaticities"),
00192 N_("The chromaticity of the three primary colors of the image. "
00193 "Normally this tag is not necessary, since colorspace is "
00194 "specified in the colorspace information tag (<ColorSpace>)."),
00195 { ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
00196 {EXIF_TAG_TRANSFER_RANGE, "TransferRange", N_("Transfer Range"), ""},
00197 {EXIF_TAG_SUB_IFDS, "SubIFDs", "SubIFD Offsets", N_("Defined by Adobe Corporation "
00198 "to enable TIFF Trees within a TIFF file.")},
00199 {EXIF_TAG_JPEG_PROC, "JPEGProc", "JPEGProc", ""},
00200 {EXIF_TAG_JPEG_INTERCHANGE_FORMAT, "JPEGInterchangeFormat",
00201 N_("JPEG Interchange Format"),
00202 N_("The offset to the start byte (SOI) of JPEG compressed "
00203 "thumbnail data. This is not used for primary image "
00204 "JPEG data."),
00205 { ESL_NNNN, ESL_NNNM, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
00206 {EXIF_TAG_JPEG_INTERCHANGE_FORMAT_LENGTH,
00207 "JPEGInterchangeFormatLength", N_("JPEG Interchange Format Length"),
00208 N_("The number of bytes of JPEG compressed thumbnail data. This "
00209 "is not used for primary image JPEG data. JPEG thumbnails "
00210 "are not divided but are recorded as a continuous JPEG "
00211 "bitstream from SOI to EOI. Appn and COM markers should "
00212 "not be recorded. Compressed thumbnails must be recorded in no "
00213 "more than 64 Kbytes, including all other data to be "
00214 "recorded in APP1."),
00215 { ESL_NNNN, ESL_NNNM, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
00216 {EXIF_TAG_YCBCR_COEFFICIENTS, "YCbCrCoefficients",
00217 N_("YCbCr Coefficients"),
00218 N_("The matrix coefficients for transformation from RGB to YCbCr "
00219 "image data. No default is given in TIFF; but here the "
00220 "value given in Appendix E, \"Color Space Guidelines\", is used "
00221 "as the default. The color space is declared in a "
00222 "color space information tag, with the default being the value "
00223 "that gives the optimal image characteristics "
00224 "Interoperability this condition."),
00225 { ESL_NNOO, ESL_NNOO, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
00226 {EXIF_TAG_YCBCR_SUB_SAMPLING, "YCbCrSubSampling",
00227 N_("YCbCr Sub-Sampling"),
00228 N_("The sampling ratio of chrominance components in relation to the "
00229 "luminance component. In JPEG compressed data a JPEG marker "
00230 "is used instead of this tag."),
00231 { ESL_NNMN, ESL_NNMN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
00232 {EXIF_TAG_YCBCR_POSITIONING, "YCbCrPositioning",
00233 N_("YCbCr Positioning"),
00234 N_("The position of chrominance components in relation to the "
00235 "luminance component. This field is designated only for "
00236 "JPEG compressed data or uncompressed YCbCr data. The TIFF "
00237 "default is 1 (centered); but when Y:Cb:Cr = 4:2:2 it is "
00238 "recommended in this standard that 2 (co-sited) be used to "
00239 "record data, in order to improve the image quality when viewed "
00240 "on TV systems. When this field does not exist, the reader shall "
00241 "assume the TIFF default. In the case of Y:Cb:Cr = 4:2:0, the "
00242 "TIFF default (centered) is recommended. If the reader "
00243 "does not have the capability of supporting both kinds of "
00244 "<YCbCrPositioning>, it shall follow the TIFF default regardless "
00245 "of the value in this field. It is preferable that readers "
00246 "be able to support both centered and co-sited positioning."),
00247 { ESL_NNMM, ESL_NNOO, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
00248 {EXIF_TAG_REFERENCE_BLACK_WHITE, "ReferenceBlackWhite",
00249 N_("Reference Black/White"),
00250 N_("The reference black point value and reference white point "
00251 "value. No defaults are given in TIFF, but the values "
00252 "below are given as defaults here. The color space is declared "
00253 "in a color space information tag, with the default "
00254 "being the value that gives the optimal image characteristics "
00255 "Interoperability these conditions."),
00256 { ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
00257 {EXIF_TAG_XML_PACKET, "XMLPacket", N_("XML Packet"), N_("XMP Metadata")},
00258 {EXIF_TAG_RELATED_IMAGE_FILE_FORMAT, "RelatedImageFileFormat",
00259 "RelatedImageFileFormat", ""},
00260 {EXIF_TAG_RELATED_IMAGE_WIDTH, "RelatedImageWidth",
00261 "RelatedImageWidth", ""},
00262 {EXIF_TAG_RELATED_IMAGE_LENGTH, "RelatedImageLength",
00263 "RelatedImageLength", ""},
00264 {EXIF_TAG_CFA_REPEAT_PATTERN_DIM, "CFARepeatPatternDim",
00265 "CFARepeatPatternDim", ""},
00266 {EXIF_TAG_CFA_PATTERN, "CFAPattern",
00267 N_("CFA Pattern"),
00268 N_("Indicates the color filter array (CFA) geometric pattern of the "
00269 "image sensor when a one-chip color area sensor is used. "
00270 "It does not apply to all sensing methods.")},
00271 {EXIF_TAG_BATTERY_LEVEL, "BatteryLevel", N_("Battery Level"), ""},
00272 {EXIF_TAG_COPYRIGHT, "Copyright", N_("Copyright"),
00273 N_("Copyright information. In this standard the tag is used to "
00274 "indicate both the photographer and editor copyrights. It is "
00275 "the copyright notice of the person or organization claiming "
00276 "rights to the image. The Interoperability copyright "
00277 "statement including date and rights should be written in this "
00278 "field; e.g., \"Copyright, John Smith, 19xx. All rights "
00279 "reserved.\". In this standard the field records both the "
00280 "photographer and editor copyrights, with each recorded in a "
00281 "separate part of the statement. When there is a clear "
00282 "distinction between the photographer and editor copyrights, "
00283 "these are to be written in the order of photographer followed "
00284 "by editor copyright, separated by NULL (in this case, "
00285 "since the statement also ends with a NULL, there are two NULL "
00286 "codes) (see example 1). When only the photographer is given, "
00287 "it is terminated by one NULL code (see example 2). When only "
00288 "the editor copyright is given, "
00289 "the photographer copyright part consists of one space followed "
00290 "by a terminating NULL code, then the editor copyright is given "
00291 "(see example 3). When the field is left blank, it is treated "
00292 "as unknown."),
00293 { ESL_OOOO, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
00294 {EXIF_TAG_EXPOSURE_TIME, "ExposureTime", N_("Exposure Time"),
00295 N_("Exposure time, given in seconds (sec)."),
00296 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
00297 {EXIF_TAG_FNUMBER, "FNumber", N_("FNumber"),
00298 N_("The F number."),
00299 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
00300 {EXIF_TAG_IPTC_NAA, "IPTC/NAA", "IPTC/NAA", ""},
00301 {EXIF_TAG_IMAGE_RESOURCES, "ImageResources", N_("Image Resources Block"), ""},
00302 {EXIF_TAG_EXIF_IFD_POINTER, "ExifIfdPointer", "ExifIFDPointer",
00303 N_("A pointer to the Exif IFD. Interoperability, Exif IFD has the "
00304 "same structure as that of the IFD specified in TIFF. "
00305 "ordinarily, however, it does not contain image data as in "
00306 "the case of TIFF."),
00307 { ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
00308 {EXIF_TAG_INTER_COLOR_PROFILE, "InterColorProfile",
00309 "InterColorProfile", ""},
00310 {EXIF_TAG_EXPOSURE_PROGRAM, "ExposureProgram", "ExposureProgram",
00311 N_("The class of the program used by the camera to set exposure "
00312 "when the picture is taken."),
00313 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
00314 {EXIF_TAG_SPECTRAL_SENSITIVITY, "SpectralSensitivity",
00315 N_("Spectral Sensitivity"),
00316 N_("Indicates the spectral sensitivity of each channel of the "
00317 "camera used. The tag value is an ASCII string compatible "
00318 "with the standard developed by the ASTM Technical Committee."),
00319 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
00320 {EXIF_TAG_GPS_INFO_IFD_POINTER, "GPSInfoIFDPointer",
00321 "GPSInfoIFDPointer",
00322 N_("A pointer to the GPS Info IFD. The "
00323 "Interoperability structure of the GPS Info IFD, like that of "
00324 "Exif IFD, has no image data."),
00325 { ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
00326 {EXIF_TAG_GPS_VERSION_ID, "GPSVersionID", N_("GPS tag version"),
00327 N_("Indicates the version of <GPSInfoIFD>. The version is given "
00328 "as 2.0.0.0. This tag is mandatory when <GPSInfo> tag is "
00329 "present. (Note: The <GPSVersionID> tag is given in bytes, "
00330 "unlike the <ExifVersion> tag. When the version is "
00331 "2.0.0.0, the tag value is 02000000.H)."), ESL_GPS},
00332 {EXIF_TAG_GPS_LATITUDE_REF, "GPSLatitudeRef", N_("North or South Latitude"),
00333 N_("Indicates whether the latitude is north or south latitude. The "
00334 "ASCII value 'N' indicates north latitude, and 'S' is south "
00335 "latitude."), ESL_GPS},
00336 {EXIF_TAG_GPS_LATITUDE, "GPSLatitude", N_("Latitude"),
00337 N_("Indicates the latitude. The latitude is expressed as three "
00338 "RATIONAL values giving the degrees, minutes, and seconds, "
00339 "respectively. When degrees, minutes and seconds are expressed, "
00340 "the format is dd/1,mm/1,ss/1. When degrees and minutes are used "
00341 "and, for example, fractions of minutes are given up to two "
00342 "decimal places, the format is dd/1,mmmm/100,0/1."),
00343 ESL_GPS},
00344 {EXIF_TAG_GPS_LONGITUDE_REF, "GPSLongitudeRef", N_("East or West Longitude"),
00345 N_("Indicates whether the longitude is east or west longitude. "
00346 "ASCII 'E' indicates east longitude, and 'W' is west "
00347 "longitude."), ESL_GPS},
00348 {EXIF_TAG_GPS_LONGITUDE, "GPSLongitude", N_("Longitude"),
00349 N_("Indicates the longitude. The longitude is expressed as three "
00350 "RATIONAL values giving the degrees, minutes, and seconds, "
00351 "respectively. When degrees, minutes and seconds are expressed, "
00352 "the format is ddd/1,mm/1,ss/1. When degrees and minutes are "
00353 "used and, for example, fractions of minutes are given up to "
00354 "two decimal places, the format is ddd/1,mmmm/100,0/1."),
00355 ESL_GPS},
00356 {EXIF_TAG_GPS_ALTITUDE_REF, "GPSAltitudeRef", N_("Altitude reference"),
00357 N_("Indicates the altitude used as the reference altitude. If the "
00358 "reference is sea level and the altitude is above sea level, 0 "
00359 "is given. If the altitude is below sea level, a value of 1 is given "
00360 "and the altitude is indicated as an absolute value in the "
00361 "GSPAltitude tag. The reference unit is meters. Note that this tag "
00362 "is BYTE type, unlike other reference tags."), ESL_GPS},
00363 {EXIF_TAG_GPS_ALTITUDE, "GPSAltitude", N_("Altitude"),
00364 N_("Indicates the altitude based on the reference in GPSAltitudeRef. "
00365 "Altitude is expressed as one RATIONAL value. The reference unit "
00366 "is meters."), ESL_GPS},
00367 {EXIF_TAG_ISO_SPEED_RATINGS, "ISOSpeedRatings",
00368 N_("ISO Speed Ratings"),
00369 N_("Indicates the ISO Speed and ISO Latitude of the camera or "
00370 "input device as specified in ISO 12232."),
00371 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
00372 {EXIF_TAG_OECF, "OECF", "OECF",
00373 N_("Indicates the Opto-Electoric Conversion Function (OECF) "
00374 "specified in ISO 14524. <OECF> is the relationship between "
00375 "the camera optical input and the image values."),
00376 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
00377 {EXIF_TAG_EXIF_VERSION, "ExifVersion", N_("Exif Version"),
00378 N_("The version of this standard supported. Nonexistence of this "
00379 "field is taken to mean nonconformance to the standard."),
00380 { ESL_NNNN, ESL_NNNN, ESL_MMMM, ESL_NNNN, ESL_NNNN } },
00381 {EXIF_TAG_DATE_TIME_ORIGINAL, "DateTimeOriginal",
00382 N_("Date and Time (original)"),
00383 N_("The date and time when the original image data was generated. "
00384 "For a digital still camera "
00385 "the date and time the picture was taken are recorded."),
00386 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
00387 {EXIF_TAG_DATE_TIME_DIGITIZED, "DateTimeDigitized",
00388 N_("Date and Time (digitized)"),
00389 N_("The date and time when the image was stored as digital data. "),
00390 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
00391 {EXIF_TAG_COMPONENTS_CONFIGURATION, "ComponentsConfiguration",
00392 "ComponentsConfiguration",
00393 N_("Information specific to compressed data. The channels of "
00394 "each component are arranged in order from the 1st "
00395 "component to the 4th. For uncompressed data the data "
00396 "arrangement is given in the <PhotometricInterpretation> tag. "
00397 "However, since <PhotometricInterpretation> can only "
00398 "express the order of Y, Cb and Cr, this tag is provided "
00399 "for cases when compressed data uses components other than "
00400 "Y, Cb, and Cr and to enable support of other sequences."),
00401 { ESL_NNNN, ESL_NNNN, ESL_NNNM, ESL_NNNN, ESL_NNNN } },
00402 {EXIF_TAG_COMPRESSED_BITS_PER_PIXEL, "CompressedBitsPerPixel",
00403 N_("Compressed Bits per Pixel"),
00404 N_("Information specific to compressed data. The compression mode "
00405 "used for a compressed image is indicated in unit bits "
00406 "per pixel."),
00407 { ESL_NNNN, ESL_NNNN, ESL_NNNO, ESL_NNNN, ESL_NNNN } },
00408 {EXIF_TAG_SHUTTER_SPEED_VALUE, "ShutterSpeedValue", N_("Shutter speed"),
00409 N_("Shutter speed. The unit is the APEX (Additive System of "
00410 "Photographic Exposure) setting (see Appendix C)."),
00411 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
00412 {EXIF_TAG_APERTURE_VALUE, "ApertureValue", N_("Aperture"),
00413 N_("The lens aperture. The unit is the APEX value."),
00414 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
00415 {EXIF_TAG_BRIGHTNESS_VALUE, "BrightnessValue", N_("Brightness"),
00416 N_("The value of brightness. The unit is the APEX value. "
00417 "Ordinarily it is given in the range of -99.99 to 99.99."),
00418 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
00419 {EXIF_TAG_EXPOSURE_BIAS_VALUE, "ExposureBiasValue",
00420 N_("Exposure Bias"),
00421 N_("The exposure bias. The units is the APEX value. Ordinarily "
00422 "it is given in the range of -99.99 to 99.99."),
00423 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
00424 {EXIF_TAG_MAX_APERTURE_VALUE, "MaxApertureValue", "MaxApertureValue",
00425 N_("The smallest F number of the lens. The unit is the APEX value. "
00426 "Ordinarily it is given in the range of 00.00 to 99.99, "
00427 "but it is not limited to this range."),
00428 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
00429 {EXIF_TAG_SUBJECT_DISTANCE, "SubjectDistance",
00430 N_("Subject Distance"),
00431 N_("The distance to the subject, given in meters."),
00432 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
00433 {EXIF_TAG_METERING_MODE, "MeteringMode", N_("Metering Mode"),
00434 N_("The metering mode."),
00435 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
00436 {EXIF_TAG_LIGHT_SOURCE, "LightSource", N_("Light Source"),
00437 N_("The kind of light source."),
00438 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
00439 {EXIF_TAG_FLASH, "Flash", N_("Flash"),
00440 N_("This tag is recorded when an image is taken using a strobe "
00441 "light (flash).")},
00442 {EXIF_TAG_FOCAL_LENGTH, "FocalLength", N_("Focal Length"),
00443 N_("The actual focal length of the lens, in mm. Conversion is not "
00444 "made to the focal length of a 35 mm film camera."),
00445 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
00446 {EXIF_TAG_MAKER_NOTE, "MakerNote", N_("Maker Note"),
00447 N_("A tag for manufacturers of Exif writers to record any desired "
00448 "information. The contents are up to the manufacturer."),
00449 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
00450 {EXIF_TAG_USER_COMMENT, "UserComment", N_("User Comment"),
00451 N_("A tag for Exif users to write keywords or comments on the image "
00452 "besides those in <ImageDescription>, and without the "
00453 "character code limitations of the <ImageDescription> tag. The "
00454 "character code used in the <UserComment> tag is identified "
00455 "based on an ID code in a fixed 8-byte area at the start of "
00456 "the tag data area. The unused portion of the area is padded "
00457 "with NULL (\"00.h\"). ID codes are assigned by means of "
00458 "registration. The designation method and references for each "
00459 "character code are given in Table 6. The value of CountN "
00460 "is determinated based on the 8 bytes in the character code "
00461 "area and the number of bytes in the user comment part. Since "
00462 "the TYPE is not ASCII, NULL termination is not necessary "
00463 "(see Fig. 9). "
00464 "The ID code for the <UserComment> area may be a Defined code "
00465 "such as JIS or ASCII, or may be Undefined. The Undefined name "
00466 "is UndefinedText, and the ID code is filled with 8 bytes of all "
00467 "\"NULL\" (\"00.H\"). An Exif reader that reads the "
00468 "<UserComment> tag must have a function for determining the "
00469 "ID code. This function is not required in Exif readers that "
00470 "do not use the <UserComment> tag (see Table 7). "
00471 "When a <UserComment> area is set aside, it is recommended that "
00472 "the ID code be ASCII and that the following user comment "
00473 "part be filled with blank characters [20.H]."),
00474 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
00475 {EXIF_TAG_SUB_SEC_TIME, "SubsecTime", "SubsecTime",
00476 N_("A tag used to record fractions of seconds for the "
00477 "<DateTime> tag."),
00478 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
00479 {EXIF_TAG_SUB_SEC_TIME_ORIGINAL, "SubSecTimeOriginal",
00480 "SubSecTimeOriginal",
00481 N_("A tag used to record fractions of seconds for the "
00482 "<DateTimeOriginal> tag."),
00483 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
00484 {EXIF_TAG_SUB_SEC_TIME_DIGITIZED, "SubSecTimeDigitized",
00485 "SubSecTimeDigitized",
00486 N_("A tag used to record fractions of seconds for the "
00487 "<DateTimeDigitized> tag."),
00488 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
00489 {EXIF_TAG_FLASH_PIX_VERSION, "FlashPixVersion", "FlashPixVersion",
00490 N_("The FlashPix format version supported by a FPXR file."),
00491 { ESL_NNNN, ESL_NNNN, ESL_MMMM, ESL_NNNN, ESL_NNNN } },
00492 {EXIF_TAG_COLOR_SPACE, "ColorSpace", N_("Color Space"),
00493 N_("The color space information tag is always "
00494 "recorded as the color space specifier. Normally sRGB (=1) "
00495 "is used to define the color space based on the PC monitor "
00496 "conditions and environment. If a color space other than "
00497 "sRGB is used, Uncalibrated (=FFFF.H) is set. Image data "
00498 "recorded as Uncalibrated can be treated as sRGB when it is "
00499 "converted to FlashPix. On sRGB see Appendix E."),
00500 { ESL_NNNN, ESL_NNNN, ESL_MMMM, ESL_NNNN, ESL_NNNN } },
00501 {EXIF_TAG_PIXEL_X_DIMENSION, "PixelXDimension", "PixelXDimension",
00502 N_("Information specific to compressed data. When a "
00503 "compressed file is recorded, the valid width of the "
00504 "meaningful image must be recorded in this tag, whether or "
00505 "not there is padding data or a restart marker. This tag "
00506 "should not exist in an uncompressed file. For details see "
00507 "section 2.8.1 and Appendix F."),
00508 { ESL_NNNN, ESL_NNNN, ESL_NNNM, ESL_NNNN, ESL_NNNN } },
00509 {EXIF_TAG_PIXEL_Y_DIMENSION, "PixelYDimension", "PixelYDimension",
00510 N_("Information specific to compressed data. When a compressed "
00511 "file is recorded, the valid height of the meaningful image "
00512 "must be recorded in this tag, whether or not there is padding "
00513 "data or a restart marker. This tag should not exist in an "
00514 "uncompressed file. For details see section 2.8.1 and Appendix "
00515 "F. Since data padding is unnecessary in the vertical direction, "
00516 "the number of lines recorded in this valid image height tag "
00517 "will in fact be the same as that recorded in the SOF."),
00518 { ESL_NNNN, ESL_NNNN, ESL_NNNM, ESL_NNNN, ESL_NNNN } },
00519 {EXIF_TAG_RELATED_SOUND_FILE, "RelatedSoundFile",
00520 "RelatedSoundFile",
00521 N_("This tag is used to record the name of an audio file related "
00522 "to the image data. The only relational information "
00523 "recorded here is the Exif audio file name and extension (an "
00524 "ASCII string consisting of 8 characters + '.' + 3 "
00525 "characters). The path is not recorded. Stipulations on audio "
00526 "are given in section 3.6.3. File naming conventions are "
00527 "given in section 3.7.1. "
00528 "When using this tag, audio files must be recorded in "
00529 "conformance to the Exif audio format. Writers are also allowed "
00530 "to store the data such as Audio within APP2 as FlashPix "
00531 "extension stream data. "
00532 "Audio files must be recorded in conformance to the Exif audio "
00533 "format. The mapping of Exif image files and audio files is done "
00534 "in any of the three ways shown in Table 8. If multiple files "
00535 "are mapped to one file as in [2] or [3] of this table, the above "
00536 "format is used to record just one audio file name. If "
00537 "there are multiple audio files, the first recorded file is "
00538 "given. In the case of [3] in Table 8, for example, for the "
00539 "Exif image file \"DSC00001.JPG\" only \"SND00001.WAV\" is "
00540 "given as the related Exif audio file. When there are three "
00541 "Exif audio files \"SND00001.WAV\", \"SND00002.WAV\" and "
00542 "\"SND00003.WAV\", the Exif image file name for each of them, "
00543 "\"DSC00001.JPG\", is indicated. By combining multiple "
00544 "relational information, a variety of playback possibilities "
00545 "can be supported. The method of using relational information "
00546 "is left to the implementation on the playback side. Since this "
00547 "information is an ASCII character string, it is terminated by "
00548 "NULL. When this tag is used to map audio files, the relation "
00549 "of the audio file to image data must also be indicated on the "
00550 "audio file end."),
00551 { ESL_NNNN, ESL_NNNN, ESL_OOOO, ESL_NNNN, ESL_NNNN } },
00552 {EXIF_TAG_INTEROPERABILITY_IFD_POINTER, "InteroperabilityIFDPointer",
00553 "InteroperabilityIFDPointer",
00554 N_("Interoperability IFD is composed of tags which stores the "
00555 "information to ensure the Interoperability and pointed "
00556 "by the following tag located in Exif IFD. "
00557 "The Interoperability structure of Interoperability IFD is "
00558 "the same as TIFF defined IFD structure "
00559 "but does not contain the "
00560 "image data characteristically compared with normal TIFF "
00561 "IFD."),
00562 { ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN, ESL_NNNN } },
00563 {EXIF_TAG_FLASH_ENERGY, "FlashEnergy", N_("Flash Energy"),
00564 N_("Indicates the strobe energy at the time the image is "
00565 "captured, as measured in Beam Candle Power Seconds (BCPS).")},
00566 {EXIF_TAG_SPATIAL_FREQUENCY_RESPONSE, "SpatialFrequencyResponse",
00567 N_("Spatial Frequency Response"),
00568 N_("This tag records the camera or input device spatial frequency "
00569 "table and SFR values in the direction of image width, "
00570 "image height, and diagonal direction, as specified in ISO "
00571 "12233.")},
00572 {EXIF_TAG_FOCAL_PLANE_X_RESOLUTION, "FocalPlaneXResolution",
00573 N_("Focal Plane x-Resolution"),
00574 N_("Indicates the number of pixels in the image width (X) direction "
00575 "per <FocalPlaneResolutionUnit> on the camera focal plane.")},
00576 {EXIF_TAG_FOCAL_PLANE_Y_RESOLUTION, "FocalPlaneYResolution",
00577 N_("Focal Plane y-Resolution"),
00578 N_("Indicates the number of pixels in the image height (V) direction "
00579 "per <FocalPlaneResolutionUnit> on the camera focal plane.")},
00580 {EXIF_TAG_FOCAL_PLANE_RESOLUTION_UNIT, "FocalPlaneResolutionUnit",
00581 N_("Focal Plane Resolution Unit"),
00582 N_("Indicates the unit for measuring <FocalPlaneXResolution> and "
00583 "<FocalPlaneYResolution>. This value is the same as the "
00584 "<ResolutionUnit>.")},
00585 {EXIF_TAG_SUBJECT_LOCATION, "SubjectLocation",
00586 N_("Subject Location"),
00587 N_("Indicates the location of the main subject in the scene. The "
00588 "value of this tag represents the pixel at the center of the "
00589 "main subject relative to the left edge, prior to rotation "
00590 "processing as per the <Rotation> tag. The first value "
00591 "indicates the X column number and second indicates "
00592 "the Y row number.")},
00593 {EXIF_TAG_EXPOSURE_INDEX, "ExposureIndex", N_("Exposure index"),
00594 N_("Indicates the exposure index selected on the camera or "
00595 "input device at the time the image is captured.")},
00596 {EXIF_TAG_SENSING_METHOD, "SensingMethod", N_("Sensing Method"),
00597 N_("Indicates the image sensor type on the camera or input "
00598 "device.")},
00599 {EXIF_TAG_FILE_SOURCE, "FileSource", N_("File Source"),
00600 N_("Indicates the image source. If a DSC recorded the image, "
00601 "this tag value of this tag always be set to 3, indicating "
00602 "that the image was recorded on a DSC.")},
00603 {EXIF_TAG_SCENE_TYPE, "SceneType", N_("Scene Type"),
00604 N_("Indicates the type of scene. If a DSC recorded the image, "
00605 "this tag value must always be set to 1, indicating that the "
00606 "image was directly photographed.")},
00607 {EXIF_TAG_NEW_CFA_PATTERN, "CFAPattern",
00608 N_("CFA Pattern"),
00609 N_("Indicates the color filter array (CFA) geometric pattern of the "
00610 "image sensor when a one-chip color area sensor is used. "
00611 "It does not apply to all sensing methods.")},
00612 {EXIF_TAG_SUBJECT_AREA, "SubjectArea", N_("Subject Area"),
00613 N_("This tag indicates the location and area of the main subject "
00614 "in the overall scene.")},
00615 {EXIF_TAG_TIFF_EP_STANDARD_ID, "TIFF/EPStandardID", N_("TIFF/EP Standard ID"), ""},
00616 {EXIF_TAG_CUSTOM_RENDERED, "CustomRendered", N_("Custom Rendered"),
00617 N_("This tag indicates the use of special processing on image "
00618 "data, such as rendering geared to output. When special "
00619 "processing is performed, the reader is expected to disable "
00620 "or minimize any further processing.")},
00621 {EXIF_TAG_EXPOSURE_MODE, "ExposureMode", N_("Exposure Mode"),
00622 N_("This tag indicates the exposure mode set when the image was "
00623 "shot. In auto-bracketing mode, the camera shoots a series of "
00624 "frames of the same scene at different exposure settings.")},
00625 {EXIF_TAG_WHITE_BALANCE, "WhiteBalance", N_("White Balance"),
00626 N_("This tag indicates the white balance mode set when the image "
00627 "was shot.")},
00628 {EXIF_TAG_DIGITAL_ZOOM_RATIO, "DigitalZoomRatio",
00629 N_("Digital Zoom Ratio"),
00630 N_("This tag indicates the digital zoom ratio when the image was "
00631 "shot. If the numerator of the recorded value is 0, this "
00632 "indicates that digital zoom was not used.")},
00633 {EXIF_TAG_FOCAL_LENGTH_IN_35MM_FILM, "FocalLengthIn35mmFilm",
00634 N_("Focal Length In 35mm Film"),
00635 N_("This tag indicates the equivalent focal length assuming a "
00636 "35mm film camera, in mm. A value of 0 means the focal "
00637 "length is unknown. Note that this tag differs from the "
00638 "FocalLength tag.")},
00639 {EXIF_TAG_SCENE_CAPTURE_TYPE, "SceneCaptureType",
00640 N_("Scene Capture Type"),
00641 N_("This tag indicates the type of scene that was shot. It can "
00642 "also be used to record the mode in which the image was "
00643 "shot. Note that this differs from the scene type "
00644 "(SceneType) tag.")},
00645 {EXIF_TAG_GAIN_CONTROL, "GainControl", N_("Gain Control"),
00646 N_("This tag indicates the degree of overall image gain "
00647 "adjustment.")},
00648 {EXIF_TAG_CONTRAST, "Contrast", N_("Contrast"),
00649 N_("This tag indicates the direction of contrast processing "
00650 "applied by the camera when the image was shot.")},
00651 {EXIF_TAG_SATURATION, "Saturation", N_("Saturation"),
00652 N_("This tag indicates the direction of saturation processing "
00653 "applied by the camera when the image was shot.")},
00654 {EXIF_TAG_SHARPNESS, "Sharpness", N_("Sharpness"),
00655 N_("This tag indicates the direction of sharpness processing "
00656 "applied by the camera when the image was shot.")},
00657 {EXIF_TAG_DEVICE_SETTING_DESCRIPTION, "DeviceSettingDescription",
00658 N_("Device Setting Description"),
00659 N_("This tag indicates information on the picture-taking "
00660 "conditions of a particular camera model. The tag is used "
00661 "only to indicate the picture-taking conditions in the "
00662 "reader.")},
00663 {EXIF_TAG_SUBJECT_DISTANCE_RANGE, "SubjectDistanceRange",
00664 N_("Subject Distance Range"),
00665 N_("This tag indicates the distance to the subject.")},
00666 {EXIF_TAG_IMAGE_UNIQUE_ID, "ImageUniqueID", N_("Image Unique ID"),
00667 N_("This tag indicates an identifier assigned uniquely to "
00668 "each image. It is recorded as an ASCII string equivalent "
00669 "to hexadecimal notation and 128-bit fixed length.")},
00670 {EXIF_TAG_GAMMA, "Gamma", N_("Gamma"),
00671 N_("Indicates the value of coefficient gamma.")},
00672 {EXIF_TAG_UNKNOWN_C4A5, "UnknownC4A5", N_("Unknown"),
00673 N_("Unknown (related to Epson's PRINT Image Matching technology)")},
00674 {0, NULL, NULL, NULL}
00675 };
00676
00677
00678 ExifTag exif_tag_table_get_tag (unsigned int n);
00679 const char *exif_tag_table_get_name (unsigned int n);
00680 unsigned int exif_tag_table_count (void);
00681
00682 ExifTag
00683 exif_tag_table_get_tag (unsigned int n)
00684 {
00685 return (n < exif_tag_table_count ()) ? ExifTagTable[n].tag : 0;
00686 }
00687
00688 const char *
00689 exif_tag_table_get_name (unsigned int n)
00690 {
00691 return (n < exif_tag_table_count ()) ? ExifTagTable[n].name : NULL;
00692 }
00693
00694 unsigned int
00695 exif_tag_table_count (void)
00696 {
00697 return sizeof (ExifTagTable) / sizeof (ExifTagTable[0]);
00698 }
00699
00700 #define RECORDED \
00701 ((ExifTagTable[i].esl[ifd][EXIF_DATA_TYPE_UNCOMPRESSED_CHUNKY] != EXIF_SUPPORT_LEVEL_NOT_RECORDED) || \
00702 (ExifTagTable[i].esl[ifd][EXIF_DATA_TYPE_UNCOMPRESSED_PLANAR] != EXIF_SUPPORT_LEVEL_NOT_RECORDED) || \
00703 (ExifTagTable[i].esl[ifd][EXIF_DATA_TYPE_UNCOMPRESSED_YCC] != EXIF_SUPPORT_LEVEL_NOT_RECORDED) || \
00704 (ExifTagTable[i].esl[ifd][EXIF_DATA_TYPE_COMPRESSED] != EXIF_SUPPORT_LEVEL_NOT_RECORDED))
00705
00706 const char *
00707 exif_tag_get_name_in_ifd (ExifTag tag, ExifIfd ifd)
00708 {
00709 unsigned int i;
00710
00711 if (ifd >= EXIF_IFD_COUNT) return NULL;
00712 for (i = 0; ExifTagTable[i].name; i++)
00713 if ((ExifTagTable[i].tag == tag) && RECORDED) break;
00714 return ExifTagTable[i].name;
00715 }
00716
00717 const char *
00718 exif_tag_get_title_in_ifd (ExifTag tag, ExifIfd ifd)
00719 {
00720 unsigned int i;
00721
00722
00723
00724
00725
00726
00727
00728
00729 bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
00730
00731 if (ifd >= EXIF_IFD_COUNT) return NULL;
00732 for (i = 0; ExifTagTable[i].title; i++)
00733 if ((ExifTagTable[i].tag == tag) && RECORDED) break;
00734 return _(ExifTagTable[i].title);
00735 }
00736
00737 const char *
00738 exif_tag_get_description_in_ifd (ExifTag tag, ExifIfd ifd)
00739 {
00740 unsigned int i;
00741
00742
00743
00744
00745
00746
00747
00748 bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
00749
00750 if (ifd >= EXIF_IFD_COUNT) return NULL;
00751 for (i = 0; ExifTagTable[i].description; i++)
00752 if ((ExifTagTable[i].tag == tag) && RECORDED) break;
00753 return _(ExifTagTable[i].description);
00754 }
00755
00756
00757
00758
00759
00760
00761
00762 typedef const char * (*get_stuff_func) (ExifTag tag, ExifIfd ifd);
00763
00764 static const char *
00765 exif_tag_get_stuff (ExifTag tag, get_stuff_func func)
00766 {
00767 const static ExifIfd ifds[5] = {
00768 EXIF_IFD_0,
00769 EXIF_IFD_1,
00770 EXIF_IFD_EXIF,
00771 EXIF_IFD_INTEROPERABILITY,
00772 EXIF_IFD_GPS
00773 };
00774 int i;
00775 for (i=0; i<5; i++) {
00776 const char *result = func(tag, ifds[i]);
00777 if (result != NULL) {
00778 return result;
00779 }
00780 }
00781 return (const char *) NULL;
00782 }
00783
00784
00785 const char *
00786 exif_tag_get_name (ExifTag tag)
00787 {
00788 return exif_tag_get_stuff(tag, exif_tag_get_name_in_ifd);
00789 }
00790
00791 const char *
00792 exif_tag_get_title (ExifTag tag)
00793 {
00794 return exif_tag_get_stuff(tag, exif_tag_get_title_in_ifd);
00795 }
00796
00797 const char *
00798 exif_tag_get_description (ExifTag tag)
00799 {
00800 return exif_tag_get_stuff (tag, exif_tag_get_description_in_ifd);
00801 }
00802
00803
00804
00805 ExifTag
00806 exif_tag_from_name (const char *name)
00807 {
00808 unsigned int i;
00809
00810 if (!name) return 0;
00811
00812 for (i = 0; ExifTagTable[i].name; i++)
00813 if (!strcmp (ExifTagTable[i].name, name)) break;
00814 return ExifTagTable[i].tag;
00815 }
00816
00817 ExifSupportLevel
00818 exif_tag_get_support_level_in_ifd (ExifTag tag, ExifIfd ifd, ExifDataType t)
00819 {
00820 unsigned int i;
00821
00822 if (ifd >= EXIF_IFD_COUNT) return EXIF_SUPPORT_LEVEL_UNKNOWN;
00823 if (t >= EXIF_DATA_TYPE_COUNT) return EXIF_SUPPORT_LEVEL_UNKNOWN;
00824
00825 for (i = 0; ExifTagTable[i].description; i++)
00826 if ((ExifTagTable[i].tag == tag) &&
00827 (ExifTagTable[i].esl[ifd][t] != EXIF_SUPPORT_LEVEL_NOT_RECORDED))
00828 return ExifTagTable[i].esl[ifd][t];
00829 return EXIF_SUPPORT_LEVEL_NOT_RECORDED;
00830 }