EXIF library (libexif) Internals  0.6.24
exif-entry.c File Reference
#include <config.h>
#include <libexif/exif-entry.h>
#include <libexif/exif-ifd.h>
#include <libexif/exif-utils.h>
#include <libexif/i18n.h>
#include <libexif/exif-gps-ifd.h>
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <math.h>
Include dependency graph for exif-entry.c:

Go to the source code of this file.

Data Structures

struct  _ExifEntryPrivate
 

Macros

#define M_PI   3.14159265358979323846
 
#define CF(entry, target, v, maxlen)
 
#define CC(entry, target, v, maxlen)
 

Functions

ExifLogexif_data_get_log (ExifData *)
 
static void exif_entry_log (ExifEntry *e, ExifLogCode code, const char *format,...)
 
static void * exif_entry_alloc (ExifEntry *e, unsigned int i)
 
static void * exif_entry_realloc (ExifEntry *e, void *d_orig, unsigned int i)
 
ExifEntryexif_entry_new (void)
 Reserve memory for and initialize a new ExifEntry. More...
 
ExifEntryexif_entry_new_mem (ExifMem *mem)
 Reserve memory for and initialize new ExifEntry using the specified memory allocator. More...
 
void exif_entry_ref (ExifEntry *e)
 Increase reference counter for ExifEntry. More...
 
void exif_entry_unref (ExifEntry *e)
 Decrease reference counter for ExifEntry. More...
 
void exif_entry_free (ExifEntry *e)
 Actually free the ExifEntry. More...
 
static void clear_entry (ExifEntry *e)
 
static ExifShort exif_get_short_convert (const unsigned char *buf, ExifFormat format, ExifByteOrder order)
 Get a value and convert it to an ExifShort. More...
 
void exif_entry_fix (ExifEntry *e)
 Fix the type or format of the given EXIF entry to bring it into spec. More...
 
static void exif_entry_format_value (ExifEntry *e, char *val, size_t maxlen)
 Format the value of an ExifEntry for human display in a generic way. More...
 
void exif_entry_dump (ExifEntry *e, unsigned int indent)
 Dump text representation of ExifEntry to stdout. More...
 
static int match_repeated_char (const unsigned char *data, unsigned char ch, size_t n)
 Check if a string consists entirely of a single, repeated character. More...
 
const char * exif_entry_get_value (ExifEntry *e, char *val, unsigned int maxlen)
 Return a localized textual representation of the value of the EXIF entry. More...
 
static void exif_entry_initialize_gps (ExifEntry *e, ExifTag tag)
 
void exif_entry_initialize (ExifEntry *e, ExifTag tag)
 Initialize an empty ExifEntry with default data in the correct format for the given tag. More...
 

Variables

struct {
   ExifTag   tag
 
   const char *   strings [10]
 
list []
 
struct {
   ExifTag   tag
 
   struct {
      ExifShort   index
 
      const char *   values [4]
 list of progressively shorter string descriptions; the longest one that fits will be selected More...
 
   }   elem [25]
 
list2 []
 

Macro Definition Documentation

◆ CC

#define CC (   entry,
  target,
  v,
  maxlen 
)
Value:
{ \
if (entry->components != target) { \
exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA, \
_("The tag '%s' contains an invalid number of " \
"components (%i, expected %i)."), \
exif_tag_get_name (entry->tag), \
(int) entry->components, (int) target); \
break; \
} \
}
@ EXIF_LOG_CODE_CORRUPT_DATA
Definition: exif-log.h:58
const char * exif_tag_get_name(ExifTag tag)
Definition: exif-tag.c:1147
#define _(String)
Definition: i18n.h:48

Definition at line 657 of file exif-entry.c.

◆ CF

#define CF (   entry,
  target,
  v,
  maxlen 
)
Value:
{ \
if (entry->format != target) { \
exif_entry_log (entry, EXIF_LOG_CODE_CORRUPT_DATA, \
_("The tag '%s' contains data of an invalid " \
"format ('%s', expected '%s')."), \
exif_tag_get_name (entry->tag), \
exif_format_get_name (entry->format), \
exif_format_get_name (target)); \
break; \
} \
}
const char * exif_format_get_name(ExifFormat format)
Return a textual representation of the given EXIF data type.
Definition: exif-format.c:53

Definition at line 644 of file exif-entry.c.

◆ M_PI

