pub enum InterpolateMode {
Nearest,
NearestExact,
Bilinear,
Bicubic,
Lanczos3,
}Expand description
Algorithm used.
Variants§
Nearest
Nearest-neighbor floor interpolation. Matches the legacy behavior of OpenCV’s INTER_NEAREST. It results in a bottom-right shift when resizing. https://en.wikipedia.org/wiki/Nearest-neighbor_interpolation
NearestExact
Nearest-neighbor exact interpolation. https://en.wikipedia.org/wiki/Nearest-neighbor_interpolation
Bilinear
Bilinear interpolation. https://en.wikipedia.org/wiki/Bilinear_interpolation
Bicubic
Bicubic interpolation. https://en.wikipedia.org/wiki/Bicubic_interpolation
Lanczos3
Lanczos3 interpolation (6-tap sinc-based filter). https://en.wikipedia.org/wiki/Lanczos_resampling
Implementations§
Source§impl InterpolateMode
impl InterpolateMode
Sourcepub fn new_nearest() -> Self
pub fn new_nearest() -> Self
Constructs a new InterpolateMode::Nearest.
Source§impl InterpolateMode
impl InterpolateMode
Sourcepub fn new_nearest_exact() -> Self
pub fn new_nearest_exact() -> Self
Constructs a new InterpolateMode::NearestExact.
Source§impl InterpolateMode
impl InterpolateMode
Sourcepub fn new_bilinear() -> Self
pub fn new_bilinear() -> Self
Constructs a new InterpolateMode::Bilinear.
Source§impl InterpolateMode
impl InterpolateMode
Sourcepub fn new_bicubic() -> Self
pub fn new_bicubic() -> Self
Constructs a new InterpolateMode::Bicubic.
Source§impl InterpolateMode
impl InterpolateMode
Sourcepub fn new_lanczos3() -> Self
pub fn new_lanczos3() -> Self
Constructs a new InterpolateMode::Lanczos3.
Trait Implementations§
Source§impl Clone for InterpolateMode
impl Clone for InterpolateMode
Source§fn clone(&self) -> InterpolateMode
fn clone(&self) -> InterpolateMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more