|
EXIF library (libexif) Internals 0.6.26
|
#include <config.h>#include <libexif/exif-tag.h>#include <libexif/i18n.h>#include <stdlib.h>#include <string.h>Go to the source code of this file.
Data Structures | |
| struct | TagEntry |
| Table giving information about each EXIF tag. More... | |
Typedefs | |
| typedef const char *(* | get_stuff_func) (ExifTag tag, ExifIfd ifd) |
Functions | |
| unsigned int | exif_tag_table_count (void) |
| Return the number of entries in the EXIF tag table, including the terminating NULL entry. | |
| ExifTag | exif_tag_table_get_tag (unsigned int n) |
| const char * | exif_tag_table_get_name (unsigned int n) |
| static int | match_tag (const void *tag, const void *entry) |
| Compares the tag with that in entry. | |
| static int | exif_tag_table_first (ExifTag tag) |
| Finds the first entry in the EXIF tag table with the given tag number using a binary search. | |
| const char * | exif_tag_get_name_in_ifd (ExifTag tag, ExifIfd ifd) |
| Return a textual name of the given tag when found in the given IFD. | |
| const char * | exif_tag_get_title_in_ifd (ExifTag tag, ExifIfd ifd) |
| Return a textual title of the given tag when found in the given IFD. | |
| const char * | exif_tag_get_description_in_ifd (ExifTag tag, ExifIfd ifd) |
| Return a verbose textual description of the given tag when found in the given IFD. | |
| static const char * | exif_tag_get_stuff (ExifTag tag, get_stuff_func func) |
| const char * | exif_tag_get_name (ExifTag tag) |
| const char * | exif_tag_get_title (ExifTag tag) |
| const char * | exif_tag_get_description (ExifTag tag) |
| ExifTag | exif_tag_from_name (const char *name) |
| Return the tag ID given its unique textual name. | |
| static ExifSupportLevel | get_support_level_in_ifd (ExifTag tag, ExifIfd ifd, ExifDataType t) |
| Return the support level of a tag in the given IFD with the given data type. | |
| static ExifSupportLevel | get_support_level_any_type (ExifTag tag, ExifIfd ifd) |
| Return the support level of a tag in the given IFD, regardless of the data type. | |
| ExifSupportLevel | exif_tag_get_support_level_in_ifd (ExifTag tag, ExifIfd ifd, ExifDataType t) |
| Return whether the given tag is mandatory or not in the given IFD and data type according to the EXIF specification. | |
Variables | |
| static const struct TagEntry | ExifTagTable [] |
Definition at line 42 of file exif-tag.c.
| #define ESL_MMMM { EXIF_SUPPORT_LEVEL_MANDATORY, EXIF_SUPPORT_LEVEL_MANDATORY, EXIF_SUPPORT_LEVEL_MANDATORY, EXIF_SUPPORT_LEVEL_MANDATORY } |
Definition at line 34 of file exif-tag.c.
| #define ESL_MMMN { EXIF_SUPPORT_LEVEL_MANDATORY, EXIF_SUPPORT_LEVEL_MANDATORY, EXIF_SUPPORT_LEVEL_MANDATORY, EXIF_SUPPORT_LEVEL_NOT_RECORDED } |
Definition at line 33 of file exif-tag.c.
| #define ESL_NNMM { EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_MANDATORY, EXIF_SUPPORT_LEVEL_MANDATORY } |
Definition at line 38 of file exif-tag.c.
| #define ESL_NNMN { EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_MANDATORY, EXIF_SUPPORT_LEVEL_NOT_RECORDED } |
Definition at line 37 of file exif-tag.c.
| #define ESL_NNNM { EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_MANDATORY } |
Definition at line 39 of file exif-tag.c.
| #define ESL_NNNN { EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED } |
Definition at line 31 of file exif-tag.c.
| #define ESL_NNNO { EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_OPTIONAL } |
Definition at line 40 of file exif-tag.c.
| #define ESL_NNOO { EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_OPTIONAL, EXIF_SUPPORT_LEVEL_OPTIONAL } |
Definition at line 36 of file exif-tag.c.
| #define ESL_OMON { EXIF_SUPPORT_LEVEL_OPTIONAL, EXIF_SUPPORT_LEVEL_MANDATORY, EXIF_SUPPORT_LEVEL_OPTIONAL, EXIF_SUPPORT_LEVEL_NOT_RECORDED } |
Definition at line 35 of file exif-tag.c.
| #define ESL_OOOO { EXIF_SUPPORT_LEVEL_OPTIONAL, EXIF_SUPPORT_LEVEL_OPTIONAL, EXIF_SUPPORT_LEVEL_OPTIONAL, EXIF_SUPPORT_LEVEL_OPTIONAL } |
Definition at line 32 of file exif-tag.c.
Definition at line 43 of file exif-tag.c.
| #define ESL_UUUU { EXIF_SUPPORT_LEVEL_UNKNOWN, EXIF_SUPPORT_LEVEL_UNKNOWN, EXIF_SUPPORT_LEVEL_UNKNOWN, EXIF_SUPPORT_LEVEL_UNKNOWN } |
Definition at line 41 of file exif-tag.c.
| #define RECORDED |
Definition at line 1035 of file exif-tag.c.
Definition at line 1126 of file exif-tag.c.
| ExifTag exif_tag_from_name | ( | const char * | name | ) |
Return the tag ID given its unique textual name.
| [in] | name | tag name |
Definition at line 1171 of file exif-tag.c.
References ExifTagTable, name, TagEntry::name, and TagEntry::tag.
| const char * exif_tag_get_description | ( | ExifTag | tag | ) |
Definition at line 1163 of file exif-tag.c.
References exif_tag_get_description_in_ifd(), exif_tag_get_stuff(), and tag.
Return a verbose textual description of the given tag when found in the given IFD.
The description is a verbose, localized description of the tag.
| [in] | tag | EXIF tag |
| [in] | ifd | IFD |
Definition at line 1087 of file exif-tag.c.
References _, bindtextdomain, description, EXIF_IFD_COUNT, exif_tag_table_first(), ExifTagTable, ifd, TagEntry::name, RECORDED, and tag.
Referenced by exif_tag_get_description().
| const char * exif_tag_get_name | ( | ExifTag | tag | ) |
Definition at line 1151 of file exif-tag.c.
References exif_tag_get_name_in_ifd(), exif_tag_get_stuff(), and tag.
Referenced by content_foreach_func(), content_foreach_func(), content_foreach_func(), exif_content_add_entry(), exif_data_load_data_content(), and exif_data_load_data_entry().
Return a textual name of the given tag when found in the given IFD.
The name is a short, unique, non-localized text string containing only US-ASCII alphanumeric characters.
| [in] | tag | EXIF tag |
| [in] | ifd | IFD |
Definition at line 1042 of file exif-tag.c.
References EXIF_IFD_COUNT, exif_tag_table_first(), ExifTagTable, ifd, TagEntry::name, RECORDED, and tag.
Referenced by exif_content_fix(), exif_data_load_data_content(), exif_entry_dump(), exif_entry_fix(), exif_tag_get_name(), and name().
|
static |
Definition at line 1129 of file exif-tag.c.
References EXIF_IFD_0, EXIF_IFD_1, EXIF_IFD_COUNT, EXIF_IFD_EXIF, EXIF_IFD_GPS, EXIF_IFD_INTEROPERABILITY, and tag.
Referenced by exif_tag_get_description(), exif_tag_get_name(), and exif_tag_get_title().
| ExifSupportLevel exif_tag_get_support_level_in_ifd | ( | ExifTag | tag, |
| ExifIfd | ifd, | ||
| ExifDataType | t | ||
| ) |
Return whether the given tag is mandatory or not in the given IFD and data type according to the EXIF specification.
If the IFD given is EXIF_IFD_COUNT, the result is EXIF_SUPPORT_LEVEL_UNKNOWN. If the data type is EXIF_DATA_TYPE_UNKNOWN, the result is EXIF_SUPPORT_LEVEL_UNKNOWN unless the support level is the same for all data types.
| [in] | tag | EXIF tag |
| [in] | ifd | IFD or EXIF_IFD_COUNT |
| [in] | t | data type or EXIF_DATA_TYPE_UNKNOWN |
Definition at line 1260 of file exif-tag.c.
References EXIF_DATA_TYPE_COUNT, EXIF_IFD_COUNT, EXIF_SUPPORT_LEVEL_UNKNOWN, get_support_level_any_type(), get_support_level_in_ifd(), ifd, and tag.
Referenced by exif_content_fix(), remove_not_recorded(), and support_level().
| const char * exif_tag_get_title | ( | ExifTag | tag | ) |
Definition at line 1157 of file exif-tag.c.
References exif_tag_get_stuff(), exif_tag_get_title_in_ifd(), and tag.
Return a textual title of the given tag when found in the given IFD.
The title is a short, localized description of the tag.
| [in] | tag | EXIF tag |
| [in] | ifd | IFD |
Definition at line 1064 of file exif-tag.c.
References _, bindtextdomain, EXIF_IFD_COUNT, exif_tag_table_first(), ExifTagTable, ifd, TagEntry::name, RECORDED, tag, and title.
Referenced by exif_tag_get_title().
| unsigned int exif_tag_table_count | ( | void | ) |
Return the number of entries in the EXIF tag table, including the terminating NULL entry.
Definition at line 977 of file exif-tag.c.
References ExifTagTable.
Referenced by exif_content_fix(), exif_tag_table_first(), exif_tag_table_get_name(), exif_tag_table_get_tag(), and main().
|
static |
Finds the first entry in the EXIF tag table with the given tag number using a binary search.
| [in] | tag | to find |
Definition at line 1015 of file exif-tag.c.
References exif_tag_table_count(), ExifTagTable, match_tag(), and tag.
Referenced by exif_tag_get_description_in_ifd(), exif_tag_get_name_in_ifd(), exif_tag_get_title_in_ifd(), get_support_level_any_type(), and get_support_level_in_ifd().
| const char * exif_tag_table_get_name | ( | unsigned int | n | ) |
Definition at line 990 of file exif-tag.c.
References exif_tag_table_count(), ExifTagTable, and TagEntry::name.
Referenced by main().
| ExifTag exif_tag_table_get_tag | ( | unsigned int | n | ) |
Definition at line 984 of file exif-tag.c.
References exif_tag_table_count(), ExifTagTable, and TagEntry::tag.
Referenced by exif_content_fix(), and main().
|
inlinestatic |
Return the support level of a tag in the given IFD, regardless of the data type.
If the support level varies depending on the data type, this function returns EXIF_SUPPORT_LEVEL_UNKNOWN. If the tag is not specified in the EXIF standard, this function returns EXIF_SUPPORT_LEVEL_UNKNOWN.
| [in] | tag | EXIF tag |
| [in] | ifd | a valid IFD (not EXIF_IFD_COUNT) |
Definition at line 1226 of file exif-tag.c.
References TagEntry::esl, EXIF_DATA_TYPE_COUNT, EXIF_SUPPORT_LEVEL_NOT_RECORDED, EXIF_SUPPORT_LEVEL_UNKNOWN, exif_tag_table_first(), ExifTagTable, ifd, TagEntry::name, and tag.
Referenced by exif_tag_get_support_level_in_ifd().
|
inlinestatic |
Return the support level of a tag in the given IFD with the given data type.
If the tag is not specified in the EXIF standard, this function returns EXIF_SUPPORT_LEVEL_NOT_RECORDED.
| [in] | tag | EXIF tag |
| [in] | ifd | a valid IFD (not EXIF_IFD_COUNT) |
| [in] | t | a valid data type (not EXIF_DATA_TYPE_UNKNOWN) |
Definition at line 1196 of file exif-tag.c.
References TagEntry::esl, EXIF_SUPPORT_LEVEL_NOT_RECORDED, exif_tag_table_first(), ExifTagTable, ifd, TagEntry::name, and tag.
Referenced by exif_tag_get_support_level_in_ifd().
|
static |
Compares the tag with that in entry.
| [in] | tag | pointer to integer tag value |
| [in] | entry | pointer to a struct TagEntry |
Definition at line 1002 of file exif-tag.c.
References tag.
Referenced by exif_tag_table_first().
|
static |