#define M_PI   3.14159265358979323846

Definition at line 38 of file exif-entry.c.

Function Documentation

◆ clear_entry()

static void clear_entry ( ExifEntry e)
static

◆ exif_data_get_log()

ExifLog* exif_data_get_log ( ExifData data)

Definition at line 1250 of file exif-data.c.

References _ExifDataPrivate::log, and _ExifData::priv.

Referenced by exif_entry_alloc(), exif_entry_log(), and exif_entry_realloc().

◆ exif_entry_alloc()

static void* exif_entry_alloc ( ExifEntry e,
unsigned int  i 
)
static

Definition at line 75 of file exif-entry.c.

References exif_data_get_log(), EXIF_LOG_NO_MEMORY, exif_mem_alloc(), _ExifEntryPrivate::mem, _ExifContent::parent, _ExifEntry::parent, and _ExifEntry::priv.

Referenced by exif_entry_fix(), exif_entry_initialize(), and exif_entry_initialize_gps().

Here is the call graph for this function:

◆ exif_entry_dump()

void exif_entry_dump ( ExifEntry entry,
unsigned int  indent 
)

Dump text representation of ExifEntry to stdout.

This is intended for diagnostic purposes only.

Parameters
[in]entryEXIF tag data
[in]indenthow many levels deep to indent the data

Definition at line 598 of file exif-entry.c.

References _ExifEntry::components, exif_entry_get_ifd, exif_entry_get_value(), exif_format_get_name(), exif_tag_get_name_in_ifd(), _ExifEntry::format, MIN, _ExifEntry::size, and _ExifEntry::tag.

Referenced by entry_null_test(), and exif_content_dump().

Here is the call graph for this function:

◆ exif_entry_fix()

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.

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]entryEXIF entry

Definition at line 205 of file exif-entry.c.

References _, clear_entry(), _ExifEntry::components, _ExifEntry::data, ExifRational::denominator, ExifSRational::denominator, exif_data_get_byte_order(), exif_entry_alloc(), exif_entry_get_ifd, exif_entry_log(), exif_entry_realloc(), EXIF_FORMAT_BYTE, exif_format_get_name(), exif_format_get_size(), EXIF_FORMAT_LONG, EXIF_FORMAT_RATIONAL, EXIF_FORMAT_SBYTE, EXIF_FORMAT_SHORT, EXIF_FORMAT_SLONG, EXIF_FORMAT_SRATIONAL, EXIF_FORMAT_SSHORT, EXIF_FORMAT_UNDEFINED, exif_get_rational(), exif_get_short_convert(), exif_get_srational(), EXIF_LOG_CODE_CORRUPT_DATA, EXIF_LOG_CODE_DEBUG, EXIF_LOG_CODE_NO_MEMORY, exif_mem_free(), exif_set_rational(), exif_set_short(), exif_set_srational(), EXIF_TAG_APERTURE_VALUE, EXIF_TAG_BRIGHTNESS_VALUE, EXIF_TAG_COLOR_SPACE, EXIF_TAG_CONTRAST, EXIF_TAG_CUSTOM_RENDERED, EXIF_TAG_EXPOSURE_BIAS_VALUE, EXIF_TAG_EXPOSURE_MODE, EXIF_TAG_EXPOSURE_TIME, EXIF_TAG_FNUMBER, EXIF_TAG_FOCAL_LENGTH, EXIF_TAG_GAIN_CONTROL, exif_tag_get_name_in_ifd(), EXIF_TAG_ISO_SPEED_RATINGS, EXIF_TAG_ORIENTATION, EXIF_TAG_PHOTOMETRIC_INTERPRETATION, EXIF_TAG_PLANAR_CONFIGURATION, EXIF_TAG_SATURATION, EXIF_TAG_SCENE_CAPTURE_TYPE, EXIF_TAG_SENSING_METHOD, EXIF_TAG_SHARPNESS, EXIF_TAG_SHUTTER_SPEED_VALUE, EXIF_TAG_SUBJECT_AREA, EXIF_TAG_USER_COMMENT, EXIF_TAG_WHITE_BALANCE, EXIF_TAG_YCBCR_POSITIONING, EXIF_TAG_YCBCR_SUB_SAMPLING, _ExifEntry::format, _ExifEntryPrivate::mem, ExifRational::numerator, ExifSRational::numerator, _ExifContent::parent, _ExifEntry::parent, _ExifEntry::priv, _ExifEntry::size, and _ExifEntry::tag.

