Exiv2::Converter Class Reference

Metadata conversions. More...

Collaboration diagram for Exiv2::Converter:

Collaboration graph
[legend]
List of all members.

Public Types

typedef void(Converter::* ConvertFct )(const char *from, const char *to)
 Type for metadata converter functions, taking two key strings, from and to.

Public Member Functions

Creators
 Converter (ExifData &exifData, XmpData &xmpData)
 Constructor for Exif tags and XMP properties.
 Converter (IptcData &iptcData, XmpData &xmpData, const char *iptcCharset=0)
 Constructor for Iptc tags and XMP properties.
Manipulators
void cnvToXmp ()
 Convert Exif tags or IPTC datasets to XMP properties according to the conversion table.
void cnvFromXmp ()
 Convert XMP properties to Exif tags or IPTC datasets according to the conversion table.
void setErase (bool onoff=true)
 Set the erase flag.
void setOverwrite (bool onoff=true)
 Set the overwrite flag.
Conversion functions (manipulators)
void cnvExifValue (const char *from, const char *to)
 Simple Exif to XMP conversion function.
void cnvExifComment (const char *from, const char *to)
 Convert the tag Exif.Photo.UserComment to XMP.
void cnvExifArray (const char *from, const char *to)
 Converts Exif tag with multiple components to XMP array.
void cnvExifDate (const char *from, const char *to)
 Exif date to XMP conversion function.
void cnvExifVersion (const char *from, const char *to)
 Exif version to XMP conversion function.
void cnvExifGPSVersion (const char *from, const char *to)
 Exif GPS version to XMP conversion function.
void cnvExifFlash (const char *from, const char *to)
 Exif Flash to XMP conversion function.
void cnvExifGPSCoord (const char *from, const char *to)
 Exif GPS coordinate to XMP conversion function.
void cnvXmpValue (const char *from, const char *to)
 Simple XMP to Exif conversion function.
void cnvXmpComment (const char *from, const char *to)
 Convert the tag Xmp.exif.UserComment to Exif.
void cnvXmpArray (const char *from, const char *to)
 Converts XMP array to Exif tag with multiple components.
void cnvXmpDate (const char *from, const char *to)
 XMP to Exif date conversion function.
void cnvXmpVersion (const char *from, const char *to)
 XMP to Exif version conversion function.
void cnvXmpGPSVersion (const char *from, const char *to)
 XMP to Exif GPS version conversion function.
void cnvXmpFlash (const char *from, const char *to)
 XMP to Exif Flash conversion function.
void cnvXmpGPSCoord (const char *from, const char *to)
 XMP to Exif GPS coordinate conversion function.
void cnvIptcValue (const char *from, const char *to)
 IPTC dataset to XMP conversion function.
void cnvXmpValueToIptc (const char *from, const char *to)
 XMP to IPTC dataset conversion function.
void writeExifDigest ()
 Write exif:NativeDigest and tiff:NativeDigest properties to XMP.
void syncExifWithXmp ()
 Copies metadata in appropriate direction.
Accessors
bool erase () const
 Get the value of the erase flag, see also setErase(bool on).
bool overwrite () const
 Get the value of the overwrite flag, see also setOverwrite(bool on).

Detailed Description

Metadata conversions.


Member Typedef Documentation

typedef void(Converter::* Exiv2::Converter::ConvertFct)(const char *from, const char *to)
 

Type for metadata converter functions, taking two key strings, from and to.

These functions have access to both the source and destination metadata containers and store the result directly in the destination container.


Member Function Documentation

void Exiv2::Converter::cnvExifArray const char *  from,
const char *  to
 

Converts Exif tag with multiple components to XMP array.

Converts Exif tag with multiple components to XMP array. This function is used for ComponentsConfiguration tag.

void Exiv2::Converter::cnvExifComment const char *  from,
const char *  to
 

Convert the tag Exif.Photo.UserComment to XMP.

Todo: Convert the Exif comment to UTF-8 if necessary.

void Exiv2::Converter::cnvExifDate const char *  from,
const char *  to
 

Exif date to XMP conversion function.

