Skip to content

Low level crate for reading and writing Jpeg and RIFF image containers

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

content-authenticity-initiative/img-parts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

img-parts

crates.io Documentation Rustc Version 1.34.2+ CI

The img-parts crate provides a low level api for reading and writing containers from various image formats.

It currently supports Jpeg and RIFF (with some helper functions for WebP).

With it you can read an image, modify its sections and save it back.

use img_parts::jpeg::Jpeg;
use img_parts::{ImageEXIF, ImageICC};

let input = File::open("img.jpg")?;
let output = File::create("out.jpg")?;

let mut jpeg = Jpeg::read(&mut BufReader::new(input))?;
let icc_profile = jpeg.icc_profile();
let exif_metadata = jpeg.exif();

jpeg.set_icc_profile(Some(another_icc_profile));
jpeg.set_exif(Some(new_exif_metadata));
jpeg.write_to(&mut BufWriter::new(output))?;

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.

About

Low level crate for reading and writing Jpeg and RIFF image containers

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 100.0%