Skip to main content

ComponentRowWriter

Trait ComponentRowWriter 

Source
pub trait ComponentRowWriter {
    // Required methods
    fn write_gray_row(
        &mut self,
        y: u32,
        gray_row: &[u8],
    ) -> Result<(), JpegError>;
    fn write_ycbcr_row(
        &mut self,
        y: u32,
        y_row: &[u8],
        cb_row: &[u8],
        cr_row: &[u8],
    ) -> Result<(), JpegError>;
    fn write_rgb_row(
        &mut self,
        y: u32,
        r_row: &[u8],
        g_row: &[u8],
        b_row: &[u8],
    ) -> Result<(), JpegError>;
}
Expand description

Receives decoded component rows before they are packed into the final interleaved pixel format.

Required Methods§

Source

fn write_gray_row(&mut self, y: u32, gray_row: &[u8]) -> Result<(), JpegError>

Receive one grayscale row.

§Errors

Returns an error when the destination cannot accept the row.

Source

fn write_ycbcr_row( &mut self, y: u32, y_row: &[u8], cb_row: &[u8], cr_row: &[u8], ) -> Result<(), JpegError>

Receive one full-width Y/Cb/Cr row.

§Errors

Returns an error when the destination cannot accept the component row.

Source

fn write_rgb_row( &mut self, y: u32, r_row: &[u8], g_row: &[u8], b_row: &[u8], ) -> Result<(), JpegError>

Receive one full-width planar RGB row.

§Errors

Returns an error when the destination cannot accept the component row.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§