#exif #metadata #image #photo #file-metadata #file-format

revolt_little_exif

(fork which includes support for passing filetype directly) Basic reading and writing of EXIF (related) metadata for PNG, JP(E)G, JXL and WebP image files (other file types - e.g. TIFF or HEIC - are planned), with the advantage of being solely written in Rust & not relying on any 3rd party non-rust library.

2 unstable releases

0.5.1 Oct 28, 2024
0.4.0 Sep 6, 2024

#434 in Images

MIT/Apache

180KB
4K SLoC

little_exif

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

version-badge  license-badge 

Supported Formats

  • JPEG
  • JXL
  • PNG
  • WebP (only lossless and extended)

Your required format is not listed here or you've run into a problem with a file that should be supported? Open up a new issue (ideally with an example image for reproduction in case of a problem) and I'll take a look!

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.

Dependencies

~275KB