pub struct Encoder<W: Write> { /* private fields */ }
Expand description
PNG file encoder
Can be converted into one of two encoders:
- into_step_enc for high-level Steps
- into_chunk_enc for low-level Chunks
Implementations§
source§impl<W: Write> Encoder<W>
impl<W: Write> Encoder<W>
sourcepub fn filter_strategy(self, strategy: FilterStrategy) -> Self
pub fn filter_strategy(self, strategy: FilterStrategy) -> Self
Set a specific filter strategy. If this is never called, than png_pong attempts to choose the best (compromise speed / compression) filter strategy.
sourcepub fn compression_level(self, level: u8) -> Self
pub fn compression_level(self, level: u8) -> Self
Set the compression level (default: 6). Must be between 0 and 10.
sourcepub fn into_chunk_enc(self) -> ChunkEnc<W>
pub fn into_chunk_enc(self) -> ChunkEnc<W>
Convert into a chunk encoder.
sourcepub fn into_step_enc(self) -> StepEnc<W>
pub fn into_step_enc(self) -> StepEnc<W>
Convert into a step encoder.
Trait Implementations§
Auto Trait Implementations§
impl<W> Freeze for Encoder<W>where
W: Freeze,
impl<W> RefUnwindSafe for Encoder<W>where
W: RefUnwindSafe,
impl<W> Send for Encoder<W>where
W: Send,
impl<W> Sync for Encoder<W>where
W: Sync,
impl<W> Unpin for Encoder<W>where
W: Unpin,
impl<W> UnwindSafe for Encoder<W>where
W: UnwindSafe,
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