#perlin-noise #noise #perlin #image

image-noise

Creates a simple perlin noise texture in Rust

1 unstable release

0.1.0 Jul 11, 2021

#16 in #perlin

GPL-3.0 license

260KB

image-noise

Creates a simple perlin noise texture in Rust.

image-noise = "0.1.0"

Really, this is a simple wrapper over txture, making it easier to be used with the image crate.

let image = image_noise::noise_image(1000, 10);

let mut file = File::create("image.png").unwrap();

let mut bytes: Vec<u8> = Vec::new();
image
    .write_to(&mut bytes, image::ImageOutputFormat::Png)
    .expect("Can write to png");

file.write_all(&bytes).unwrap();

example image


lib.rs:

image-noise

Creates A simple perlin noise texture in Rust.

image-noise = "0.1.0"
let image = image_noise::noise_image(1000, 10);

let mut file = File::create("image.png").unwrap();

let mut bytes: Vec<u8> = Vec::new();
image
    .write_to(&mut bytes, image::ImageOutputFormat::Png)
    .expect("Can write to png");

file.write_all(&bytes).unwrap();

Dependencies

~13MB
~67K SLoC