EXIF library (libexif) API: libexif/exif-entry.h File Reference

EXIF library (libexif) API 0.6.22

Data Structures | Macros | Typedefs | Functions | Variables
exif-entry.h File Reference

Handling EXIF entries. More...

`#include <libexif/exifcont.h>`
`#include <libexif/exifform.h>`
`#include <libexif/exifmem.h>`

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.

## Typedefs
typedef struct _ExifEntry | ExifEntry
| Data found in one EXIF tag.
typedef struct _ExifEntryPrivate | ExifEntryPrivate

## Functions
| EXIF_API (ExifEntry *) exif_entry_new(void)
| Reserve memory for and initialize a new ExifEntry.
| EXIF_API (void) exif_entry_ref(ExifEntry *entry)
| Increase reference counter for ExifEntry.
| EXIF_API (const char *) exif_entry_get_value(ExifEntry *entry
| Return a localized textual representation of the value of the EXIF entry.

## Variables
ExifTag | tag
char * | val
char uint32_t | maxlen
exif_uint_t | indent

## Detailed Description

Handling EXIF entries.

## Macro Definition Documentation

## ◆ exif_entry_get_ifd

#define exif_entry_get_ifd | ( |  | e | ) | ((e) ? exif_content_get_ifd((e)->parent) : EXIF_IFD_COUNT)

Return the IFD number of the given ExifEntry.

Parameters

  [in] | e | an ExifEntry*

Returns
  ExifIfd, or EXIF_IFD_COUNT on error

## Typedef Documentation

## ◆ ExifEntry

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.

## Function Documentation

## ◆ EXIF_API() [1/3]

EXIF_API | ( | const char * |  | ) |

Return a localized textual representation of the value of the EXIF entry.

Return a textual description of the given class of error log.

Return a textual name of the given IFD.

Return a textual representation of the given EXIF data type.

Return a short textual description of the given ExifDataOption.

Return a short, localized, textual name for the given byte order.

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.

Warning
  The character set of the returned string may be in the encoding of the current locale or the native encoding of the camera.

Bug:
  The EXIF_TAG_XP_* tags are currently always returned in UTF-8, regardless of locale, and code points above U+FFFF are not supported.

Parameters

  [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

Returns
  val pointer

## ◆ EXIF_API() [2/3]

EXIF_API | ( | ExifEntry * |  | ) |

Reserve memory for and initialize a new ExifEntry.

Reserve memory for and initialize new ExifEntry using the specified memory allocator.

No memory is allocated for the `data` element of the returned ExifEntry.

Returns
  new allocated ExifEntry, or NULL on error

See also
  exif_entry_new_mem, exif_entry_unref

No memory is allocated for the `data` element of the returned ExifEntry.

Returns
  new allocated ExifEntry, or NULL on error

See also
  exif_entry_new, exif_entry_unref

Reserve memory for and initialize a new ExifEntry.

Reserve memory for and initialize new ExifEntry using the specified memory allocator.

This is a pointer into a member of the ExifContent array and must NOT be freed or unrefed by the caller.

Parameters

  [in] | content | EXIF content for an IFD
  [in] | tag | EXIF tag to return

Returns
  ExifEntry of the tag, or NULL on error

No memory is allocated for the `data` element of the returned ExifEntry.

Returns
  new allocated ExifEntry, or NULL on error

See also
  exif_entry_new, exif_entry_unref

Reserve memory for and initialize a new ExifEntry.

This is a pointer into a member of the ExifContent array and must NOT be freed or unrefed by the caller.

Parameters

  [in] | content | EXIF content for an IFD
  [in] | tag | EXIF tag to return

Returns
  ExifEntry of the tag, or NULL on error

## ◆ EXIF_API() [3/3]

EXIF_API | ( | void |  | ) |

Increase reference counter for ExifEntry.

Dump text representation of ExifEntry to stdout.

Fix the type or format of the given EXIF entry to bring it into spec.

Initialize an empty ExifEntry with default data in the correct format for the given tag.

Actually free the ExifEntry.

Decrease reference counter for ExifEntry.

Parameters

  [in] | entry | ExifEntry

See also
  exif_entry_unref

When the reference count drops to zero, free the entry.

Parameters

  [in] | entry | ExifEntry

Deprecated:
  Should not be called directly. Use exif_entry_ref and exif_entry_unref instead.

Parameters

  [in] | entry | EXIF entry

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.

Parameters

  [out] | e | entry to initialize
  [in] | tag | tag number to initialize as

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.

Note
  Unfortunately, some conversions are to a type with a more restricted range, which could have the side effect that the converted data becomes invalid. This is unlikely as the range of each tag in the standard is designed to encompass all likely data.

Parameters

  [in,out] | entry | EXIF entry

This is intended for diagnostic purposes only.

Parameters

  [in] | entry | EXIF tag data
  [in] | indent | how many levels deep to indent the data