asdf-pixel-sort

Crates.ioasdf-pixel-sort
lib.rsasdf-pixel-sort
version0.2.0
sourcesrc
created_at2021-09-04 08:14:18.567559
updated_at2021-09-10 15:13:30.902753
descriptionASDF pixel sorting
homepagehttps://crates.io/crates/asdf-pixel-sort
repositoryhttps://github.com/kuy/asdf-pixel-sort
max_upload_size
id446748
size35,067
Yuki Kodama (kuy)

documentation

README

asdf-pixel-sort

crates.io docs.rs CI

Rust implementation of pixel sorting algorithm "ASDF" by Kim Asendorf.

sample

Usage

asdf-pixel-sort = "0.2.0"

Example

use asdf_pixel_sort::sort;

fn main() {
    let img = image::open("pic.jpg").unwrap();
    let mut buf = img.to_rgb8();

    sort(&mut buf);

    buf.save("sorted.jpg").unwrap();
}

You may also need image crate to run above code.

Use sort_with_options() function to configure with options.

let color = PColor::new(0, 62, 214);
let options = Options {
    mode: Mode::Black(color),
};
sort_with_options(&mut buf, &options);

Documentation

See documentation on docs.rs.

Changelogs

See releases page on GitHub.

License

MIT

Author

Yuki Kodama / @kuy

Commit count: 59

cargo fmt