Crate exif [] [src]

This is a pure-Rust library to parse Exif data. This library can parse TIFF and JPEG images and extract Exif attributes.

Examples

An example to parse JPEG/TIFF files:

for path in &["tests/exif.jpg", "tests/exif.tif"] {
    let file = std::fs::File::open(path).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);
    }
}

Modules

tag

A module that contains Exif tag constants.

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.

Tag

A tag of a TIFF field.

Enums

Context

An enum that indicates how a tag value is interpreted.

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.