Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 962 Bytes

blurring_images.md

File metadata and controls

32 lines (20 loc) · 962 Bytes

Blurring Images

The method blur makes neighboring pixels of an image similar.

fn main() {
    let img = image::open("my_image.jpg").unwrap();

    let img2 = img.blur(10.);
    img2.save("blur.jpg").unwrap();
}

Original image:

my_image

blur.jpg:

blur

The parameter of blur controls how similar the neighboring pixels are. Applying a larger parameter makes the pixels more similar. The following picture shows the result when the parameter is 100.

blur100

Use fast_blur for similar results but with faster runtime.

➡️ Next: Making Images Clearer

📘 Back: Table of contents