pub enum InterpolateMode {
Nearest,
Linear,
Cubic,
Lanczos,
}Expand description
Algorithm used for downsampling and upsampling
This enum defines different interpolation modes for resampling data.
Variants§
Nearest
Nearest-neighbor interpolation
This mode selects the value of the nearest sample point for each output pixel. It is applicable for both temporal and spatial data.
Linear
Linear interpolation
This mode calculates the output value using linear interpolation between nearby sample points.
It is applicable for both temporal and spatial data.
Cubic
Cubic interpolation
This mode uses cubic interpolation to calculate the output value based on surrounding sample points.
It is applicable for both temporal and spatial data and generally provides smoother results than linear interpolation.
Lanczos
Lanczos3 interpolation
This mode uses a 6-tap sinc-based Lanczos filter (a=3) to calculate the output value. It generally provides high-quality results, especially for downsampling.
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