pub fn salt_and_pepper_noise<P>(image: &Image<P>, rate: f64, seed: u64) -> Image<P>
where
    P: Pixel + HasBlack + HasWhite,
{
    let mut out = image.clone();
    salt_and_pepper_noise_mut(&mut out, rate, seed);
    out
}
Converts pixels to black or white at the given `rate` (between 0.0 and 1.0).
Black and white occur with equal probability.
src/noise.rs