2 unstable releases
Uses new Rust 2024
0.1.0 | Mar 29, 2025 |
---|---|
0.0.1 | Mar 23, 2025 |
#7 in #image-metadata
248 downloads per month
24KB
495 lines
Library to read IPTC tags from JPEG files, in pure Rust.
Example
use iptc::IPTC;
use iptc::IPTCTag;
use std::error::Error;
use std::path::Path;
fn main() -> Result<(), Box<dyn Error>> {
let image_path = Path::new("tests/smiley.jpg");
let iptc = IPTC::read_from_path(&image_path)?;
// See all the tags in the image
println!("IPTC: {:?}", iptc.get_all());
// Get a specific tag
let keywords = iptc.get(IPTCTag::Keywords);
println!("keywords: {}", keywords);
Ok(())
}
IPTC
Read IPTC tags from JPEG files in pure Rust, with partial support for Tiff files.
Example
use iptc::IPTC;
use iptc::IPTCTag;
use std::error::Error;
use std::path::Path;
fn main() -> Result<(), Box<dyn Error>> {
let image_path = Path::new("tests/smiley.jpg");
let iptc = IPTC::read_from_path(&image_path)?;
// See all the tags in the image
println!("IPTC: {:?}", iptc.get_all());
// Get a specific tag
let keywords = iptc.get(IPTCTag::Keywords);
println!("keywords: {}", keywords);
Ok(())
}
Dependencies
~6MB
~89K SLoC