pub struct RawEncoder { /* private fields */ }Expand description
Encodes rows of pixels as a raw stream.
Implementations§
Source§impl RawEncoder
impl RawEncoder
Sourcepub fn with_layout(layout: RawFormat) -> Self
pub fn with_layout(layout: RawFormat) -> Self
A raw encoder that writes rows padded to layout’s stride.
Sourcepub const fn rows_written(&self) -> u32
pub const fn rows_written(&self) -> u32
How many rows have been written so far.
Trait Implementations§
Source§impl Debug for RawEncoder
impl Debug for RawEncoder
Source§impl Default for RawEncoder
impl Default for RawEncoder
Source§impl Encoder for RawEncoder
impl Encoder for RawEncoder
Source§fn write_header(
&mut self,
desc: &ImageDescriptor,
_sink: &mut dyn Sink,
) -> Result<()>
fn write_header( &mut self, desc: &ImageDescriptor, _sink: &mut dyn Sink, ) -> Result<()>
Begin an image, writing any container header. Read more
Source§fn write_row(&mut self, row: &[u8], sink: &mut dyn Sink) -> Result<()>
fn write_row(&mut self, row: &[u8], sink: &mut dyn Sink) -> Result<()>
Write the next row, top to bottom. Read more
Source§fn finish(&mut self, sink: &mut dyn Sink) -> Result<()>
fn finish(&mut self, sink: &mut dyn Sink) -> Result<()>
Finish the image, writing any trailer and flushing the sink. Read more
Source§fn set_icc_profile(&mut self, profile: Option<&[u8]>) -> Result<(), PixelsError>
fn set_icc_profile(&mut self, profile: Option<&[u8]>) -> Result<(), PixelsError>
Embed
profile as the image’s ICC colour profile, or write none. Read moreAuto Trait Implementations§
impl Freeze for RawEncoder
impl RefUnwindSafe for RawEncoder
impl Send for RawEncoder
impl Sync for RawEncoder
impl Unpin for RawEncoder
impl UnsafeUnpin for RawEncoder
impl UnwindSafe for RawEncoder
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