Referenced by entry_null_test(), fix_func(), and main().

Here is the call graph for this function:

◆ exif_entry_format_value()

static void exif_entry_format_value ( ExifEntry e,
char *  val,
size_t  maxlen 
)
static

Format the value of an ExifEntry for human display in a generic way.

The output is localized. The formatting is independent of the tag number and is based entirely on the data type.

Precondition
The ExifEntry is already a member of an ExifData.
Parameters
[in]eEXIF entry
[out]valbuffer in which to store value
[in]maxlenthe length of the buffer val

Definition at line 451 of file exif-entry.c.

References _, _ExifEntry::components, _ExifEntry::data, ExifRational::denominator, ExifSRational::denominator, exif_data_get_byte_order(), EXIF_FORMAT_ASCII, EXIF_FORMAT_BYTE, EXIF_FORMAT_DOUBLE, EXIF_FORMAT_FLOAT, exif_format_get_size(), EXIF_FORMAT_LONG, EXIF_FORMAT_RATIONAL, EXIF_FORMAT_SBYTE, EXIF_FORMAT_SHORT, EXIF_FORMAT_SLONG, EXIF_FORMAT_SRATIONAL, EXIF_FORMAT_SSHORT, EXIF_FORMAT_UNDEFINED, exif_get_long(), exif_get_rational(), exif_get_short(), exif_get_slong(), exif_get_srational(), exif_get_sshort(), _ExifEntry::format, MIN, ExifRational::numerator, ExifSRational::numerator, _ExifContent::parent, _ExifEntry::parent, and _ExifEntry::size.

Referenced by exif_entry_get_value().

Here is the call graph for this function:

◆ exif_entry_free()

void exif_entry_free ( ExifEntry entry)

Actually free the ExifEntry.

Deprecated:
Should not be called directly. Use exif_entry_ref and exif_entry_unref instead.
Parameters
[in]entryEXIF entry

Definition at line 157 of file exif-entry.c.

References _ExifEntry::data, exif_mem_free(), exif_mem_unref(), _ExifEntryPrivate::mem, and _ExifEntry::priv.

Referenced by entry_null_test(), and exif_entry_unref().

Here is the call graph for this function:

◆ exif_entry_get_value()

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.

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]entryEXIF entry
[out]valbuffer in which to store value; if entry is valid and maxlen > 0 then this string will be NUL-terminated
[in]maxlenlength of the buffer val
Returns
val pointer

Definition at line 846 of file exif-entry.c.

