#image-metadata #image-path #iptc-metadata

iptc

Read IPTC tags from JPEG files, in pure Rust

1 unstable release

Uses new Rust 2024

new 0.0.1 Mar 23, 2025

#15 in #image-metadata

Download history 91/week @ 2025-03-19

91 downloads per month

MIT license

18KB
385 lines

IPTC

Read IPTC tags from JPEG files, in pure Rust.

Example

use iptc::IPTC;
use std::path::Path;

let image_path = Path::new("image.png");
let mut tags = IPTC::read_from_path(&image_path);

let city = tags.get(IPTCTags::City)

assert_eq!(city, "London");

tags.set_city("Oslo")
    .set_country("Norway")
    .set_keywords(vec!["keyword1", "keyword2"]);

tags.write_to_file(&image_path)?;

Dependencies

~3.5MB
~69K SLoC