1 unstable release
0.4.0 | Sep 6, 2024 |
---|
#453 in Images
89 downloads per month
125KB
3K
SLoC
little_exif
A little library for reading and writing EXIF data in pure Rust.
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
- Apache License, Version 2.0 (See LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0) or
- MIT License (See LICENSE-MIT or http://opensource.org/licenses/MIT)
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