Add an example to parse a JPEG file.
This commit is contained in:
parent
5d9190304f
commit
92a3c49bb2
14
src/lib.rs
14
src/lib.rs
|
@ -25,6 +25,20 @@
|
|||
//
|
||||
|
||||
//! Exif parsing library written in pure Rust.
|
||||
//!
|
||||
//! # Examples
|
||||
//!
|
||||
//! An example to parse a JPEG file:
|
||||
//!
|
||||
//! ```
|
||||
//! let file = std::fs::File::open("tests/exif.jpg").unwrap();
|
||||
//! let mut reader = std::io::BufReader::new(&file);
|
||||
//! let buf = exif::get_exif_attr_from_jpeg(&mut reader).unwrap();
|
||||
//! let (fields, _) = exif::parse_exif(&buf).unwrap();
|
||||
//! for f in fields {
|
||||
//! println!("{} {} {:?}", f.tag, f.thumbnail, f.value);
|
||||
//! }
|
||||
//! ```
|
||||
|
||||
pub use error::Error;
|
||||
pub use jpeg::get_exif_attr as get_exif_attr_from_jpeg;
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
Loading…
Reference in New Issue