pub enum InterpolationMode {
Nearest,
Bilinear,
Area,
Cubic,
Lanczos,
}Expand description
Sampling rule used by resize.
Variants§
Nearest
Select the source pixel containing the scaled output coordinate.
Bilinear
Use half-pixel-center bilinear sampling with align_corners = false.
Area
Box average over the scaled source rectangle (downscale); degenerates to nearest-pixel replication for upscale.
Cubic
Bicubic convolution over the 4x4 source neighborhood using the Keys a=-0.75 kernel.
Lanczos
Lanczos-4 sinc resampling over the 8x8 source neighborhood with downscale filter widening.
Trait Implementations§
Source§impl Clone for InterpolationMode
impl Clone for InterpolationMode
impl Copy for InterpolationMode
Source§impl Debug for InterpolationMode
impl Debug for InterpolationMode
Source§impl Default for InterpolationMode
impl Default for InterpolationMode
impl Eq for InterpolationMode
Source§impl PartialEq for InterpolationMode
impl PartialEq for InterpolationMode
impl StructuralPartialEq for InterpolationMode
Auto Trait Implementations§
impl Forget for InterpolationMode
impl Freeze for InterpolationMode
impl Move for InterpolationMode
impl RefUnwindSafe for InterpolationMode
impl Send for InterpolationMode
impl Sync for InterpolationMode
impl Unpin for InterpolationMode
impl UnsafeUnpin for InterpolationMode
impl UnwindSafe for InterpolationMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more