pub fn warp_with<P, F>(
    image: &Image<P>,
    mapping: F,
    interpolation: Interpolation,
    default: P,
) -> Image<P>
where
    F: Fn(f32, f32) -> (f32, f32) + Sync + Send,
    P: Pixel + Send + Sync,
    <P as Pixel>::Subpixel: Send + Sync,
    <P as Pixel>::Subpixel: Into<f32> + Clamp<f32>,
{
    let (width, height) = image.dimensions();
    let mut out = Image::new(width, height);
    warp_into_with(image, mapping, interpolation, default, &mut out);
    out
}
Warps an image using the provided function to define the pre-image of each output pixel.

# Examples
Applying a wave pattern.
```
use image::Luma;
use imageproc::utils::gray_bench_image;
use imageproc::geometric_transformations::*;

let image = gray_bench_image(300, 300);
let warped = warp_with(
&image,
|x, y| (x, y + (x / 30.0).sin()),
Interpolation::Nearest,
Luma([0u8])
);
```
src/geometric_transformations.rs