pub struct Scaler { /* private fields */ }Expand description
Represents base scaling structure
Implementations§
source§impl Scaler
impl Scaler
sourcepub fn new(filter: ResamplingFunction) -> Self
pub fn new(filter: ResamplingFunction) -> Self
Creates new Scaler instance with corresponding filter
source§impl Scaler
impl Scaler
sourcepub fn resize_plane_f32(
&self,
new_size: ImageSize,
store: ImageStore<'_, f32, 1>,
) -> ImageStore<'_, f32, 1>
pub fn resize_plane_f32( &self, new_size: ImageSize, store: ImageStore<'_, f32, 1>, ) -> ImageStore<'_, f32, 1>
Performs rescaling for f32 plane
source§impl Scaler
impl Scaler
sourcepub fn resize_plane(
&self,
new_size: ImageSize,
store: ImageStore<'_, u8, 1>,
) -> ImageStore<'_, u8, 1>
pub fn resize_plane( &self, new_size: ImageSize, store: ImageStore<'_, u8, 1>, ) -> ImageStore<'_, u8, 1>
Performs rescaling for u8 plane
Trait Implementations§
source§impl Scaling for Scaler
impl Scaling for Scaler
fn set_threading_policy(&mut self, threading_policy: ThreadingPolicy)
source§fn resize_rgb(
&self,
new_size: ImageSize,
store: ImageStore<'_, u8, 3>,
) -> ImageStore<'_, u8, 3>
fn resize_rgb( &self, new_size: ImageSize, store: ImageStore<'_, u8, 3>, ) -> ImageStore<'_, u8, 3>
Performs rescaling for RGB, channel order does not matter
source§fn resize_rgba(
&self,
new_size: ImageSize,
store: ImageStore<'_, u8, 4>,
is_alpha_premultiplied: bool,
) -> ImageStore<'_, u8, 4>
fn resize_rgba( &self, new_size: ImageSize, store: ImageStore<'_, u8, 4>, is_alpha_premultiplied: bool, ) -> ImageStore<'_, u8, 4>
Performs rescaling for RGBA, for pre-multiplying alpha, converting to LUV or LAB alpha must be last channel
source§impl ScalingF32 for Scaler
impl ScalingF32 for Scaler
source§fn resize_rgb_f32(
&self,
new_size: ImageSize,
store: ImageStore<'_, f32, 3>,
) -> ImageStore<'_, f32, 3>
fn resize_rgb_f32( &self, new_size: ImageSize, store: ImageStore<'_, f32, 3>, ) -> ImageStore<'_, f32, 3>
Performs rescaling for RGB f32, channel order does not matter
source§fn resize_rgba_f32(
&self,
new_size: ImageSize,
store: ImageStore<'_, f32, 4>,
is_alpha_premultiplied: bool,
) -> ImageStore<'_, f32, 4>
fn resize_rgba_f32( &self, new_size: ImageSize, store: ImageStore<'_, f32, 4>, is_alpha_premultiplied: bool, ) -> ImageStore<'_, f32, 4>
Performs rescaling for RGBA f32, alpha expected to be last
source§impl ScalingU16 for Scaler
impl ScalingU16 for Scaler
source§fn resize_rgba_u16(
&self,
new_size: ImageSize,
store: ImageStore<'_, u16, 4>,
bit_depth: usize,
is_alpha_premultiplied: bool,
) -> ImageStore<'_, u16, 4>
fn resize_rgba_u16( &self, new_size: ImageSize, store: ImageStore<'_, u16, 4>, bit_depth: usize, is_alpha_premultiplied: bool, ) -> ImageStore<'_, u16, 4>
source§fn resize_plane_u16(
&self,
new_size: ImageSize,
store: ImageStore<'_, u16, 1>,
bit_depth: usize,
) -> ImageStore<'_, u16, 1>
fn resize_plane_u16( &self, new_size: ImageSize, store: ImageStore<'_, u16, 1>, bit_depth: usize, ) -> ImageStore<'_, u16, 1>
Performs rescaling for u16 plane
source§fn resize_rgb_u16(
&self,
new_size: ImageSize,
store: ImageStore<'_, u16, 3>,
bit_depth: usize,
) -> ImageStore<'_, u16, 3>
fn resize_rgb_u16( &self, new_size: ImageSize, store: ImageStore<'_, u16, 3>, bit_depth: usize, ) -> ImageStore<'_, u16, 3>
Performs rescaling for RGB, channel order does not matter Read more
impl Copy for Scaler
Auto Trait Implementations§
impl Freeze for Scaler
impl RefUnwindSafe for Scaler
impl Send for Scaler
impl Sync for Scaler
impl Unpin for Scaler
impl UnwindSafe for Scaler
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more