#exif #metadata #tags #gps #ifd

bin+lib rexif

RExif is a native Rust crate, written to extract EXIF data from JPEG and TIFF images

10 releases

0.7.4 Jul 14, 2024
0.7.3 May 14, 2021
0.5.3 May 9, 2021
0.5.1 Oct 31, 2020
0.3.1 Nov 9, 2015

#95 in Images

Download history 892/week @ 2024-07-28 1200/week @ 2024-08-04 11391/week @ 2024-08-11 44981/week @ 2024-08-18 20621/week @ 2024-08-25 24811/week @ 2024-09-01 25596/week @ 2024-09-08 28738/week @ 2024-09-15 26437/week @ 2024-09-22 28669/week @ 2024-09-29 28877/week @ 2024-10-06 20194/week @ 2024-10-13 28256/week @ 2024-10-20 32516/week @ 2024-10-27 38076/week @ 2024-11-03 26660/week @ 2024-11-10

127,268 downloads per month
Used in 4 crates

MIT license

105KB
2.5K SLoC

rexif

RExif is a native Rust crate, written to extract EXIF data from JPEG and TIFF images.

It can be used as a library, or as a command-line tool. The sample binary called 'rexiftool' accepts files as arguments and prints the EXIF data. It gives a rough idea on how to use the crate.

Requirements

  • Latest stable Rust version from rustup.

Example

match rexif::parse_file(&file_name) {
    Ok(exif) => {
        println!("{} {} exif entries: {}", file_name,
            exif.mime, exif.entries.len());

        for entry in &exif.entries {
            println!("    {}: {}",
                    entry.tag,
                    entry.value_more_readable);
        }
    },
    Err(e) => {
        eprintln!("Error in {}: {} {}", &file_name,
            Error::description(&e), e.extra).unwrap();
    }
}

The src/main.rs file is a good starting point to learn how to use the crate, then take a look into the ExifEntry struct.

Dependencies

~465KB