EXIF library (libexif) API
0.6.21
|
Handling EXIF IFDs. More...
#include <libexif/exif-tag.h>
#include <libexif/exif-entry.h>
#include <libexif/exif-data.h>
#include <libexif/exif-log.h>
#include <libexif/exif-mem.h>
Go to the source code of this file.
Data Structures | |
struct | _ExifContent |
Macros | |
#define | exif_content_get_value(c, t, v, m) |
Return a textual representation of the EXIF data for a tag. More... | |
Typedefs | |
typedef struct _ExifContent | ExifContent |
Holds all EXIF tags in a single IFD. | |
typedef struct _ExifContentPrivate | ExifContentPrivate |
typedef void(* | ExifContentForeachEntryFunc )(ExifEntry *, void *user_data) |
Functions | |
ExifContent * | exif_content_new (void) |
ExifContent * | exif_content_new_mem (ExifMem *) |
void | exif_content_ref (ExifContent *content) |
void | exif_content_unref (ExifContent *content) |
void | exif_content_free (ExifContent *content) |
void | exif_content_add_entry (ExifContent *c, ExifEntry *entry) |
Add an EXIF tag to an IFD. More... | |
void | exif_content_remove_entry (ExifContent *c, ExifEntry *e) |
Remove an EXIF tag from an IFD. More... | |
ExifEntry * | exif_content_get_entry (ExifContent *content, ExifTag tag) |
Return the ExifEntry in this IFD corresponding to the given tag. More... | |
void | exif_content_fix (ExifContent *c) |
Fix the IFD to bring it into specification. More... | |
void | exif_content_foreach_entry (ExifContent *content, ExifContentForeachEntryFunc func, void *user_data) |
Executes function on each EXIF tag in this IFD in turn. More... | |
ExifIfd | exif_content_get_ifd (ExifContent *c) |
Return the IFD number in which the given ExifContent is found. More... | |
void | exif_content_dump (ExifContent *content, unsigned int indent) |
Dump contents of the IFD to stdout. More... | |
void | exif_content_log (ExifContent *content, ExifLog *log) |
Set the log message object for this IFD. More... | |
Handling EXIF IFDs.
#define exif_content_get_value | ( | c, | |
t, | |||
v, | |||
m | |||
) |
Return a textual representation of the EXIF data for a tag.
[in] | c | ExifContent* for an IFD |
[in] | t | ExifTag to return |
[out] | v | char* buffer in which to store value |
[in] | m | unsigned int length of the buffer v |
void exif_content_add_entry | ( | ExifContent * | c, |
ExifEntry * | entry | ||
) |
Add an EXIF tag to an IFD.
If this tag already exists in the IFD, this function does nothing.
[out] | c | IFD |
[in] | entry | EXIF entry to add |
References exif_content_get_entry(), exif_entry_ref(), exif_tag_get_name(), _ExifEntry::parent, and _ExifEntry::tag.
Referenced by exif_content_fix().
void exif_content_dump | ( | ExifContent * | content, |
unsigned int | indent | ||
) |
Dump contents of the IFD to stdout.
This is intended for diagnostic purposes only.
[in] | content | IFD data |
[in] | indent | how many levels deep to indent the data |
References exif_entry_dump().
Referenced by exif_data_dump().
void exif_content_fix | ( | ExifContent * | c | ) |
Fix the IFD to bring it into specification.
Call exif_entry_fix on each entry in this IFD to fix existing entries, create any new entries that are mandatory in this IFD but do not yet exist, and remove any entries that are not allowed in this IFD.
[in,out] | c | EXIF content for an IFD |
References exif_content_add_entry(), exif_content_foreach_entry(), exif_content_get_entry(), exif_content_get_ifd(), exif_data_get_data_type(), exif_entry_initialize(), exif_entry_new(), exif_entry_unref(), EXIF_SUPPORT_LEVEL_MANDATORY, exif_tag_get_name_in_ifd(), exif_tag_get_support_level_in_ifd(), exif_tag_table_count(), and _ExifContent::parent.
void exif_content_foreach_entry | ( | ExifContent * | content, |
ExifContentForeachEntryFunc | func, | ||
void * | user_data | ||
) |
Executes function on each EXIF tag in this IFD in turn.
The tags will not necessarily be visited in numerical order.
[in,out] | content | IFD over which to iterate |
[in] | func | function to call for each entry |
[in] | user_data | data to pass into func on each call |
Referenced by exif_content_fix().
ExifEntry* exif_content_get_entry | ( | ExifContent * | content, |
ExifTag | tag | ||
) |
Return the ExifEntry in this IFD corresponding to the given tag.
This is a pointer into a member of the ExifContent array and must NOT be freed or unrefed by the caller.
[in] | content | EXIF content for an IFD |
[in] | tag | EXIF tag to return |
References _ExifEntry::tag.
Referenced by exif_content_add_entry(), exif_content_fix(), and exif_entry_get_value().
ExifIfd exif_content_get_ifd | ( | ExifContent * | c | ) |
Return the IFD number in which the given ExifContent is found.
[in] | c | an ExifContent* |
References _ExifContent::parent.
Referenced by exif_content_fix().
void exif_content_log | ( | ExifContent * | content, |
ExifLog * | log | ||
) |
Set the log message object for this IFD.
[in] | content | IFD |
[in] | log | ExifLog* |
Referenced by exif_data_log().
void exif_content_remove_entry | ( | ExifContent * | c, |
ExifEntry * | e | ||
) |
Remove an EXIF tag from an IFD.
If this tag does not exist in the IFD, this function does nothing.
[out] | c | IFD |
[in] | e | EXIF entry to remove |
References exif_entry_unref(), and _ExifEntry::parent.