EXIF library (libexif) Internals
0.6.24
|
#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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
Variables | |
static const struct TagEntry | ExifTagTable [] |
Definition at line 40 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 32 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 31 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 36 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 35 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 37 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 29 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 38 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 34 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 33 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 30 of file exif-tag.c.
Definition at line 41 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 39 of file exif-tag.c.
#define RECORDED |
Definition at line 1031 of file exif-tag.c.
Definition at line 1122 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 1167 of file exif-tag.c.
References ExifTagTable, name, TagEntry::name, and TagEntry::tag.
const char* exif_tag_get_description | ( | ExifTag | tag | ) |
Definition at line 1159 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 1083 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 1147 of file exif-tag.c.
References exif_tag_get_name_in_ifd(), exif_tag_get_stuff(), and tag.
Referenced by 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 1038 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 1125 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 1256 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 1153 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 1060 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 973 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 1011 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 986 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 980 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 1222 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 1192 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 998 of file exif-tag.c.
References tag.
Referenced by exif_tag_table_first().
|
static |