EXIF library (libexif) API 0.6.24
|
Handling EXIF entries. More...
Go to the source code of this file.
Data Structures | |
struct | _ExifEntry |
Data found in one EXIF tag. More... | |
Macros | |
#define | exif_entry_get_ifd(e) ((e)?exif_content_get_ifd((e)->parent):EXIF_IFD_COUNT) |
Return the IFD number of the given ExifEntry. More... | |
Typedefs | |
typedef struct _ExifEntry | ExifEntry |
Data found in one EXIF tag. More... | |
typedef struct _ExifEntryPrivate | ExifEntryPrivate |
Functions | |
ExifEntry * | exif_entry_new (void) |
Reserve memory for and initialize a new ExifEntry. More... | |
ExifEntry * | exif_entry_new_mem (ExifMem *) |
Reserve memory for and initialize new ExifEntry using the specified memory allocator. More... | |
void | exif_entry_ref (ExifEntry *entry) |
Increase reference counter for ExifEntry. More... | |
void | exif_entry_unref (ExifEntry *entry) |
Decrease reference counter for ExifEntry. More... | |
void | exif_entry_free (ExifEntry *entry) |
Actually free the ExifEntry. More... | |
void | exif_entry_initialize (ExifEntry *e, ExifTag tag) |
Initialize an empty ExifEntry with default data in the correct format for the given tag. More... | |
void | exif_entry_fix (ExifEntry *entry) |
Fix the type or format of the given EXIF entry to bring it into spec. More... | |
const char * | exif_entry_get_value (ExifEntry *entry, char *val, unsigned int maxlen) |
Return a localized textual representation of the value of the EXIF entry. More... | |
void | exif_entry_dump (ExifEntry *entry, unsigned int indent) |
Dump text representation of ExifEntry to stdout. More... | |
Handling EXIF entries.
#define exif_entry_get_ifd | ( | e | ) | ((e)?exif_content_get_ifd((e)->parent):EXIF_IFD_COUNT) |
typedef struct _ExifEntry ExifEntry |
Data found in one EXIF tag.
The exif_entry_get_value function can provide access to the formatted contents, or the struct members can be used directly to access the raw contents.
void exif_entry_dump | ( | ExifEntry * | entry, |
unsigned int | indent | ||
) |
Dump text representation of ExifEntry to stdout.
This is intended for diagnostic purposes only.
[in] | entry | EXIF tag data |
[in] | indent | how many levels deep to indent the data |
void exif_entry_fix | ( | ExifEntry * | entry | ) |
Fix the type or format of the given EXIF entry to bring it into spec.
If the data for this EXIF tag is in of the wrong type or is in an invalid format according to the EXIF specification, then it is converted to make it valid. This may involve, for example, converting an EXIF_FORMAT_LONG into a EXIF_FORMAT_SHORT. If the tag is unknown, its value is untouched.
[in,out] | entry | EXIF entry |
References _ExifEntry::priv, and _ExifEntry::tag.
void exif_entry_free | ( | ExifEntry * | entry | ) |
Actually free the ExifEntry.
[in] | entry | EXIF entry |
References _ExifEntry::data, and _ExifEntry::priv.
Referenced by exif_entry_unref().
const char * exif_entry_get_value | ( | ExifEntry * | entry, |
char * | val, | ||
unsigned int | maxlen | ||
) |
Return a localized textual representation of the value of the EXIF entry.
This is meant for display to the user. The format of each tag is subject to change between locales and in newer versions of libexif. Users who require the tag data in an unambiguous form should access the data members of the ExifEntry structure directly.
[in] | entry | EXIF entry |
[out] | val | buffer in which to store value; if entry is valid and maxlen > 0 then this string will be NUL-terminated |
[in] | maxlen | length of the buffer val |
References _ExifEntry::components, exif_data_get_byte_order(), exif_format_get_size(), _ExifEntry::format, _ExifContent::parent, _ExifEntry::parent, _ExifEntry::size, and _ExifEntry::tag.
Initialize an empty ExifEntry with default data in the correct format for the given tag.
If the entry is already initialized, this function does nothing. This call allocates memory for the data
element of the given ExifEntry. That memory is freed at the same time as the ExifEntry.
[out] | e | entry to initialize |
[in] | tag | tag number to initialize as |
References _ExifEntry::data, exif_data_get_byte_order(), exif_entry_get_ifd, _ExifContent::parent, _ExifEntry::parent, and _ExifEntry::tag.
ExifEntry * exif_entry_new | ( | void | ) |
Reserve memory for and initialize a new ExifEntry.
No memory is allocated for the data
element of the returned ExifEntry.
References exif_entry_new_mem(), exif_mem_new_default(), and exif_mem_unref().
Reserve memory for and initialize new ExifEntry using the specified memory allocator.
No memory is allocated for the data
element of the returned ExifEntry.
Referenced by exif_entry_new().
void exif_entry_ref | ( | ExifEntry * | entry | ) |
Increase reference counter for ExifEntry.
[in] | entry | ExifEntry |
References _ExifEntry::priv.
void exif_entry_unref | ( | ExifEntry * | entry | ) |
Decrease reference counter for ExifEntry.
When the reference count drops to zero, free the entry.
[in] | entry | ExifEntry |
References exif_entry_free(), and _ExifEntry::priv.
Referenced by exif_content_free().