pub enum ResamplingMethod {
NearestNeighbor,
Bilinear,
Bicubic,
Lanczos {
a: u32,
},
}Expand description
Resampling method.
Variants§
NearestNeighbor
Nearest neighbor (fast, blocky).
Bilinear
Bilinear interpolation (smooth, fast).
Bicubic
Bicubic interpolation (highest quality, slower).
Lanczos
Lanczos resampling with window radius a (typical values: 2 or 3).
Evaluates L(x) = sinc(x) * sinc(x/a) for |x| < a, else 0.
The 2D kernel is the outer product of two 1D Lanczos kernels.
Results are normalized by dividing by the total weight sum.
Valid range for a: 1..=8.
Implementations§
Source§impl ResamplingMethod
impl ResamplingMethod
Sourcepub fn entry_point(&self) -> &'static str
pub fn entry_point(&self) -> &'static str
Get the shader entry point name for this resampling method.
Trait Implementations§
Source§impl Clone for ResamplingMethod
impl Clone for ResamplingMethod
Source§fn clone(&self) -> ResamplingMethod
fn clone(&self) -> ResamplingMethod
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ResamplingMethod
Source§impl Debug for ResamplingMethod
impl Debug for ResamplingMethod
impl Eq for ResamplingMethod
Source§impl PartialEq for ResamplingMethod
impl PartialEq for ResamplingMethod
Source§fn eq(&self, other: &ResamplingMethod) -> bool
fn eq(&self, other: &ResamplingMethod) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ResamplingMethod
Auto Trait Implementations§
impl Freeze for ResamplingMethod
impl RefUnwindSafe for ResamplingMethod
impl Send for ResamplingMethod
impl Sync for ResamplingMethod
impl Unpin for ResamplingMethod
impl UnsafeUnpin for ResamplingMethod
impl UnwindSafe for ResamplingMethod
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.