pub trait Encode {
// Required methods
fn encode_rgb(
&self,
rgb_data: &[u8],
width: u32,
height: u32,
) -> Result<Vec<u8>, Error>;
fn encode_gray(
&self,
gray_data: &[u8],
width: u32,
height: u32,
) -> Result<Vec<u8>, Error>;
}Expand description
Trait for JPEG encoding (batch mode).
Implemented by both Encoder and StreamingEncoder.