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 mut reader = std::io::BufReader::new(&file);
let mut buf = Vec::new();
let (fields, _) = exif::parse_image(&mut reader, &mut buf).unwrap();
for f in 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.

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

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