pub struct EncodeParameters { /* private fields */ }Expand description
Encoder settings (builder over the low-level EncoderParameters).
Implementations§
Source§impl EncodeParameters
impl EncodeParameters
Sourcepub fn new() -> EncodeParameters
pub fn new() -> EncodeParameters
Default parameters: lossless, single layer, one tile.
Sourcepub fn num_resolutions(self, n: u32) -> EncodeParameters
pub fn num_resolutions(self, n: u32) -> EncodeParameters
Number of resolutions (DWT decomposition levels + 1).
Sourcepub fn num_layers(self, n: u32) -> EncodeParameters
pub fn num_layers(self, n: u32) -> EncodeParameters
Number of quality layers.
Sourcepub fn irreversible(self, yes: bool) -> EncodeParameters
pub fn irreversible(self, yes: bool) -> EncodeParameters
Use the irreversible 9-7 transform (default is reversible 5-3).
Sourcepub fn progression_order(self, order: ProgressionOrder) -> EncodeParameters
pub fn progression_order(self, order: ProgressionOrder) -> EncodeParameters
Packet progression order.
Sourcepub fn tile_size(self, w: u32, h: u32) -> EncodeParameters
pub fn tile_size(self, w: u32, h: u32) -> EncodeParameters
Use tiles of the given size.
Sourcepub fn layer_rate(self, rate: f32) -> EncodeParameters
pub fn layer_rate(self, rate: f32) -> EncodeParameters
Append a quality layer with the given compression ratio
(e.g. 20.0 = 20:1); enables rate-distortion ratio allocation (the
C’s -r option; -q is PSNR-target allocation and has no safe
builder — use low_level()).
Layers beyond the 100 supported by the format are silently ignored (debug builds assert).
Sourcepub fn comment(self, comment: &str) -> EncodeParameters
pub fn comment(self, comment: &str) -> EncodeParameters
Embed a comment marker in the codestream.
Sourcepub fn codeblock_width(self, w: u32) -> EncodeParameters
pub fn codeblock_width(self, w: u32) -> EncodeParameters
Code-block width (power of two, 4..=1024).
Sourcepub fn codeblock_height(self, h: u32) -> EncodeParameters
pub fn codeblock_height(self, h: u32) -> EncodeParameters
Code-block height (power of two, 4..=1024).
Sourcepub fn low_level(&mut self) -> &mut EncoderParameters
pub fn low_level(&mut self) -> &mut EncoderParameters
Mutable access to the low-level C-mirror parameters (advanced knobs: custom MCT, cinema profiles, …).
Sourcepub fn into_inner(self) -> EncoderParameters
pub fn into_inner(self) -> EncoderParameters
Consumes the builder into the low-level parameter struct.
Trait Implementations§
Source§impl Clone for EncodeParameters
impl Clone for EncodeParameters
Source§fn clone(&self) -> EncodeParameters
fn clone(&self) -> EncodeParameters
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EncodeParameters
impl Debug for EncodeParameters
Source§impl Default for EncodeParameters
impl Default for EncodeParameters
Source§fn default() -> EncodeParameters
fn default() -> EncodeParameters
Auto Trait Implementations§
impl Forget for EncodeParameters
impl Freeze for EncodeParameters
impl Move for EncodeParameters
impl RefUnwindSafe for EncodeParameters
impl Send for EncodeParameters
impl Sync for EncodeParameters
impl Unpin for EncodeParameters
impl UnsafeUnpin for EncodeParameters
impl UnwindSafe for EncodeParameters
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
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> ⓘ
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> ⓘ
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