EXIF library (libexif) API: libexif/exiftag.h Source File

EXIF library (libexif) API 0.6.22

exiftag.h
1
4/*
5 * Copyright (c) 2001 Lutz Mueller <lutz@users.sourceforge.net>
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 * Boston, MA 02110-1301 USA.
21 */
22
23#ifndef __EXIF_TAG_H__
24#define __EXIF_TAG_H__
25
26#ifdef __cplusplus
27extern "C" {
28#endif /* __cplusplus */
29
30#include <libexif/exififd.h>
31#include <libexif/exiftype.h>
32
34typedef uint32_t ExifTag;
35
36#define EXIF_TAG_INTEROPERABILITY_INDEX 0x0001
37#define EXIF_TAG_INTEROPERABILITY_VERSION 0x0002
38#define EXIF_TAG_NEW_SUBFILE_TYPE 0x00fe
39#define EXIF_TAG_IMAGE_WIDTH 0x0100
40#define EXIF_TAG_IMAGE_LENGTH 0x0101
41#define EXIF_TAG_BITS_PER_SAMPLE 0x0102
42#define EXIF_TAG_COMPRESSION 0x0103
43#define EXIF_TAG_PHOTOMETRIC_INTERPRETATION 0x0106
44#define EXIF_TAG_FILL_ORDER 0x010a
45#define EXIF_TAG_DOCUMENT_NAME 0x010d
46#define EXIF_TAG_IMAGE_DESCRIPTION 0x010e
47#define EXIF_TAG_MAKE 0x010f
48#define EXIF_TAG_MODEL 0x0110
49#define EXIF_TAG_STRIP_OFFSETS 0x0111
50#define EXIF_TAG_ORIENTATION 0x0112
51#define EXIF_TAG_SAMPLES_PER_PIXEL 0x0115
52#define EXIF_TAG_ROWS_PER_STRIP 0x0116
53#define EXIF_TAG_STRIP_BYTE_COUNTS 0x0117
54#define EXIF_TAG_X_RESOLUTION 0x011a
55#define EXIF_TAG_Y_RESOLUTION 0x011b
56#define EXIF_TAG_PLANAR_CONFIGURATION 0x011c
57#define EXIF_TAG_RESOLUTION_UNIT 0x0128
58#define EXIF_TAG_TRANSFER_FUNCTION 0x012d
59#define EXIF_TAG_SOFTWARE 0x0131
60#define EXIF_TAG_DATE_TIME 0x0132
61#define EXIF_TAG_ARTIST 0x013b
62#define EXIF_TAG_WHITE_POINT 0x013e
63#define EXIF_TAG_PRIMARY_CHROMATICITIES 0x013f
64#define EXIF_TAG_SUB_IFDS 0x014a
65#define EXIF_TAG_TRANSFER_RANGE 0x0156
66#define EXIF_TAG_JPEG_PROC 0x0200
67#define EXIF_TAG_JPEG_INTERCHANGE_FORMAT 0x0201
68#define EXIF_TAG_JPEG_INTERCHANGE_FORMAT_LENGTH 0x0202
69#define EXIF_TAG_YCBCR_COEFFICIENTS 0x0211
70#define EXIF_TAG_YCBCR_SUB_SAMPLING 0x0212
71#define EXIF_TAG_YCBCR_POSITIONING 0x0213
72#define EXIF_TAG_REFERENCE_BLACK_WHITE 0x0214
73#define EXIF_TAG_XML_PACKET 0x02bc
74#define EXIF_TAG_RELATED_IMAGE_FILE_FORMAT 0x1000
75#define EXIF_TAG_RELATED_IMAGE_WIDTH 0x1001
76#define EXIF_TAG_RELATED_IMAGE_LENGTH 0x1002
77#define EXIF_TAG_CFA_REPEAT_PATTERN_DIM 0x828d
78#define EXIF_TAG_CFA_PATTERN 0x828e
79#define EXIF_TAG_BATTERY_LEVEL 0x828f
80#define EXIF_TAG_COPYRIGHT 0x8298
81#define EXIF_TAG_EXPOSURE_TIME 0x829a
82#define EXIF_TAG_FNUMBER 0x829d
83#define EXIF_TAG_IPTC_NAA 0x83bb
84#define EXIF_TAG_IMAGE_RESOURCES 0x8649
85#define EXIF_TAG_EXIF_IFD_POINTER 0x8769
86#define EXIF_TAG_INTER_COLOR_PROFILE 0x8773
87#define EXIF_TAG_EXPOSURE_PROGRAM 0x8822
88#define EXIF_TAG_SPECTRAL_SENSITIVITY 0x8824
89#define EXIF_TAG_GPS_INFO_IFD_POINTER 0x8825
90#define EXIF_TAG_ISO_SPEED_RATINGS 0x8827
91#define EXIF_TAG_OECF 0x8828
92#define EXIF_TAG_TIME_ZONE_OFFSET 0x882a
93#define EXIF_TAG_EXIF_VERSION 0x9000
94#define EXIF_TAG_DATE_TIME_ORIGINAL 0x9003
95#define EXIF_TAG_DATE_TIME_DIGITIZED 0x9004
96#define EXIF_TAG_COMPONENTS_CONFIGURATION 0x9101
97#define EXIF_TAG_COMPRESSED_BITS_PER_PIXEL 0x9102
98#define EXIF_TAG_SHUTTER_SPEED_VALUE 0x9201
99#define EXIF_TAG_APERTURE_VALUE 0x9202
100#define EXIF_TAG_BRIGHTNESS_VALUE 0x9203
101#define EXIF_TAG_EXPOSURE_BIAS_VALUE 0x9204
102#define EXIF_TAG_MAX_APERTURE_VALUE 0x9205
103#define EXIF_TAG_SUBJECT_DISTANCE 0x9206
104#define EXIF_TAG_METERING_MODE 0x9207
105#define EXIF_TAG_LIGHT_SOURCE 0x9208
106#define EXIF_TAG_FLASH 0x9209
107#define EXIF_TAG_FOCAL_LENGTH 0x920a
108#define EXIF_TAG_SUBJECT_AREA 0x9214
109#define EXIF_TAG_TIFF_EP_STANDARD_ID 0x9216
110#define EXIF_TAG_MAKER_NOTE 0x927c
111#define EXIF_TAG_USER_COMMENT 0x9286
112#define EXIF_TAG_SUB_SEC_TIME 0x9290
113#define EXIF_TAG_SUB_SEC_TIME_ORIGINAL 0x9291
114#define EXIF_TAG_SUB_SEC_TIME_DIGITIZED 0x9292
115#define EXIF_TAG_XP_TITLE 0x9c9b
116#define EXIF_TAG_XP_COMMENT 0x9c9c
117#define EXIF_TAG_XP_AUTHOR 0x9c9d
118#define EXIF_TAG_XP_KEYWORDS 0x9c9e
119#define EXIF_TAG_XP_SUBJECT 0x9c9f
120#define EXIF_TAG_FLASH_PIX_VERSION 0xa000
121#define EXIF_TAG_COLOR_SPACE 0xa001
122#define EXIF_TAG_PIXEL_X_DIMENSION 0xa002
123#define EXIF_TAG_PIXEL_Y_DIMENSION 0xa003
124#define EXIF_TAG_RELATED_SOUND_FILE 0xa004
125#define EXIF_TAG_INTEROPERABILITY_IFD_POINTER 0xa005
126#define EXIF_TAG_FLASH_ENERGY 0xa20b
127#define EXIF_TAG_SPATIAL_FREQUENCY_RESPONSE 0xa20c
128#define EXIF_TAG_FOCAL_PLANE_X_RESOLUTION 0xa20e
129#define EXIF_TAG_FOCAL_PLANE_Y_RESOLUTION 0xa20f
130#define EXIF_TAG_FOCAL_PLANE_RESOLUTION_UNIT 0xa210
131#define EXIF_TAG_SUBJECT_LOCATION 0xa214
132#define EXIF_TAG_EXPOSURE_INDEX 0xa215
133#define EXIF_TAG_SENSING_METHOD 0xa217
134#define EXIF_TAG_FILE_SOURCE 0xa300
135#define EXIF_TAG_SCENE_TYPE 0xa301
136#define EXIF_TAG_NEW_CFA_PATTERN 0xa302
137#define EXIF_TAG_CUSTOM_RENDERED 0xa401
138#define EXIF_TAG_EXPOSURE_MODE 0xa402
139#define EXIF_TAG_WHITE_BALANCE 0xa403
140#define EXIF_TAG_DIGITAL_ZOOM_RATIO 0xa404
141#define EXIF_TAG_FOCAL_LENGTH_IN_35MM_FILM 0xa405
142#define EXIF_TAG_SCENE_CAPTURE_TYPE 0xa406
143#define EXIF_TAG_GAIN_CONTROL 0xa407
144#define EXIF_TAG_CONTRAST 0xa408
145#define EXIF_TAG_SATURATION 0xa409
146#define EXIF_TAG_SHARPNESS 0xa40a
147#define EXIF_TAG_DEVICE_SETTING_DESCRIPTION 0xa40b
148#define EXIF_TAG_SUBJECT_DISTANCE_RANGE 0xa40c
149#define EXIF_TAG_IMAGE_UNIQUE_ID 0xa420
150#define EXIF_TAG_CAMERA_OWNER_NAME 0xa430
151#define EXIF_TAG_BODY_SERIAL_NUMBER 0xa431
152#define EXIF_TAG_LENS_SPECIFICATION 0xa432
153#define EXIF_TAG_LENS_MAKE 0xa433
154#define EXIF_TAG_LENS_MODEL 0xa434
155#define EXIF_TAG_LENS_SERIAL_NUMBER 0xa435
156#define EXIF_TAG_COMPOSITE_IMAGE 0xa460
157#define EXIF_TAG_SOURCE_IMAGE_NUMBER_OF_COMPOSITE_IMAGE 0xa461
158#define EXIF_TAG_SOURCE_EXPOSURE_TIMES_OF_COMPOSITE_IMAGE 0xa462
159#define EXIF_TAG_GAMMA 0xa500
160#define EXIF_TAG_PRINT_IMAGE_MATCHING 0xc4a5
161#define EXIF_TAG_PADDING 0xea1c
162
163/* GPS tags overlap with above ones. */
164#define EXIF_TAG_GPS_VERSION_ID 0x0000
165#define EXIF_TAG_GPS_LATITUDE_REF 0x0001 /* INTEROPERABILITY_INDEX */
166#define EXIF_TAG_GPS_LATITUDE 0x0002 /* INTEROPERABILITY_VERSION */
167#define EXIF_TAG_GPS_LONGITUDE_REF 0x0003
168#define EXIF_TAG_GPS_LONGITUDE 0x0004
169#define EXIF_TAG_GPS_ALTITUDE_REF 0x0005
170#define EXIF_TAG_GPS_ALTITUDE 0x0006
171#define EXIF_TAG_GPS_TIME_STAMP 0x0007
172#define EXIF_TAG_GPS_SATELLITES 0x0008
173#define EXIF_TAG_GPS_STATUS 0x0009
174#define EXIF_TAG_GPS_MEASURE_MODE 0x000a
175#define EXIF_TAG_GPS_DOP 0x000b
176#define EXIF_TAG_GPS_SPEED_REF 0x000c
177#define EXIF_TAG_GPS_SPEED 0x000d
178#define EXIF_TAG_GPS_TRACK_REF 0x000e
179#define EXIF_TAG_GPS_TRACK 0x000f
180#define EXIF_TAG_GPS_IMG_DIRECTION_REF 0x0010
181#define EXIF_TAG_GPS_IMG_DIRECTION 0x0011
182#define EXIF_TAG_GPS_MAP_DATUM 0x0012
183#define EXIF_TAG_GPS_DEST_LATITUDE_REF 0x0013
184#define EXIF_TAG_GPS_DEST_LATITUDE 0x0014
185#define EXIF_TAG_GPS_DEST_LONGITUDE_REF 0x0015
186#define EXIF_TAG_GPS_DEST_LONGITUDE 0x0016
187#define EXIF_TAG_GPS_DEST_BEARING_REF 0x0017
188#define EXIF_TAG_GPS_DEST_BEARING 0x0018
189#define EXIF_TAG_GPS_DEST_DISTANCE_REF 0x0019
190#define EXIF_TAG_GPS_DEST_DISTANCE 0x001a
191#define EXIF_TAG_GPS_PROCESSING_METHOD 0x001b
192#define EXIF_TAG_GPS_AREA_INFORMATION 0x001c
193#define EXIF_TAG_GPS_DATE_STAMP 0x001d
194#define EXIF_TAG_GPS_DIFFERENTIAL 0x001e
195#define EXIF_TAG_GPS_H_POSITIONING_ERROR 0x001f
196
198typedef enum {
200 EXIF_SUPPORT_LEVEL_UNKNOWN = 0,
201
203 EXIF_SUPPORT_LEVEL_NOT_RECORDED,
204
206 EXIF_SUPPORT_LEVEL_MANDATORY,
207
209 EXIF_SUPPORT_LEVEL_OPTIONAL
210} ExifSupportLevel;
211
219EXIF_API(ExifTag) exif_tag_from_name (const char *name);
220
229EXIF_API(const char *) exif_tag_get_name_in_ifd (ExifTag tag, exif_enum(ExifIfd) ifd);
230
238EXIF_API(const char *) exif_tag_get_title_in_ifd (ExifTag tag, exif_enum(ExifIfd) ifd);
239
247EXIF_API(const char *) exif_tag_get_description_in_ifd (ExifTag tag, exif_enum(ExifIfd) ifd);
248
261EXIF_API(ExifSupportLevel) exif_tag_get_support_level_in_ifd (ExifTag tag, exif_enum(ExifIfd) ifd,
262 exif_enum(ExifDataType) t);
263
264/* Don't use these functions. They are here for compatibility only. */
265
267EXIF_API(const char *) exif_tag_get_name (ExifTag tag);
268
270EXIF_API(const char *) exif_tag_get_title (ExifTag tag);
271
273EXIF_API(const char *) exif_tag_get_description (ExifTag tag);
274
275
276/* For now, do not use these functions. */
277
279EXIF_API(ExifTag) exif_tag_table_get_tag (uint32_t n);
280
282EXIF_API(const char *) exif_tag_table_get_name (uint32_t n);
283
285EXIF_API(uint32_t) exif_tag_table_count(void);
286
287
288/* Don't use these definitions. They are here for compatibility only. */
289
291#define EXIF_TAG_UNKNOWN_C4A5 EXIF_TAG_PRINT_IMAGE_MATCHING
292
293#ifdef __cplusplus
294}
295#endif /* __cplusplus */
296
297#endif /* __EXIF_TAG_H__ */
ExifTag
uint32_t ExifTag
EXIF tags.
Definition: exif-tag.h:34
ExifSupportLevel
ExifSupportLevel
What level of support a tag enjoys in the EXIF standard.
Definition: exif-tag.h:198
EXIF_SUPPORT_LEVEL_UNKNOWN
@ EXIF_SUPPORT_LEVEL_UNKNOWN
The meaning of this tag is unknown.
Definition: exif-tag.h:200
EXIF_SUPPORT_LEVEL_OPTIONAL
@ EXIF_SUPPORT_LEVEL_OPTIONAL
This tag is optional in the given IFD.
Definition: exif-tag.h:209
EXIF_SUPPORT_LEVEL_NOT_RECORDED
@ EXIF_SUPPORT_LEVEL_NOT_RECORDED
This tag is not allowed in the given IFD.
Definition: exif-tag.h:203
EXIF_SUPPORT_LEVEL_MANDATORY
@ EXIF_SUPPORT_LEVEL_MANDATORY
This tag is mandatory in the given IFD.
Definition: exif-tag.h:206