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 //! # 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(); //! for path in &["tests/exif.jpg", "tests/exif.tif"] {
//! let reader = exif::Reader::new( //! let file = std::fs::File::open(path).unwrap();
//! &mut std::io::BufReader::new(&file)).unwrap(); //! let reader = exif::Reader::new(
//! for f in reader.fields() { //! &mut std::io::BufReader::new(&file)).unwrap();
//! println!("{} {} {:?}", f.tag, f.thumbnail, f.value); //! for f in reader.fields() {
//! println!("{} {} {:?}", f.tag, f.thumbnail, f.value);
//! }
//! } //! }
//! ``` //! ```

BIN
tests/exif.tif Normal file

Binary file not shown.