#image #libexif #order

nightly exif

Rust wrapper for libexif

1 unstable release

Uses old Rust 2015

0.0.1 Sep 6, 2016

#334 in #order

Download history 3/week @ 2024-07-22 7/week @ 2024-07-29 3/week @ 2024-08-05 1/week @ 2024-08-12 4/week @ 2024-08-19 10/week @ 2024-08-26 7/week @ 2024-09-09 4/week @ 2024-09-16 29/week @ 2024-09-23 10/week @ 2024-09-30 13/week @ 2024-10-07 16/week @ 2024-10-14 14/week @ 2024-10-21 13/week @ 2024-10-28 23/week @ 2024-11-04

67 downloads per month

MIT license

27KB
602 lines

EXIF

The exif crate provides a safe wrapper around the native libexif library.

Dependencies

In order to use the exif crate, you must have the libexif library installed where it can be found by pkg-config.

Usage

Add exif as a dependency in Cargo.toml:

[dependencies]
exif = "0.0.1"

Import the exif crate.

extern crate exif;

use std::io;
use std::path::Path;

fn dump_exif<P: AsRef<Path>>(file_name: P) -> io::Result<()> {
    let data = try!(exif::Data::open("image.jpg"));

    for content in data.contents() {
        println!("[{:=>32}{:=>46}]", format!(" {:?} ", content.ifd()), "");

        for entry in content.entries() {
            println!("  {:<30} = {}",
                    entry.tag().title(content.ifd()),
                    entry.text_value());
        }
    }

    Ok(())
}

License

Copyright © 2016 David Cuddeback

Distributed under the MIT License.

Note: By using this crate, your executable will link to the libexif C library, which is licensed under the LGPL version 2.1.

Dependencies

~70KB