[][src]Crate rexiv2

This library provides a Rust wrapper around the gexiv2 library, which is itself a GObject-based wrapper around the Exiv2 library, which provides read and write access to the Exif, XMP, and IPTC metadata for media files in various formats.

Most functionality is exposed through methods on the Metadata type.

Usage

A typical use of the library might look something like this:

let file = "myimage.jpg";
let tag = "Iptc.Application2.Keywords";
let meta = rexiv2::Metadata::new_from_path(&file).unwrap();
println!("{:?}", meta.get_tag_multiple_strings(tag));

Structs

GpsInfo

Container for the three GPS coordinates: longitude, latitude, and altitude.

Metadata

An opaque structure that serves as a container for a media file's metadata.

PreviewImage

An opaque structure that serves as a container for a preview image.

Enums

MediaType

The media types that an image might have.

Orientation

All the possible orientations for an image.

Rexiv2Error

A wrapper type for the kinds of errors one might encounter when using the library.

TagType

The possible data types that a tag can have.

Functions

get_tag_description

Get the long-form description of a tag.

get_tag_label

Get a short label for a tag.

get_tag_type

Determine the type of the given tag.

initialize

Initialize gexiv2.

is_exif_tag

Indicates whether the given tag is from the Exif domain.

is_iptc_tag

Indicates whether the given tag is part of the IPTC domain.

is_xmp_tag

Indicates whether the given tag is from the XMP domain.

register_xmp_namespace

Add a new XMP namespace for tags to exist under.

unregister_all_xmp_namespaces

Forget all known XMP namespaces.

unregister_xmp_namespace

Remove an XMP namespace from the set of known ones.

Type Definitions

Result

A specialized Result type that specifies the Err instances will be Rexiv2Errors.