Thanks to visit codestin.com
Credit goes to docs.rs

Skip to main content

Crate libmosh

Crate libmosh 

Source
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.

cargo add pixelmosh --no-default-features

§Example

use libmosh::{
    err::MoshError,
    ops::{read_file, write_file},
    MoshCore,
};

let input = read_file("tests/assets/test-rgb.png")?;
let output = "test.png";
let mut core = MoshCore::new();

core.read_image(&input)?;
core.mosh()?;
write_file(
    output,
    &core.data,
    &core.options,
)?;

Modules§

err
Errors
fx
Effects
ops
File operations

Structs§

MoshCore
Core container.
MoshData
Image data.
MoshOptions
Processing options.

Functions§

generate_palette