pub struct ModularEncoder { /* private fields */ }Expand description
Modular encoder for JPEG-XL lossless images.
Implementations§
Source§impl ModularEncoder
impl ModularEncoder
Sourcepub fn with_effort(self, effort: u8) -> Self
pub fn with_effort(self, effort: u8) -> Self
Set encoding effort (1-9).
Sourcepub fn add_transform(&mut self, transform: ModularTransform)
pub fn add_transform(&mut self, transform: ModularTransform)
Add a transform to be applied during encoding.
Sourcepub fn encode_image(
&mut self,
channels: &[Vec<i32>],
width: u32,
height: u32,
_bit_depth: u8,
) -> CodecResult<Vec<u8>>
pub fn encode_image( &mut self, channels: &[Vec<i32>], width: u32, height: u32, _bit_depth: u8, ) -> CodecResult<Vec<u8>>
Encode channels into a compressed byte stream.
Input: one Vec<i32> per channel, each of length width * height.
Returns the variable-length coded residual data.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ModularEncoder
impl RefUnwindSafe for ModularEncoder
impl Send for ModularEncoder
impl Sync for ModularEncoder
impl Unpin for ModularEncoder
impl UnsafeUnpin for ModularEncoder
impl UnwindSafe for ModularEncoder
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> 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