Sets the XMP property to an XmpText value containing date and time. This function combines values from multiple Exif tags as described in XMP specification. It is used for DateTime, DateTimeOriginal, DateTimeDigitized and GPSTimeStamp.

void Exiv2::Converter::cnvExifFlash const char *  from,
const char *  to
 

Exif Flash to XMP conversion function.

Converts Flash tag to XMP structure.

void Exiv2::Converter::cnvExifGPSCoord const char *  from,
const char *  to
 

Exif GPS coordinate to XMP conversion function.

Converts GPS coordinates tag to XmpText value. It combines multiple Exif tags as described in XMP specification.

void Exiv2::Converter::cnvExifGPSVersion const char *  from,
const char *  to
 

Exif GPS version to XMP conversion function.

Converts GPSVersionID tag to XmpText value.

void Exiv2::Converter::cnvExifValue const char *  from,
const char *  to
 

Simple Exif to XMP conversion function.

Sets the XMP property to an XmpText value containing the Exif value string.

void Exiv2::Converter::cnvExifVersion const char *  from,
const char *  to
 

Exif version to XMP conversion function.

Converts ExifVersion tag to XmpText value.

void Exiv2::Converter::cnvIptcValue const char *  from,
const char *  to
 

IPTC dataset to XMP conversion function.

Multiple IPTC datasets with the same key are converted to an XMP array.

void Exiv2::Converter::cnvXmpArray const char *  from,
const char *  to
 

Converts XMP array to Exif tag with multiple components.

Converts XMP array to Exif tag with multiple components. This function is used for ComponentsConfiguration tag.

void Exiv2::Converter::cnvXmpDate const char *  from,
const char *  to
 

XMP to Exif date conversion function.

Converts the XmpText value to Exif date and time. This function sets multiple Exif tags as described in XMP specification. It is used for DateTime, DateTimeOriginal, DateTimeDigitized and GPSTimeStamp.

void Exiv2::Converter::cnvXmpFlash const char *  from,
const char *  to
 

XMP to Exif Flash conversion function.

Converts XMP structure to Flash tag.

void Exiv2::Converter::cnvXmpGPSCoord const char *  from,
const char *  to
 

XMP to Exif GPS coordinate conversion function.

Converts XmpText value to GPS coordinates tags. It sets multiple Exif tags as described in XMP specification.

void Exiv2::Converter::cnvXmpGPSVersion const char *  from,
const char *  to
 

XMP to Exif GPS version conversion function.

Converts XmpText value to GPSVersionID tag.

void Exiv2::Converter::cnvXmpValue const char *  from,
const char *  to
 

Simple XMP to Exif conversion function.

Sets the Exif tag according to the XMP property. For LangAlt values, only the x-default entry is used.

Todo: Escape non-ASCII characters in XMP text values

void Exiv2::Converter::cnvXmpValueToIptc const char *  from,
const char *  to
 

XMP to IPTC dataset conversion function.

Each array element of an XMP array value is added as one IPTC dataset.

void Exiv2::Converter::cnvXmpVersion const char *  from,
const char *  to
 

XMP to Exif version conversion function.

Converts XmpText value to ExifVersion tag.

void Exiv2::Converter::setErase bool  onoff = true  )  [inline]
 

Set the erase flag.

This flag indicates whether successfully converted source records are erased.

void Exiv2::Converter::setOverwrite bool  onoff = true  )  [inline]
 

Set the overwrite flag.

This flag indicates whether existing target records are overwritten.

void Exiv2::Converter::syncExifWithXmp  ) 
 

Copies metadata in appropriate direction.

From values of exif:NativeDigest and tiff:NativeDigest detects which of XMP and Exif was updated more recently and copies metadata in appropriate direction.

void Exiv2::Converter::writeExifDigest  ) 
 

Write exif:NativeDigest and tiff:NativeDigest properties to XMP.

Compute digests from Exif values and write them to exif:NativeDigest and tiff:NativeDigest properties. This should be compatible with XMP SDK.


The documentation for this class was generated from the following file:
Generated on Thu Dec 31 03:57:59 2009 for Exiv2 by  doxygen 1.3.9.1