Skip to main content

map_pixels_mut_parallel

Function map_pixels_mut_parallel 

Source
pub fn map_pixels_mut_parallel<P, F>(image: &mut Image<P>, f: F)
where P: Pixel + Sync + Send, P::Subpixel: Sync + Send, F: Fn(P) -> P + Sync,
Expand description

An parallel version of map_pixels_mut().

This function does the same operation as map_pixels_mut() but using multi-threading via rayon iterators. Read the top-level crate documentation on parallelism for some of the tradeoffs involved with multi-threaded vs single-threaded image processing functions.