Struct jpegxl_rs::encode::EncoderFrame
source · pub struct EncoderFrame<'data, T: PixelType> { /* private fields */ }
Expand description
A frame for the encoder, consisting of the pixels and its options
Implementations§
source§impl<'data, T: PixelType> EncoderFrame<'data, T>
impl<'data, T: PixelType> EncoderFrame<'data, T>
sourcepub fn new(data: &'data [T]) -> Self
pub fn new(data: &'data [T]) -> Self
Create a default frame from the data.
Use RGB(3) channels, native endianness and no alignment.
sourcepub fn num_channels(self, value: u32) -> Self
pub fn num_channels(self, value: u32) -> Self
Set the number of channels of the source.
Note: If you want to use alpha channel, add here
sourcepub fn endianness(self, value: JxlEndianness) -> Self
pub fn endianness(self, value: JxlEndianness) -> Self
Set the endianness of the source.
Auto Trait Implementations§
impl<'data, T> Freeze for EncoderFrame<'data, T>
impl<'data, T> RefUnwindSafe for EncoderFrame<'data, T>where
T: RefUnwindSafe,
impl<'data, T> Send for EncoderFrame<'data, T>where
T: Sync,
impl<'data, T> Sync for EncoderFrame<'data, T>where
T: Sync,
impl<'data, T> Unpin for EncoderFrame<'data, T>
impl<'data, T> UnwindSafe for EncoderFrame<'data, T>where
T: RefUnwindSafe,
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