Parse a TIFF image as well as a JPEG in the main example.

This commit is contained in:
KAMADA Ken'ichi 2017-03-05 08:19:37 +09:00
parent ae70e71db6
commit 8d4d3d4df0
2 changed files with 8 additions and 6 deletions

View File

@ -30,14 +30,16 @@
//!
//! # Examples
//!
//! An example to parse a JPEG/TIFF file:
//! An example to parse JPEG/TIFF files:
//!
//! ```
//! 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);
//! 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);
//! }
//! }
//! ```

BIN
tests/exif.tif Normal file

Binary file not shown.