pub trait ImageEncoderPort: Send + Sync {
// Required method
fn encode(
&self,
frame: &dyn MatView,
kind: EncodingKind,
) -> Result<Vec<u8>, ImageEncodingError>;
}Expand description
Encodes a MatView into a byte buffer in one of the EncodingKinds.
Required Methods§
Sourcefn encode(
&self,
frame: &dyn MatView,
kind: EncodingKind,
) -> Result<Vec<u8>, ImageEncodingError>
fn encode( &self, frame: &dyn MatView, kind: EncodingKind, ) -> Result<Vec<u8>, ImageEncodingError>
Encode frame using kind and return the resulting bytes.