References _, bindtextdomain, CC, CF, _ExifEntry::components, _ExifEntry::data, ExifRational::denominator, ExifSRational::denominator, elem, exif_content_get_entry(), exif_convert_utf16_to_utf8(), exif_data_get_byte_order(), exif_entry_format_value(), exif_entry_log(), EXIF_FORMAT_ASCII, EXIF_FORMAT_BYTE, exif_format_get_size(), EXIF_FORMAT_RATIONAL, EXIF_FORMAT_SHORT, EXIF_FORMAT_SRATIONAL, EXIF_FORMAT_UNDEFINED, exif_get_rational(), exif_get_short(), exif_get_srational(), EXIF_IFD_0, EXIF_LOG_CODE_DEBUG, exif_mem_alloc(), exif_mem_free(), EXIF_TAG_APERTURE_VALUE, EXIF_TAG_BRIGHTNESS_VALUE, EXIF_TAG_COLOR_SPACE, EXIF_TAG_COMPONENTS_CONFIGURATION, EXIF_TAG_COMPRESSION, EXIF_TAG_CONTRAST, EXIF_TAG_COPYRIGHT, EXIF_TAG_CUSTOM_RENDERED, EXIF_TAG_EXIF_VERSION, EXIF_TAG_EXPOSURE_BIAS_VALUE, EXIF_TAG_EXPOSURE_MODE, EXIF_TAG_EXPOSURE_PROGRAM, EXIF_TAG_EXPOSURE_TIME, EXIF_TAG_FILE_SOURCE, EXIF_TAG_FLASH, EXIF_TAG_FLASH_PIX_VERSION, EXIF_TAG_FNUMBER, EXIF_TAG_FOCAL_LENGTH, EXIF_TAG_FOCAL_PLANE_RESOLUTION_UNIT, EXIF_TAG_GAIN_CONTROL, EXIF_TAG_GPS_ALTITUDE_REF, EXIF_TAG_GPS_TIME_STAMP, EXIF_TAG_GPS_VERSION_ID, EXIF_TAG_INTEROPERABILITY_VERSION, EXIF_TAG_LIGHT_SOURCE, EXIF_TAG_MAKE, EXIF_TAG_MAX_APERTURE_VALUE, EXIF_TAG_METERING_MODE, EXIF_TAG_MODEL, EXIF_TAG_ORIENTATION, EXIF_TAG_PHOTOMETRIC_INTERPRETATION, EXIF_TAG_PLANAR_CONFIGURATION, EXIF_TAG_RESOLUTION_UNIT, EXIF_TAG_SATURATION, EXIF_TAG_SCENE_CAPTURE_TYPE, EXIF_TAG_SCENE_TYPE, EXIF_TAG_SENSING_METHOD, EXIF_TAG_SENSITIVITY_TYPE, EXIF_TAG_SHARPNESS, EXIF_TAG_SHUTTER_SPEED_VALUE, EXIF_TAG_SUBJECT_AREA, EXIF_TAG_SUBJECT_DISTANCE, EXIF_TAG_SUBJECT_DISTANCE_RANGE, EXIF_TAG_USER_COMMENT, EXIF_TAG_WHITE_BALANCE, EXIF_TAG_XP_AUTHOR, EXIF_TAG_XP_COMMENT, EXIF_TAG_XP_KEYWORDS, EXIF_TAG_XP_SUBJECT, EXIF_TAG_XP_TITLE, EXIF_TAG_YCBCR_POSITIONING, EXIF_TAG_YCBCR_SUB_SAMPLING, _ExifEntry::format, _ExifData::ifd, index, list, list2, M_PI, match_repeated_char(), _ExifEntryPrivate::mem, MIN, ExifRational::numerator, ExifSRational::numerator, _ExifContent::parent, _ExifEntry::parent, _ExifEntry::priv, _ExifEntry::size, strings, tag, _ExifEntry::tag, and values.

Referenced by check_entry_trunc(), content_foreach_func(), entry_null_test(), exif_entry_dump(), exif_mnote_data_canon_identify(), and exif_mnote_data_olympus_identify().

Here is the call graph for this function:

◆ exif_entry_initialize()

void exif_entry_initialize ( ExifEntry e,
ExifTag  tag 
)

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

Bug:
Log and report failed exif_mem_malloc() calls.

Definition at line 1459 of file exif-entry.c.

