Skip to main content

Crate ai_image_marker_stripper

Crate ai_image_marker_stripper 

Source
Expand description

Remove descriptive metadata and embedded AI provenance from PNG/APNG, JPEG and WebP images.

strip works at the container level: it walks the chunks or segments of an image and keeps only those needed to render it, using an allowlist. Compressed image and frame data is copied unchanged and never re-encoded, so pixels are identical before and after. The optional watermarks module goes further and runs a local backend that alters pixels.

See the README for exactly what is removed from each format and for known limitations.

§Example

use ai_image_marker_stripper::{Options, strip};

let input = std::fs::read("image.png")?;
let cleaned = strip(&input, Options::default())?;
println!("{} image; removed {:?}", cleaned.format, cleaned.removed);
std::fs::write("image.cleaned.png", &cleaned.bytes)?;

Modules§

watermarks
Optional pixel-watermark processing through the external wmr backend.

Structs§

Cleaned
The result of cleaning an image.
Options
Options controlling what strip removes.

Enums§

Format
Image container format, detected from file contents rather than the file extension.

Functions§

strip
Remove metadata containers from a PNG, JPEG or WebP image.