pub fn map_pixels_mut<I, P, F>(image: &mut I, f: F)
Expand description
Applies f
to each pixel in the input image in place.
ยงExamples
use image::Luma;
use imageproc::map::map_pixels_mut;
let mut image = gray_image!(
1, 2;
3, 4);
let want = gray_image!(
1, 3;
4, 6);
map_pixels_mut(&mut image, |x, y, p| {
Luma([p[0] + x as u8 + y as u8])
});
assert_pixels_eq!(
image,
want);