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); } }
Compatibility
Major changes between 0.1.3 and 0.2 follow.
- Rust 1.15 is now required to compile.
Reader.fields()
now returns a slice instead of a reference to a Vec.Tag.value()
was renamed toTag.code()
.- A new variant
Error::BlankValue
has been added. - The
parse_image()
function has been removed.
Modules
tag |
A module that contains Exif tag constants. |
Structs
DateTime |
A struct used to parse a DateTime field. |
Field |
A TIFF field. |
Rational |
An unsigned rational number, which is a pair of 32-bit unsigned integers. |
Reader |
The |
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. |