pub fn map_subpixels_mut<I, P, F>(image: &mut I, f: F) where
    I: GenericImage<Pixel = P>,
    P: Pixel,
    F: Fn(P::Subpixel) -> P::Subpixel
Expand description

Applies f to each subpixel of the input image in place.

Examples

use imageproc::map::map_subpixels_mut;

let mut image = gray_image!(
    1, 2;
    3, 4);

let want = gray_image!(
    2, 4;
    6, 8);

map_subpixels_mut(&mut image, |x| 2 * x);

assert_pixels_eq!(
    image,
    want);