Struct rexiv2::Metadata [] [src]

pub struct Metadata { /* fields omitted */ }

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

Methods

impl Metadata
[src]

Load the metadata from the file found at the given path.

Examples

let path = "myphoto.jpg";
let meta = rexiv2::Metadata::new_from_path(&path).unwrap();
assert_eq!(meta.get_media_type().unwrap(), rexiv2::MediaType::Jpeg);

Load the metadata from the given data buffer.

Examples

let minipng = [137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 0, 1,
               0, 0, 0, 1, 8, 0, 0, 0, 0, 58, 126, 155, 85, 0, 0, 0, 10, 73, 68, 65, 84,
               8, 215, 99, 248, 15, 0, 1, 1, 1, 0, 27, 182, 238, 86, 0, 0, 0, 0, 73, 69,
               78, 68, 174, 66, 96, 130];
let meta = rexiv2::Metadata::new_from_buffer(&minipng).unwrap();
assert_eq!(meta.get_media_type().unwrap(), rexiv2::MediaType::Png);

Save metadata to the file found at the given path, which must already exist.

Determine whether the type of file loaded supports Exif metadata.

Determine whether the type of file loaded supports IPTC metadata.

Determine whether the type of file loaded supports XMP metadata.

Return the media type of the loaded file.

Get the actual un-rotated/un-oriented pixel width of the loaded image.

Note that this may be different from the values reported by some metadata tags that take into account the intended orientation of the image.

Get the actual un-rotated/un-oriented pixel height of the loaded image.

Note that this may be different from the values reported by some metadata tags that take into account the intended orientation of the image.

Indicates whether the given tag is present/populated in the loaded metadata.

Removes the tag from the metadata if it exists. Returns whether it was there originally.

Remove all tag values from the metadata.

Indicates whether the loaded file contains any Exif metadata.

Removes all Exif metadata.

List all Exif tags present in the loaded metadata.

Indicates whether the loaded file contains any XMP metadata.

Removes all XMP metadata.

List all XMP tags present in the loaded metadata.

Indicates whether the loaded file contains any IPTC metadata.

Removes all XMP metadata.

List all IPTC tags present in the loaded metadata.

Get the value of a tag as a string.

Only safe if the tag is really of a string type.

Set the value of a tag to the given string.

Only safe if the tag is really of a string type.

Get the value of a tag as a string, potentially formatted for user-visible display.

Only safe if the tag is really of a string type.

Retrieve the list of string values of the given tag.

Only safe if the tag is in fact of a string type.

Store the given strings as the values of a tag.

Get the value of a tag as a number.

Only safe if the tag is really of a numeric type.

Set the value of a tag to the given number.

Only safe if the tag is really of a numeric type.

Get the value of a tag as a Rational.

Only safe if the tag is in fact of a rational type.

Set the value of a tag to a Rational.

Only safe if the tag is in fact of a rational type.

Find out the orientation the image should have, according to the metadata tag.

Set the intended orientation for the image.

Returns the camera exposure time of the photograph.

Returns the f-number used by the camera taking the photograph.

Returns the focal length used by the camera taking the photograph.

Returns the ISO speed used by the camera taking the photograph.

Retrieve the stored GPS information from the loaded file.

Save the specified GPS values to the metadata.

Remove all saved GPS information from the metadata.

Trait Implementations

impl Debug for Metadata
[src]

Formats the value using the given formatter.

impl PartialEq for Metadata
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Drop for Metadata
[src]

A method called when the value goes out of scope. Read more