pub fn vertical_gradient<S, P, I>(img: &mut I, start: &P, stop: &P)
Expand description
Fill the image with a linear vertical gradient
This function assumes a linear color space.
ยงExamples
use image::{Rgba, RgbaImage, Pixel};
let mut img = RgbaImage::new(100, 100);
let start = Rgba::from_slice(&[0, 128, 0, 0]);
let end = Rgba::from_slice(&[255, 255, 255, 255]);
image::imageops::vertical_gradient(&mut img, start, end);
img.save("vertical_gradient.png").unwrap();