References _, clear_entry(), _ExifEntry::components, _ExifEntry::data, ExifRational::denominator, exif_data_get_byte_order(), exif_entry_alloc(), exif_entry_get_ifd, exif_entry_initialize_gps(), EXIF_FORMAT_ASCII, exif_format_get_size(), EXIF_FORMAT_LONG, EXIF_FORMAT_RATIONAL, EXIF_FORMAT_SHORT, EXIF_FORMAT_SRATIONAL, EXIF_FORMAT_UNDEFINED, EXIF_IFD_GPS, exif_set_rational(), exif_set_short(), EXIF_TAG_APERTURE_VALUE, EXIF_TAG_ARTIST, EXIF_TAG_BITS_PER_SAMPLE, EXIF_TAG_BRIGHTNESS_VALUE, EXIF_TAG_COLOR_SPACE, EXIF_TAG_COMPONENTS_CONFIGURATION, EXIF_TAG_COMPRESSED_BITS_PER_PIXEL, EXIF_TAG_COMPRESSION, EXIF_TAG_CONTRAST, EXIF_TAG_COPYRIGHT, EXIF_TAG_CUSTOM_RENDERED, EXIF_TAG_DATE_TIME, EXIF_TAG_DATE_TIME_DIGITIZED, EXIF_TAG_DATE_TIME_ORIGINAL, EXIF_TAG_DIGITAL_ZOOM_RATIO, EXIF_TAG_EXIF_IFD_POINTER, EXIF_TAG_EXIF_VERSION, EXIF_TAG_EXPOSURE_BIAS_VALUE, EXIF_TAG_EXPOSURE_INDEX, EXIF_TAG_EXPOSURE_MODE, EXIF_TAG_EXPOSURE_PROGRAM, EXIF_TAG_EXPOSURE_TIME, EXIF_TAG_FILE_SOURCE, EXIF_TAG_FLASH, EXIF_TAG_FLASH_ENERGY, EXIF_TAG_FLASH_PIX_VERSION, EXIF_TAG_FNUMBER, EXIF_TAG_FOCAL_LENGTH, EXIF_TAG_FOCAL_LENGTH_IN_35MM_FILM, EXIF_TAG_FOCAL_PLANE_RESOLUTION_UNIT, EXIF_TAG_FOCAL_PLANE_X_RESOLUTION, EXIF_TAG_FOCAL_PLANE_Y_RESOLUTION, EXIF_TAG_GAIN_CONTROL, EXIF_TAG_GPS_INFO_IFD_POINTER, EXIF_TAG_IMAGE_DESCRIPTION, EXIF_TAG_IMAGE_LENGTH, EXIF_TAG_IMAGE_WIDTH, EXIF_TAG_INTEROPERABILITY_IFD_POINTER, EXIF_TAG_ISO_SPEED_RATINGS, EXIF_TAG_JPEG_INTERCHANGE_FORMAT, EXIF_TAG_JPEG_INTERCHANGE_FORMAT_LENGTH, EXIF_TAG_LIGHT_SOURCE, EXIF_TAG_MAKE, EXIF_TAG_MAKER_NOTE, EXIF_TAG_MAX_APERTURE_VALUE, EXIF_TAG_METERING_MODE, EXIF_TAG_MODEL, EXIF_TAG_ORIENTATION, EXIF_TAG_PHOTOMETRIC_INTERPRETATION, EXIF_TAG_PIXEL_X_DIMENSION, EXIF_TAG_PIXEL_Y_DIMENSION, EXIF_TAG_PLANAR_CONFIGURATION, EXIF_TAG_PRIMARY_CHROMATICITIES, EXIF_TAG_REFERENCE_BLACK_WHITE, EXIF_TAG_RESOLUTION_UNIT, EXIF_TAG_SAMPLES_PER_PIXEL, EXIF_TAG_SATURATION, EXIF_TAG_SCENE_CAPTURE_TYPE, EXIF_TAG_SCENE_TYPE, EXIF_TAG_SENSING_METHOD, EXIF_TAG_SENSITIVITY_TYPE, EXIF_TAG_SHARPNESS, EXIF_TAG_SHUTTER_SPEED_VALUE, EXIF_TAG_SOFTWARE, EXIF_TAG_SUB_SEC_TIME, EXIF_TAG_SUB_SEC_TIME_DIGITIZED, EXIF_TAG_SUB_SEC_TIME_ORIGINAL, EXIF_TAG_SUBJECT_DISTANCE, EXIF_TAG_SUBJECT_DISTANCE_RANGE, EXIF_TAG_SUBJECT_LOCATION, EXIF_TAG_USER_COMMENT, EXIF_TAG_WHITE_BALANCE, EXIF_TAG_WHITE_POINT, EXIF_TAG_X_RESOLUTION, EXIF_TAG_Y_RESOLUTION, EXIF_TAG_YCBCR_POSITIONING, EXIF_TAG_YCBCR_SUB_SAMPLING, _ExifEntry::format, ExifRational::numerator, _ExifContent::parent, _ExifEntry::parent, _ExifEntry::size, tag, and _ExifEntry::tag.

Referenced by entry_null_test(), exif_content_fix(), and main().

Here is the call graph for this function:

◆ exif_entry_initialize_gps()

static void exif_entry_initialize_gps ( ExifEntry e,
ExifTag  tag 
)
static

Definition at line 1422 of file exif-entry.c.

References clear_entry(), _ExifEntry::components, ExifGPSIfdTagInfo::components, _ExifEntry::data, ExifGPSIfdTagInfo::default_size, ExifGPSIfdTagInfo::default_value, exif_entry_alloc(), exif_format_get_size(), EXIF_FORMAT_UNDEFINED, exif_get_gps_tag_info(), _ExifEntry::format, ExifGPSIfdTagInfo::format, _ExifEntry::size, and tag.

Referenced by exif_entry_initialize().

Here is the call graph for this function:

◆ exif_entry_log()

static void exif_entry_log ( ExifEntry e,
ExifLogCode  code,
const char *  format,
  ... 
)
static

Definition at line 53 of file exif-entry.c.

References code, exif_data_get_log(), exif_logv(), format, _ExifContent::parent, and _ExifEntry::parent.

