pub struct DecoderConfig {
pub output_format: Option<PixelFormat>,
pub fancy_upsampling: bool,
pub block_smoothing: bool,
pub apply_icc: bool,
pub max_pixels: u64,
pub max_memory: usize,
}Expand description
Decoder configuration.
Fields§
§output_format: Option<PixelFormat>Output pixel format (None = use source format)
fancy_upsampling: boolWhether to apply fancy upsampling
block_smoothing: boolWhether to apply block smoothing
apply_icc: boolWhether to apply embedded ICC profile (requires cms feature)
max_pixels: u64Maximum pixels allowed (for DoS protection). Default is 100 megapixels. Set to 0 for unlimited.
max_memory: usizeMaximum total memory for allocations (for DoS protection). Default is 512 MB. Set to 0 for unlimited.
Trait Implementations§
Source§impl Clone for DecoderConfig
impl Clone for DecoderConfig
Source§fn clone(&self) -> DecoderConfig
fn clone(&self) -> DecoderConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DecoderConfig
impl Debug for DecoderConfig
Auto Trait Implementations§
impl Freeze for DecoderConfig
impl RefUnwindSafe for DecoderConfig
impl Send for DecoderConfig
impl Sync for DecoderConfig
impl Unpin for DecoderConfig
impl UnwindSafe for DecoderConfig
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§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