pub struct FrameEncoder { /* private fields */ }Expand description
Encodes a single frame.
Implementations§
Source§impl FrameEncoder
impl FrameEncoder
Sourcepub fn new(width: usize, height: usize, options: FrameEncoderOptions) -> Self
pub fn new(width: usize, height: usize, options: FrameEncoderOptions) -> Self
Creates a new frame encoder.
Sourcepub fn new_with_extra_channels(
width: usize,
height: usize,
options: FrameEncoderOptions,
num_extra_channels: usize,
) -> Self
pub fn new_with_extra_channels( width: usize, height: usize, options: FrameEncoderOptions, num_extra_channels: usize, ) -> Self
Creates a new frame encoder with extra channel support.
Sourcepub fn encode_modular(
&self,
image: &ModularImage,
_color_encoding: &ColorEncoding,
writer: &mut BitWriter,
) -> Result<()>
pub fn encode_modular( &self, image: &ModularImage, _color_encoding: &ColorEncoding, writer: &mut BitWriter, ) -> Result<()>
Encodes a modular image into a frame.
Sourcepub fn num_groups(&self) -> usize
pub fn num_groups(&self) -> usize
Returns the number of groups in this frame.
Sourcepub fn num_groups_x(&self) -> usize
pub fn num_groups_x(&self) -> usize
Returns the number of groups in X direction.
Sourcepub fn num_groups_y(&self) -> usize
pub fn num_groups_y(&self) -> usize
Returns the number of groups in Y direction.
Sourcepub fn num_lf_groups(&self) -> usize
pub fn num_lf_groups(&self) -> usize
Returns the number of LF groups (DC groups). LF groups are 8x the size of regular groups (2048x2048 pixels).
Sourcepub fn num_toc_entries(&self, num_passes: usize) -> usize
pub fn num_toc_entries(&self, num_passes: usize) -> usize
Returns the number of TOC entries for this frame. Single group: 1 entry Multi-group: 2 + num_lf_groups + num_groups * num_passes
Auto Trait Implementations§
impl Freeze for FrameEncoder
impl RefUnwindSafe for FrameEncoder
impl Send for FrameEncoder
impl Sync for FrameEncoder
impl Unpin for FrameEncoder
impl UnwindSafe for FrameEncoder
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