Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 496 Bytes

File metadata and controls

25 lines (16 loc) · 496 Bytes

Gray Scale

There are convenient methods to change colors of an image. For example, to make the image be gray scale.

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

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

Original image:

my_image

grayscale.jpg:

grayscale

➡️ Next: Inverting Colors

📘 Back: Table of contents