pub struct OutputConfig {
pub format: OutputFormat,
pub bit_depth: u8,
pub dither: bool,
pub full_range: bool,
pub width: Option<u32>,
pub height: Option<u32>,
}Expand description
Configuration for output formatting.
Fields§
§format: OutputFormatOutput format.
bit_depth: u8Output bit depth.
dither: boolDither when reducing bit depth.
full_range: boolFull range output (0-255 vs 16-235).
width: Option<u32>Output width (for scaling).
height: Option<u32>Output height (for scaling).
Implementations§
Source§impl OutputConfig
impl OutputConfig
Sourcepub fn new(format: OutputFormat) -> Self
pub fn new(format: OutputFormat) -> Self
Create a new output configuration.
Sourcepub const fn with_bit_depth(self, bit_depth: u8) -> Self
pub const fn with_bit_depth(self, bit_depth: u8) -> Self
Set output bit depth.
Sourcepub const fn with_dither(self) -> Self
pub const fn with_dither(self) -> Self
Enable dithering.
Sourcepub const fn with_full_range(self) -> Self
pub const fn with_full_range(self) -> Self
Set full range output.
Sourcepub const fn with_dimensions(self, width: u32, height: u32) -> Self
pub const fn with_dimensions(self, width: u32, height: u32) -> Self
Set output dimensions.
Trait Implementations§
Source§impl Clone for OutputConfig
impl Clone for OutputConfig
Source§fn clone(&self) -> OutputConfig
fn clone(&self) -> OutputConfig
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 OutputConfig
impl Debug for OutputConfig
Auto Trait Implementations§
impl Freeze for OutputConfig
impl RefUnwindSafe for OutputConfig
impl Send for OutputConfig
impl Sync for OutputConfig
impl Unpin for OutputConfig
impl UnsafeUnpin for OutputConfig
impl UnwindSafe for OutputConfig
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