noise_image

Function noise_image 

Source
pub fn noise_image(s: u32, gradient_point_number: u32) -> DynamicImage
Expand description

Create a noise image with the size in width and height, and the resolution of the noise.

Examples found in repository?
examples/basic.rs (line 5)
4fn main() {
5    let image = image_noise::noise_image(1000, 10);
6
7    let mut file = File::create("image.png").unwrap();
8
9    let mut bytes: Vec<u8> = Vec::new();
10    image
11        .write_to(&mut bytes, image::ImageOutputFormat::Png)
12        .expect("Can write to png");
13
14    file.write_all(&bytes).unwrap();
15}