pub struct ResizeOptions {
pub maximum: CanvasSize,
pub allow_upscale: bool,
pub filter: ResizeFilter,
pub max_output_rgba_bytes: usize,
}Expand description
Constraints used to derive a full-canvas resize operation.
The resulting canvas always fits within maximum and retains the source
aspect ratio. A plan never adds padding or crops pixels.
Fields§
§maximum: CanvasSizeMaximum destination canvas dimensions.
allow_upscale: boolWhether a source smaller than maximum may be enlarged.
filter: ResizeFilterResampling filter used by the resize operation.
max_output_rgba_bytes: usizeUpper bound for the transformed RGBA buffer.
Implementations§
Source§impl ResizeOptions
impl ResizeOptions
Sourcepub const fn contain(maximum: CanvasSize) -> Self
pub const fn contain(maximum: CanvasSize) -> Self
Creates a contain-style resize with no upscaling and bilinear filtering.
Trait Implementations§
Source§impl Clone for ResizeOptions
impl Clone for ResizeOptions
Source§fn clone(&self) -> ResizeOptions
fn clone(&self) -> ResizeOptions
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 ResizeOptions
Source§impl Debug for ResizeOptions
impl Debug for ResizeOptions
impl Eq for ResizeOptions
Source§impl PartialEq for ResizeOptions
impl PartialEq for ResizeOptions
impl StructuralPartialEq for ResizeOptions
Auto Trait Implementations§
impl Freeze for ResizeOptions
impl RefUnwindSafe for ResizeOptions
impl Send for ResizeOptions
impl Sync for ResizeOptions
impl Unpin for ResizeOptions
impl UnsafeUnpin for ResizeOptions
impl UnwindSafe for ResizeOptions
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