Expand description
§Overview
Glitch and pixelate PNG images
Provides the MoshCore
type for image processing and I/O functions,
available in the ops
module.
§Usage
Add pixelmosh
to your dependencies in your project’s Cargo.toml
.
[dependencies]
pixelmosh = { version = "3.1", default-features = false }
§Example
use libmosh::{
err::MoshError,
ops::{read_file, write_file},
MoshCore,
};
let input = read_file("src/util/test-rgb.png")?;
let output = "test.png";
let mut core = MoshCore::new();
core.read_image(&input)?;
core.mosh()?;
write_file(
output,
&core.data.buf,
core.data.width,
core.data.height,
core.data.color_type,
core.data.bit_depth,
)?;
Modules§
- Errors
- Effects
- File operations
Structs§
- Core container.
- Image data.
- Processing options.