pub trait Scaling {
// Required methods
fn set_threading_policy(&mut self, threading_policy: ThreadingPolicy);
fn resize_rgb<'a>(
&'a self,
new_size: ImageSize,
store: ImageStore<'a, u8, 3>,
) -> Result<ImageStore<'a, u8, 3>, PicScaleError>;
fn resize_rgba<'a>(
&'a self,
new_size: ImageSize,
store: ImageStore<'a, u8, 4>,
premultiply_alpha: bool,
) -> Result<ImageStore<'a, u8, 4>, PicScaleError>;
}Required Methods§
fn set_threading_policy(&mut self, threading_policy: ThreadingPolicy)
Sourcefn resize_rgb<'a>(
&'a self,
new_size: ImageSize,
store: ImageStore<'a, u8, 3>,
) -> Result<ImageStore<'a, u8, 3>, PicScaleError>
fn resize_rgb<'a>( &'a self, new_size: ImageSize, store: ImageStore<'a, u8, 3>, ) -> Result<ImageStore<'a, u8, 3>, PicScaleError>
Performs rescaling for RGB, channel order does not matter
Sourcefn resize_rgba<'a>(
&'a self,
new_size: ImageSize,
store: ImageStore<'a, u8, 4>,
premultiply_alpha: bool,
) -> Result<ImageStore<'a, u8, 4>, PicScaleError>
fn resize_rgba<'a>( &'a self, new_size: ImageSize, store: ImageStore<'a, u8, 4>, premultiply_alpha: bool, ) -> Result<ImageStore<'a, u8, 4>, PicScaleError>
Performs rescaling for RGBA, for pre-multiplying alpha, converting to LUV or LAB alpha must be last channel