[][src]Crate img_parts

img-parts

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))?;

Modules

jpeg
riff
vp8
webp

Enums

Error

The Errors that may occur when processing an image.

Traits

ImageEXIF

Trait to get, add and remove the EXIF metadata of an image.

ImageICC

Trait to get, add and remove the ICC Profile of an image.

Type Definitions

Result