Crate exif [] [src]

Exif parsing library written in pure Rust.

Examples

An example to parse a JPEG/TIFF file:

let file = std::fs::File::open("tests/exif.jpg").unwrap();
let reader = exif::Reader::new(
    &mut std::io::BufReader::new(&file)).unwrap();
for f in reader.fields() {
    println!("{} {} {:?}", f.tag, f.thumbnail, f.value);
}

Reexports

pub use tag::Context;
pub use tag::Tag;

Modules

tag

Compatibility warning: Exif tag constants in this module will be converted to associated constants of Tag when the feature is stabilized.

Structs

Field

A TIFF field.

Rational

An unsigned rational number, which is a pair of 32-bit unsigned integers.

Reader

The Reader struct reads a JPEG or TIFF image, parses the Exif attributes in it, and holds the results.

SRational

A signed rational number, which is a pair of 32-bit signed integers.

Enums

Error

An error type returned when parsing Exif data.

Value

Types and values of TIFF fields (for Exif attributes).

Functions

get_exif_attr_from_jpeg

Get the Exif attribute information segment from a JPEG file.

parse_exif

Parse the Exif attributes in the TIFF format.

parse_image [
Deprecated
]

Parse the Exif attributes in a JPEG or TIFF image data.