#exif #metadata #image #photo

little_exif

This little library implements simple functionality for basic reading and writing of EXIF (related) metadata for PNG and JP(E)G image files (other file types - e.g. TIFF or HEIC - are planned for the future), with the advantage of being solely written in Rust & not relying on any 3rd party (C-)library for accessing the data (there are dependencies e.g. for calculating checksums or (de)compressing - however, they are also written in Rust).

2 unstable releases

0.3.2 Apr 14, 2024
0.3.1 Feb 26, 2024
0.3.0 Jan 15, 2024
0.2.1 Dec 27, 2023
0.1.1 Oct 8, 2022

#132 in Images

Download history 10/week @ 2024-01-15 8/week @ 2024-02-19 150/week @ 2024-02-26 15/week @ 2024-03-04 69/week @ 2024-03-11 192/week @ 2024-03-18 1/week @ 2024-03-25 65/week @ 2024-04-01 122/week @ 2024-04-08 85/week @ 2024-04-15

294 downloads per month

MIT/Apache

115KB
2.5K SLoC

little_exif

A little library for reading and writing EXIF data in pure Rust.

version-badge  license-badge 

Example

use little_exif::metadata::Metadata;
use little_exif::exif_tag::ExifTag;

let image_path = std::path::Path::new("image.png");
let mut metadata = Metadata::new_from_path(&image_path);

metadata.set_tag(
	ExifTag::ImageDescription("Hello World!".to_string())
);

metadata.write_to_file(&image_path);

License

Licensed under either

at your option.


lib.rs:

little_exif

A small crate for reading and writing (at least some) EXIF data written entirely in Rust. Currently supports only .png and .jp(e)g files and a few dozen tags in IFD0 and ExifIFD.

Interaction is done via the Metadata struct and the ExifTag enum.

Usage

Write EXIF data

use little_exif::metadata::Metadata;
use little_exif::exif_tag::ExifTag;

let mut metadata = Metadata::new();
metadata.set_tag(
    ExifTag::ImageDescription("Hello World!".to_string())
);
metadata.write_to_file(std::path::Path::new("image.png"));

Dependencies

~275KB