Referenced by exif_entry_fix(), and exif_entry_get_value().

Here is the call graph for this function:

◆ exif_entry_new()

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.

Returns
new allocated ExifEntry, or NULL on error
See also
exif_entry_new_mem, exif_entry_unref

Definition at line 111 of file exif-entry.c.

References exif_entry_new_mem(), exif_mem_new_default(), and exif_mem_unref().

Referenced by exif_content_fix(), and main().

Here is the call graph for this function:

◆ exif_entry_new_mem()

ExifEntry* exif_entry_new_mem ( ExifMem mem)

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, exif_entry_unref

Definition at line 122 of file exif-entry.c.

References exif_mem_alloc(), exif_mem_free(), exif_mem_ref(), _ExifEntryPrivate::mem, _ExifEntry::priv, and _ExifEntryPrivate::ref_count.

Referenced by entry_null_test(), exif_data_load_data_content(), exif_entry_new(), and main().

Here is the call graph for this function:

◆ exif_entry_realloc()

static void* exif_entry_realloc ( ExifEntry e,
void *  d_orig,
unsigned int  i 
)
static

Definition at line 92 of file exif-entry.c.

References exif_data_get_log(), EXIF_LOG_NO_MEMORY, exif_mem_free(), exif_mem_realloc(), _ExifEntryPrivate::mem, _ExifContent::parent, _ExifEntry::parent, and _ExifEntry::priv.

Referenced by exif_entry_fix().

Here is the call graph for this function:

◆ exif_entry_ref()

void exif_entry_ref ( ExifEntry entry)

Increase reference counter for ExifEntry.

Parameters
[in]entryExifEntry
See also
exif_entry_unref

Definition at line 139 of file exif-entry.c.

References _ExifEntry::priv, and _ExifEntryPrivate::ref_count.

Referenced by entry_null_test(), and exif_content_add_entry().

◆ exif_entry_unref()

void exif_entry_unref ( ExifEntry entry)

Decrease reference counter for ExifEntry.

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

Parameters
[in]entryExifEntry

Definition at line 147 of file exif-entry.c.

References exif_entry_free(), _ExifEntry::priv, and _ExifEntryPrivate::ref_count.

Referenced by entry_null_test(), exif_content_fix(), exif_content_free(), exif_content_remove_entry(), exif_data_load_data_content(), and main().

Here is the call graph for this function:

◆ exif_get_short_convert()

static ExifShort exif_get_short_convert ( const unsigned char *  buf,
ExifFormat  format,
ExifByteOrder  order 
)
inlinestatic

Get a value and convert it to an ExifShort.

Bug:
Not all types are converted that could be converted and no indication is made when that occurs

Definition at line 183 of file exif-entry.c.

References EXIF_FORMAT_BYTE, EXIF_FORMAT_LONG, EXIF_FORMAT_SBYTE, EXIF_FORMAT_SHORT, EXIF_FORMAT_SLONG, EXIF_FORMAT_SSHORT, exif_get_long(), exif_get_short(), exif_get_slong(), exif_get_sshort(), and format.

Referenced by exif_entry_fix().

Here is the call graph for this function:

◆ match_repeated_char()

static int match_repeated_char ( const unsigned char *  data,
unsigned char  ch,
size_t  n 
)
static

Check if a string consists entirely of a single, repeated character.

Up to first n bytes are checked.

Parameters
[in]datapointer of string to check
[in]chcharacter to match
[in]nmaximum number of characters to match
Returns
0 if the string matches or is of zero length, nonzero otherwise

Definition at line 630 of file exif-entry.c.

Referenced by exif_entry_get_value().

Variable Documentation

◆ 

struct { ... } elem[25]

Referenced by exif_entry_get_value().

◆ index

ExifShort index

Definition at line 713 of file exif-entry.c.

Referenced by exif_entry_get_value().

◆ 

const { ... } list[]

Referenced by exif_entry_get_value().

◆ 

const { ... } list2[]

Referenced by exif_entry_get_value().

◆ strings

const char* strings[10]

Definition at line 671 of file exif-entry.c.

Referenced by exif_entry_get_value().

◆ tag

◆ values

const char* values[4]

list of progressively shorter string descriptions; the longest one that fits will be selected

Definition at line 714 of file exif-entry.c.

Referenced by exif_entry_get_value().


libexif Generated by doxygen