Function loop9::loop9

source ·
pub fn loop9<Pixel, Callback>(
    img: ImgRef<'_, Pixel>,
    left: usize,
    top: usize,
    width: usize,
    height: usize,
    cb: Callback
)
where Pixel: Copy, Callback: FnMut(usize, usize, Triple<Pixel>, Triple<Pixel>, Triple<Pixel>),
Expand description

Loop over 9 neighboring pixels in the left/top/width/height fragment of the image described by ImgRef (Img.as_ref())

The callback is: (x, y, previous_row, current_row, next_row)

This function will never panic, if your callback doesn’t panic.