cosmic::iced::advanced::graphics::image::image_rs::imageops

Function sample_nearest

source
pub fn sample_nearest<P>(
    img: &impl GenericImageView<Pixel = P>,
    u: f32,
    v: f32,
) -> Option<P>
where P: Pixel,
Expand description

Sample from an image using coordinates in [0, 1], taking the nearest coordinate.