pub struct EBCCConfig {
pub base_cr: f32,
pub residual_compression_type: EBCCResidualType,
}Expand description
Configuration for EBCC compression.
Fields§
§base_cr: f32Base compression ratio for JPEG2000 layer
residual_compression_type: EBCCResidualTypeType of residual compression to apply
Implementations§
Source§impl EBCCConfig
impl EBCCConfig
Sourcepub const fn jpeg2000_only(base_cr: f32) -> Self
pub const fn jpeg2000_only(base_cr: f32) -> Self
Create a configuration for JPEG2000-only compression.
Sourcepub const fn max_absolute_error_bounded(error: f32) -> Self
pub const fn max_absolute_error_bounded(error: f32) -> Self
Create a configuration for maximum error bounded compression.
Sourcepub const fn relative_error_bounded(error: f32) -> Self
pub const fn relative_error_bounded(error: f32) -> Self
Create a configuration for relative error bounded compression.
Sourcepub const fn with_base_cr(self, base_cr: f32) -> Self
pub const fn with_base_cr(self, base_cr: f32) -> Self
Change the JPEG2000 layer base compression ratio.
Sourcepub fn validate(&self) -> EBCCResult<()>
pub fn validate(&self) -> EBCCResult<()>
Validate the configuration parameters.
§Errors
EBCCError::InvalidConfigifbase_cris non-positiveEBCCError::InvalidConfigif the absolute or relative error bound is non-positive
Trait Implementations§
Source§impl Clone for EBCCConfig
impl Clone for EBCCConfig
Source§fn clone(&self) -> EBCCConfig
fn clone(&self) -> EBCCConfig
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 moreSource§impl Debug for EBCCConfig
impl Debug for EBCCConfig
Source§impl Default for EBCCConfig
impl Default for EBCCConfig
Source§impl PartialEq for EBCCConfig
impl PartialEq for EBCCConfig
Source§fn eq(&self, other: &EBCCConfig) -> bool
fn eq(&self, other: &EBCCConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for EBCCConfig
Auto Trait Implementations§
impl Freeze for EBCCConfig
impl RefUnwindSafe for EBCCConfig
impl Send for EBCCConfig
impl Sync for EBCCConfig
impl Unpin for EBCCConfig
impl UnsafeUnpin for EBCCConfig
impl UnwindSafe for EBCCConfig
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